Skip to content

Commit 991c748

Browse files
committed
- Optimise header when Google shows popup ads on top of the page
- Upgrade to Tomcat 10.1.23
1 parent 75da935 commit 991c748

File tree

313 files changed

+5948
-3444
lines changed

Some content is hidden

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

313 files changed

+5948
-3444
lines changed

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

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
</script>
2525
<script>
2626
window.setInterval(function() {
27+
var headerPosition = "fixed";
2728
var ins = document.getElementsByTagName("ins");
2829
for (i of ins) {
29-
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
30-
var bottom = parseInt(i.style.bottom)
31-
if (!isNaN(bottom)) {
32-
// The way Google handles the element is that the height (with the ad) is fixed,
33-
// appearing and disappearing is handled by making the bottom style negative
34-
var space = i.offsetHeight + bottom;
35-
if (space < 0) {
36-
space = 0;
30+
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
if (i.style.bottom) {
32+
var bottom = parseInt(i.style.bottom)
33+
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
36+
var space = i.offsetHeight + bottom;
37+
if (space < 0) {
38+
space = 0;
39+
}
40+
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41+
document.getElementById("cargo-content").style.paddingBottom = space + "px";
42+
}
43+
} else if (i.style.top) {
44+
if (parseInt(i.style.top) === 0) {
45+
headerPosition = "static";
3746
}
38-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
39-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4047
}
4148
}
4249
}
50+
document.getElementById("cargo-header").style.position = headerPosition;
4351
}, 100);
4452
</script>
4553
</head>
@@ -48,7 +56,7 @@
4856
<tbody>
4957
<tr style="height:83px">
5058
<td colspan="2" style="padding:0px">
51-
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
59+
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
5260
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
5361
<tbody>
5462
<tr>

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

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
</script>
2525
<script>
2626
window.setInterval(function() {
27+
var headerPosition = "fixed";
2728
var ins = document.getElementsByTagName("ins");
2829
for (i of ins) {
29-
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
30-
var bottom = parseInt(i.style.bottom)
31-
if (!isNaN(bottom)) {
32-
// The way Google handles the element is that the height (with the ad) is fixed,
33-
// appearing and disappearing is handled by making the bottom style negative
34-
var space = i.offsetHeight + bottom;
35-
if (space < 0) {
36-
space = 0;
30+
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
if (i.style.bottom) {
32+
var bottom = parseInt(i.style.bottom)
33+
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
36+
var space = i.offsetHeight + bottom;
37+
if (space < 0) {
38+
space = 0;
39+
}
40+
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41+
document.getElementById("cargo-content").style.paddingBottom = space + "px";
42+
}
43+
} else if (i.style.top) {
44+
if (parseInt(i.style.top) === 0) {
45+
headerPosition = "static";
3746
}
38-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
39-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4047
}
4148
}
4249
}
50+
document.getElementById("cargo-header").style.position = headerPosition;
4351
}, 100);
4452
</script>
4553
</head>
@@ -48,7 +56,7 @@
4856
<tbody>
4957
<tr style="height:83px">
5058
<td colspan="2" style="padding:0px">
51-
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
59+
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
5260
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
5361
<tbody>
5462
<tr>

cargo/Adding+a+Samples+Test.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
</script>
2525
<script>
2626
window.setInterval(function() {
27+
var headerPosition = "fixed";
2728
var ins = document.getElementsByTagName("ins");
2829
for (i of ins) {
29-
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
30-
var bottom = parseInt(i.style.bottom)
31-
if (!isNaN(bottom)) {
32-
// The way Google handles the element is that the height (with the ad) is fixed,
33-
// appearing and disappearing is handled by making the bottom style negative
34-
var space = i.offsetHeight + bottom;
35-
if (space < 0) {
36-
space = 0;
30+
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
if (i.style.bottom) {
32+
var bottom = parseInt(i.style.bottom)
33+
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
36+
var space = i.offsetHeight + bottom;
37+
if (space < 0) {
38+
space = 0;
39+
}
40+
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41+
document.getElementById("cargo-content").style.paddingBottom = space + "px";
42+
}
43+
} else if (i.style.top) {
44+
if (parseInt(i.style.top) === 0) {
45+
headerPosition = "static";
3746
}
38-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
39-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4047
}
4148
}
4249
}
50+
document.getElementById("cargo-header").style.position = headerPosition;
4351
}, 100);
4452
</script>
4553
</head>
@@ -48,7 +56,7 @@
4856
<tbody>
4957
<tr style="height:83px">
5058
<td colspan="2" style="padding:0px">
51-
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
59+
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
5260
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
5361
<tbody>
5462
<tr>

