|
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 | | - |
7 | 1 | {{!-- Force PDF downloads instead of opening in browser --}} |
8 | 2 | <script> |
9 | 3 | document.addEventListener('DOMContentLoaded', function() { |
|
21 | 15 | }); |
22 | 16 | </script> |
23 | 17 |
|
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 | | - |
70 | 18 | {{!-- Favicons --}} |
71 | 19 | <link rel="icon" href="{{{uiRootPath}}}/img/favicon.svg" type="image/svg+xml"> |
72 | 20 | <link rel="alternate icon" href="{{{uiRootPath}}}/img/favicon.png" type="image/png"> |
|
0 commit comments