Skip to content

Commit b1581cb

Browse files
authored
Revert "Fix slow loading: block eclipse.org cookie consent resources that cause timeouts"
This reverts commit 346e2cf.
1 parent 346e2cf commit b1581cb

4 files changed

Lines changed: 2 additions & 177 deletions

File tree

supplemental-ui/css/performance-fixes.css

Lines changed: 0 additions & 28 deletions
This file was deleted.

supplemental-ui/js/performance-blocker.js

Lines changed: 0 additions & 86 deletions
This file was deleted.

supplemental-ui/partials/head-meta.hbs

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
{{!-- Early performance blocker script - load first to block slow external resources --}}
2-
<script src="{{{uiRootPath}}}/js/performance-blocker.js"></script>
3-
4-
{{!-- Performance fixes to block slow external resources --}}
5-
<link rel="stylesheet" href="{{{uiRootPath}}}/css/performance-fixes.css">
6-
71
{{!-- Force PDF downloads instead of opening in browser --}}
82
<script>
93
document.addEventListener('DOMContentLoaded', function() {
@@ -21,52 +15,6 @@
2115
});
2216
</script>
2317

24-
{{!-- Performance fixes to block slow external resources --}}
25-
<link rel="stylesheet" href="{{{uiRootPath}}}/css/performance-fixes.css">
26-
27-
{{!-- Block external eclipse.org cookie consent resources to prevent slow loading --}}
28-
<style>
29-
/* Hide any cookie consent elements that might be added */
30-
.cookie-consent, .cookieconsent, [class*="cookie"] {
31-
display: none !important;
32-
}
33-
</style>
34-
35-
<script>
36-
// Override/disable any eclipse.org external script loading
37-
document.addEventListener('DOMContentLoaded', function() {
38-
// Remove any existing cookie consent links and scripts
39-
const cookieLinks = document.querySelectorAll('link[href*="eclipse.org"][href*="cookieconsent"]');
40-
cookieLinks.forEach(link => {
41-
console.log('Removing slow-loading eclipse.org cookie consent CSS:', link.href);
42-
link.remove();
43-
});
44-
45-
const cookieScripts = document.querySelectorAll('script[src*="eclipse.org"][src*="cookieconsent"]');
46-
cookieScripts.forEach(script => {
47-
console.log('Removing slow-loading eclipse.org cookie consent JS:', script.src);
48-
script.remove();
49-
});
50-
51-
// Prevent new cookie consent scripts from loading
52-
const originalCreateElement = document.createElement;
53-
document.createElement = function(tagName) {
54-
const element = originalCreateElement.call(document, tagName);
55-
if (tagName.toLowerCase() === 'script') {
56-
const originalSetAttribute = element.setAttribute;
57-
element.setAttribute = function(name, value) {
58-
if (name === 'src' && value && value.includes('eclipse.org') && value.includes('cookieconsent')) {
59-
console.log('Blocked slow-loading eclipse.org cookie consent script:', value);
60-
return; // Don't set the src attribute
61-
}
62-
return originalSetAttribute.call(this, name, value);
63-
};
64-
}
65-
return element;
66-
};
67-
});
68-
</script>
69-
7018
{{!-- Favicons --}}
7119
<link rel="icon" href="{{{uiRootPath}}}/img/favicon.svg" type="image/svg+xml">
7220
<link rel="alternate icon" href="{{{uiRootPath}}}/img/favicon.png" type="image/png">

test-pdf-download.sh

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,13 @@ fi
1111

1212
echo "✅ Site directory exists"
1313

14-
# Check if PDF exists in assembler location (could be index.pdf or microprofile-tutorial.pdf)
15-
PDF_FOUND=false
14+
# Check if PDF exists in assembler location
1615
if [ -f "build/assembler/microprofile-tutorial/6.1/microprofile-tutorial.pdf" ]; then
17-
echo "✅ PDF found in assembler location: microprofile-tutorial.pdf"
16+
echo "✅ PDF found in assembler location"
1817
PDF_SIZE=$(stat -f%z "build/assembler/microprofile-tutorial/6.1/microprofile-tutorial.pdf" 2>/dev/null || stat -c%s "build/assembler/microprofile-tutorial/6.1/microprofile-tutorial.pdf")
1918
echo " Size: ${PDF_SIZE} bytes"
20-
PDF_FOUND=true
21-
elif [ -f "build/assembler/microprofile-tutorial/6.1/_exports/index.pdf" ]; then
22-
echo "✅ PDF found in assembler/_exports location: index.pdf"
23-
PDF_SIZE=$(stat -f%z "build/assembler/microprofile-tutorial/6.1/_exports/index.pdf" 2>/dev/null || stat -c%s "build/assembler/microprofile-tutorial/6.1/_exports/index.pdf")
24-
echo " Size: ${PDF_SIZE} bytes"
25-
PDF_FOUND=true
2619
else
2720
echo "❌ PDF not found in assembler location"
28-
echo " Looking for PDF files:"
29-
find . -name "*.pdf" -type f 2>/dev/null || echo " No PDF files found"
3021
fi
3122

3223
# Check if PDF exists in site location (where download link points)

0 commit comments

Comments
 (0)