Skip to content

Commit

Permalink
- Optimise header when Google shows popup ads on top of the page
Browse files Browse the repository at this point in the history
- Upgrade to Tomcat 10.1.23
  • Loading branch information
alitokmen committed Apr 24, 2024
1 parent 75da935 commit 991c748
Show file tree
Hide file tree
Showing 313 changed files with 5,948 additions and 3,444 deletions.
30 changes: 19 additions & 11 deletions cargo/Adding+TLD+support+to+the+Jetty+container.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
</script>
<script>
window.setInterval(function() {
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
} else if (i.style.top) {
if (parseInt(i.style.top) === 0) {
headerPosition = "static";
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
}
}
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
</head>
Expand All @@ -48,7 +56,7 @@
<tbody>
<tr style="height:83px">
<td colspan="2" style="padding:0px">
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
<tbody>
<tr>
Expand Down
30 changes: 19 additions & 11 deletions cargo/Adding+a+JMS+resource+to+Resin3x.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
</script>
<script>
window.setInterval(function() {
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
} else if (i.style.top) {
if (parseInt(i.style.top) === 0) {
headerPosition = "static";
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
}
}
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
</head>
Expand All @@ -48,7 +56,7 @@
<tbody>
<tr style="height:83px">
<td colspan="2" style="padding:0px">
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
<tbody>
<tr>
Expand Down
30 changes: 19 additions & 11 deletions cargo/Adding+a+Samples+Test.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
</script>
<script>
window.setInterval(function() {
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
} else if (i.style.top) {
if (parseInt(i.style.top) === 0) {
headerPosition = "static";
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
}
}
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
</head>
Expand All @@ -48,7 +56,7 @@
<tbody>
<tr style="height:83px">
<td colspan="2" style="padding:0px">
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
<tbody>
<tr>
Expand Down
30 changes: 19 additions & 11 deletions cargo/Adding+a+container.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
</script>
<script>
window.setInterval(function() {
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
} else if (i.style.top) {
if (parseInt(i.style.top) === 0) {
headerPosition = "static";
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
}
}
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
</head>
Expand All @@ -48,7 +56,7 @@
<tbody>
<tr style="height:83px">
<td colspan="2" style="padding:0px">
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
<tbody>
<tr>
Expand Down
30 changes: 19 additions & 11 deletions cargo/Announcing+Codehaus+Cargo+1.7.16.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
</script>
<script>
window.setInterval(function() {
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
} else if (i.style.top) {
if (parseInt(i.style.top) === 0) {
headerPosition = "static";
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
}
}
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
</head>
Expand All @@ -48,7 +56,7 @@
<tbody>
<tr style="height:83px">
<td colspan="2" style="padding:0px">
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
<tbody>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
</script>
<script>
window.setInterval(function() {
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
} else if (i.style.top) {
if (parseInt(i.style.top) === 0) {
headerPosition = "static";
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
}
}
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
</head>
Expand All @@ -48,7 +56,7 @@
<tbody>
<tr style="height:83px">
<td colspan="2" style="padding:0px">
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
<tbody>
<tr>
Expand Down
30 changes: 19 additions & 11 deletions cargo/Ant+Tasks+Reference+Guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
</script>
<script>
window.setInterval(function() {
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
} else if (i.style.top) {
if (parseInt(i.style.top) === 0) {
headerPosition = "static";
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
}
}
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
</head>
Expand All @@ -48,7 +56,7 @@
<tbody>
<tr style="height:83px">
<td colspan="2" style="padding:0px">
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
<tbody>
<tr>
Expand Down
30 changes: 19 additions & 11 deletions cargo/Ant+support.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,30 @@
</script>
<script>
window.setInterval(function() {
var headerPosition = "fixed";
var ins = document.getElementsByTagName("ins");
for (i of ins) {
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
if (i.style.bottom) {
var bottom = parseInt(i.style.bottom)
if (!isNaN(bottom)) {
// The way Google handles the element is that the height (with the ad) is fixed,
// appearing and disappearing is handled by making the bottom style negative
var space = i.offsetHeight + bottom;
if (space < 0) {
space = 0;
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
} else if (i.style.top) {
if (parseInt(i.style.top) === 0) {
headerPosition = "static";
}
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
document.getElementById("cargo-content").style.paddingBottom = space + "px";
}
}
}
document.getElementById("cargo-header").style.position = headerPosition;
}, 100);
</script>
</head>
Expand All @@ -48,7 +56,7 @@
<tbody>
<tr style="height:83px">
<td colspan="2" style="padding:0px">
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
<tbody>
<tr>
Expand Down
Loading

0 comments on commit 991c748

Please sign in to comment.