cargo/Adding+a+container.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
</script>
2525
<script>
2626
window.setInterval(function() {
27+
var headerPosition = "fixed";
2728
var ins = document.getElementsByTagName("ins");
2829
for (i of ins) {
29-
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
30-
var bottom = parseInt(i.style.bottom)
31-
if (!isNaN(bottom)) {
32-
// The way Google handles the element is that the height (with the ad) is fixed,
33-
// appearing and disappearing is handled by making the bottom style negative
34-
var space = i.offsetHeight + bottom;
35-
if (space < 0) {
36-
space = 0;
30+
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
if (i.style.bottom) {
32+
var bottom = parseInt(i.style.bottom)
33+
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
36+
var space = i.offsetHeight + bottom;
37+
if (space < 0) {
38+
space = 0;
39+
}
40+
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41+
document.getElementById("cargo-content").style.paddingBottom = space + "px";
42+
}
43+
} else if (i.style.top) {
44+
if (parseInt(i.style.top) === 0) {
45+
headerPosition = "static";
3746
}
38-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
39-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4047
}
4148
}
4249
}
50+
document.getElementById("cargo-header").style.position = headerPosition;
4351
}, 100);
4452
</script>
4553
</head>
@@ -48,7 +56,7 @@
4856
<tbody>
4957
<tr style="height:83px">
5058
<td colspan="2" style="padding:0px">
51-
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
59+
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
5260
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
5361
<tbody>
5462
<tr>

cargo/Announcing+Codehaus+Cargo+1.7.16.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
</script>
2525
<script>
2626
window.setInterval(function() {
27+
var headerPosition = "fixed";
2728
var ins = document.getElementsByTagName("ins");
2829
for (i of ins) {
29-
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
30-
var bottom = parseInt(i.style.bottom)
31-
if (!isNaN(bottom)) {
32-
// The way Google handles the element is that the height (with the ad) is fixed,
33-
// appearing and disappearing is handled by making the bottom style negative
34-
var space = i.offsetHeight + bottom;
35-
if (space < 0) {
36-
space = 0;
30+
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
if (i.style.bottom) {
32+
var bottom = parseInt(i.style.bottom)
33+
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
36+
var space = i.offsetHeight + bottom;
37+
if (space < 0) {
38+
space = 0;
39+
}
40+
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41+
document.getElementById("cargo-content").style.paddingBottom = space + "px";
42+
}
43+
} else if (i.style.top) {
44+
if (parseInt(i.style.top) === 0) {
45+
headerPosition = "static";
3746
}
38-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
39-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4047
}
4148
}
4249
}
50+
document.getElementById("cargo-header").style.position = headerPosition;
4351
}, 100);
4452
</script>
4553
</head>
@@ -48,7 +56,7 @@
4856
<tbody>
4957
<tr style="height:83px">
5058
<td colspan="2" style="padding:0px">
51-
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
59+
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
5260
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
5361
<tbody>
5462
<tr>

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

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
</script>
2525
<script>
2626
window.setInterval(function() {
27+
var headerPosition = "fixed";
2728
var ins = document.getElementsByTagName("ins");
2829
for (i of ins) {
29-
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
30-
var bottom = parseInt(i.style.bottom)
31-
if (!isNaN(bottom)) {
32-
// The way Google handles the element is that the height (with the ad) is fixed,
33-
// appearing and disappearing is handled by making the bottom style negative
34-
var space = i.offsetHeight + bottom;
35-
if (space < 0) {
36-
space = 0;
30+
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
if (i.style.bottom) {
32+
var bottom = parseInt(i.style.bottom)
33+
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
36+
var space = i.offsetHeight + bottom;
37+
if (space < 0) {
38+
space = 0;
39+
}
40+
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41+
document.getElementById("cargo-content").style.paddingBottom = space + "px";
42+
}
43+
} else if (i.style.top) {
44+
if (parseInt(i.style.top) === 0) {
45+
headerPosition = "static";
3746
}
38-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
39-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4047
}
4148
}
4249
}
50+
document.getElementById("cargo-header").style.position = headerPosition;
4351
}, 100);
4452
</script>
4553
</head>
@@ -48,7 +56,7 @@
4856
<tbody>
4957
<tr style="height:83px">
5058
<td colspan="2" style="padding:0px">
51-
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
59+
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
5260
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
5361
<tbody>
5462
<tr>

