Skip to content

Commit f6329ec

Browse files
committed
Better design when the Google ads are on the top of the page
1 parent 30ce478 commit f6329ec

File tree

319 files changed

+3509
-2552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

319 files changed

+3509
-2552
lines changed

cargo/Adding+TLD+support+to+the+Jetty+container.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

cargo/Adding+a+JMS+resource+to+Resin3x.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

cargo/Adding+a+Samples+Test.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

cargo/Adding+a+container.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

cargo/Announcing+Codehaus+Cargo+1.7.16.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

cargo/Another+jump+in+Codehaus+Cargo+s+history+version+1.8.0+is+here.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

cargo/Ant+Tasks+Reference+Guide.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

cargo/Ant+support.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

cargo/Application+Classpath.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,34 @@
2828
var ins = document.getElementsByTagName("ins");
2929
for (i of ins) {
3030
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
var paddingBottom = 0;
32+
var paddingTop = 0;
3133
if (i.style.bottom) {
3234
var bottom = parseInt(i.style.bottom)
3335
if (!isNaN(bottom)) {
34-
// The way Google handles the element is that the height (with the ad) is fixed,
35-
// appearing and disappearing is handled by making the bottom style negative
3636
var space = i.offsetHeight + bottom;
3737
if (space < 0) {
3838
space = 0;
3939
}
40-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
40+
paddingBottom = space;
4241
}
4342
} else if (i.style.top) {
4443
var top = parseInt(i.style.top)
4544
if (!isNaN(top)) {
46-
// The way Google handles the element is that the height (with the ad) is fixed,
47-
// appearing and disappearing is handled by making the top style negative
4845
var space = i.offsetHeight + top;
4946
if (space < 0) {
5047
space = 0;
5148
}
52-
document.getElementById("cargo-header").style.paddingTop = space + "px";
53-
document.getElementById("cargo-header-spacing").style.height = (83 + space) + "px";
49+
paddingTop = space;
5450
}
5551
}
52+
53+
// The way Google handles the element is that the height (with the ad) is fixed,
54+
// appearing and disappearing is handled by making the bottom or top style negative
55+
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
56+
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
57+
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
58+
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
5659
}
5760
}
5861
document.getElementById("cargo-header").style.position = headerPosition;

0 commit comments

Comments
 (0)