Skip to content

Commit

Permalink
Fix header / footer jump when multiple ads
Browse files Browse the repository at this point in the history
  • Loading branch information
alitokmen committed Jan 12, 2025
1 parent 2760fd1 commit 4d2b308
Show file tree
Hide file tree
Showing 322 changed files with 3,864 additions and 3,220 deletions.
22 changes: 12 additions & 10 deletions cargo/Adding+TLD+support+to+the+Jetty+container.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
22 changes: 12 additions & 10 deletions cargo/Adding+a+JMS+resource+to+Resin3x.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
22 changes: 12 additions & 10 deletions cargo/Adding+a+Samples+Test.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
22 changes: 12 additions & 10 deletions cargo/Adding+a+container.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
22 changes: 12 additions & 10 deletions cargo/Announcing+Codehaus+Cargo+1.7.16.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
22 changes: 12 additions & 10 deletions cargo/Ant+Tasks+Reference+Guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
22 changes: 12 additions & 10 deletions cargo/Ant+support.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
22 changes: 12 additions & 10 deletions cargo/Application+Classpath.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@
});
</script>
<script>
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
window.setInterval(function() {
var paddingBottom = 0;
var paddingTop = 0;
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
var paddingBottom = 0;
var paddingTop = 0;
if (
i.className && i.className.indexOf("adsbygoogle") != -1 &&
i.style && i.style.display == "block") {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
Expand All @@ -61,15 +65,13 @@
paddingTop = space;
}
}

// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom or top style negative
document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
}
}

document.getElementById("cargo-navigation").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-content").style.paddingBottom = paddingBottom + "px";
document.getElementById("cargo-header").style.paddingTop = paddingTop + "px";
document.getElementById("cargo-header-spacing").style.height = (83 + paddingTop) + "px";
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
Expand Down
Loading

0 comments on commit 4d2b308

Please sign in to comment.