cargo/Ant+Tasks+Reference+Guide.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
</script>
2525
<script>
2626
window.setInterval(function() {
27+
var headerPosition = "fixed";
2728
var ins = document.getElementsByTagName("ins");
2829
for (i of ins) {
29-
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
30-
var bottom = parseInt(i.style.bottom)
31-
if (!isNaN(bottom)) {
32-
// The way Google handles the element is that the height (with the ad) is fixed,
33-
// appearing and disappearing is handled by making the bottom style negative
34-
var space = i.offsetHeight + bottom;
35-
if (space < 0) {
36-
space = 0;
30+
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
if (i.style.bottom) {
32+
var bottom = parseInt(i.style.bottom)
33+
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
36+
var space = i.offsetHeight + bottom;
37+
if (space < 0) {
38+
space = 0;
39+
}
40+
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41+
document.getElementById("cargo-content").style.paddingBottom = space + "px";
42+
}
43+
} else if (i.style.top) {
44+
if (parseInt(i.style.top) === 0) {
45+
headerPosition = "static";
3746
}
38-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
39-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4047
}
4148
}
4249
}
50+
document.getElementById("cargo-header").style.position = headerPosition;
4351
}, 100);
4452
</script>
4553
</head>
@@ -48,7 +56,7 @@
4856
<tbody>
4957
<tr style="height:83px">
5058
<td colspan="2" style="padding:0px">
51-
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
59+
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
5260
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
5361
<tbody>
5462
<tr>

cargo/Ant+support.html

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
</script>
2525
<script>
2626
window.setInterval(function() {
27+
var headerPosition = "fixed";
2728
var ins = document.getElementsByTagName("ins");
2829
for (i of ins) {
29-
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style && i.style.bottom) {
30-
var bottom = parseInt(i.style.bottom)
31-
if (!isNaN(bottom)) {
32-
// The way Google handles the element is that the height (with the ad) is fixed,
33-
// appearing and disappearing is handled by making the bottom style negative
34-
var space = i.offsetHeight + bottom;
35-
if (space < 0) {
36-
space = 0;
30+
if (i.className && i.className.indexOf("adsbygoogle") != -1 && i.style) {
31+
if (i.style.bottom) {
32+
var bottom = parseInt(i.style.bottom)
33+
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
36+
var space = i.offsetHeight + bottom;
37+
if (space < 0) {
38+
space = 0;
39+
}
40+
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
41+
document.getElementById("cargo-content").style.paddingBottom = space + "px";
42+
}
43+
} else if (i.style.top) {
44+
if (parseInt(i.style.top) === 0) {
45+
headerPosition = "static";
3746
}
38-
document.getElementById("cargo-navigation").style.paddingBottom = space + "px";
39-
document.getElementById("cargo-content").style.paddingBottom = space + "px";
4047
}
4148
}
4249
}
50+
document.getElementById("cargo-header").style.position = headerPosition;
4351
}, 100);
4452
</script>
4553
</head>
@@ -48,7 +56,7 @@
4856
<tbody>
4957
<tr style="height:83px">
5058
<td colspan="2" style="padding:0px">
51-
<div style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
59+
<div id="cargo-header" style="position:fixed;width:100%;top:0;border-bottom:1px solid #39434F;z-index:2">
5260
<table class="banner" style="padding:0px;width:100%;background-image:url('attachments/cargo-banner-center.png')">
5361
<tbody>
5462
<tr>

0 commit comments

Comments
 (0)