1 2// helpers to read out the consents that the "mindshape-cookie-consent" Extension created in the cookie string "cookie_consent" 3const _getCookie = function (key){ 4 const name = key+'='; 5 const ca = decodeURIComponent(document.cookie).split(';'); 6 7 for(let i = 0; i < ca.length; i++) { 8 let c = ca[i]; 9 while (c.charAt(0) === ' ') { 10 c = c.substring(1); 11 } 12 if (c.indexOf(name) === 0) { 13 let val = c.substring(name.length, c.length); 14 try { 15 val = JSON.parse(val); 16 } catch(e) {} 17 return val; 18 } 19 } 20 return ''; 21}; 22 23const _getConsent = function(option) { 24 const consentCookie = _getCookie('cookie_consent'); 25 return consentCookie && consentCookie.consent && consentCookie.options.indexOf(option) !== -1; 26}; 27 28 29// backlink to newslist 30window.addEventListener("load", function(event) { 31 var element = document.getElementsByClassName('new-detail-show'); 32 function setCookie(e) { 33 document.cookie = "newlistUrl="+window.location.href; 34 } 35 var numElemente = element.length; 36 for (var i = 0; i < numElemente; i++) { 37 element[i].addEventListener('click', setCookie, false); 38 } 39}); 40window.addEventListener("load", function(event) { 41 var element = document.getElementsByClassName('news-backlink-wrap'); 42 var numElemente = element.length; 43 if(numElemente > 0){ 44 let name = "newlistUrl="; 45 let backlink = true; 46 let ca = document.cookie.split(';'); 47 48 for(let i = 0; i < ca.length; i++) { 49 let c = ca[i]; 50 while (c.charAt(0) == ' ') { 51 c = c.substring(1); 52 } 53 if (c.indexOf(name) == 0) { 54 var link = document.getElementsByClassName("news-button-backlink"); 55 var numlink = link.length; 56 for (var j = 0; j < numlink; j++) { 57 backlink = false; 58 link[j].setAttribute("href", c.substring(name.length, c.length)); 59 } 60 } 61 } 62 if (backlink) { 63 let linkElement = element[0].querySelector("[data-backlink-to-list]"); 64 linkElement.setAttribute("href", linkElement.dataset.backlinkToList); 65 } 66 } 67}); 68 69window.addEventListener("load", function(event) { 70 document 71 .querySelectorAll('.frame.frame-type-html svg') 72 .forEach(svg => { 73 svg.setAttribute('aria-hidden', 'true'); 74 }); 75 76 document 77 .querySelectorAll('.frame.frame-type-html #et-opt-out') 78 .forEach(link => { 79 link.setAttribute('aria-hidden', 'true'); 80 }); 81}); 82 83// ally optimzing for all links in RTE -> table elements without context 84window.addEventListener("load", function (event) { 85 // Search all containers with .rte-text-container 86 const containers = document.querySelectorAll(".rte-text-container"); 87 88 containers.forEach((container, containerIndex) => { 89 const tables = container.querySelectorAll("table"); 90 91 tables.forEach((table, tableIndex) => { 92 // Collect all rows of this table to have a stable index 93 const rows = Array.from(table.querySelectorAll("tr")); 94 const rowIndexMap = new Map(); 95 rows.forEach((row, rowIndex) => { 96 rowIndexMap.set(row, rowIndex); 97 }); 98 99 // All links inside this table 100 const links = table.querySelectorAll("a[href]"); 101 102 links.forEach((link) => { 103 const tr = link.closest("tr"); 104 if (!tr) return; // Safety check 105 106 // Create a unique ID for the row if it does not already have one 107 let trId = tr.id; 108 if (!trId) { 109 const rowIndex = rowIndexMap.get(tr) ?? 0; 110 trId = `rte-row-${containerIndex}-${tableIndex}-${rowIndex}`; 111 tr.id = trId; 112 } 113 114 // Set or extend aria-labelledby on the link 115 const existingLabelledBy = link.getAttribute("aria-labelledby"); 116 117 if (existingLabelledBy) { 118 const tokens = existingLabelledBy.split(/\s+/).filter(
118Boolean); 119 if (!tokens.includes(trId)) { 120 tokens.push(trId); 121 link.setAttribute("aria-labelledby", tokens.join(" ")); 122 } 123 } else { 124 link.setAttribute("aria-labelledby", trId); 125 } 126 }); 127 }); 128 }); 129});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.