1new class { 2 3 constructor() { 4 if (document.querySelector("[data-no-res-ad]")) { 5 return; 6 } 7 8 const templateEl = document.createElement("template"); 9 templateEl.innerHTML = `\ 10<div> 11 <ins class="adsbygoogle" style="display:inline-block;" data-ad-client="" data-ad-slot=""></ins> 12</div>`; 13 14 document.querySelectorAll(".sp-res").forEach(sp => { 15 sp.classList.remove("invisible"); 16 17 let ins = null; 18 ins = templateEl.content.firstElementChild.cloneNode(true); 19 20 let adIns = ins.querySelector(".adsbygoogle"); 21 for (let attr of sp.attributes) { 22 if (attr.name.startsWith("data-")) { 23 adIns.setAttribute(attr.name, attr.value); 24 } 25 } 26 27 sp.querySelector(".sp-container").innerHTML = ins.innerHTML; 28 29 window.setTimeout(() => { 30 (window.adsbygoogle = window.adsbygoogle || []).push({}); 31 }, 500); 32 33 }); 34 35 setTimeout(() => { 36 document.body.appendScript("//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"); 37 }, 1000); 38 } 39 40}();
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.