Autor | Zpráva | ||
---|---|---|---|
Mlocik97 Profil |
#1 · Zasláno: 21. 6. 2018, 18:47:36
Uncaught SyntaxError: Identifier 'chunkSize' has already been declared at VM[...] adblock-datacollection-contentscript.js:1 (anonymous) @ VM[...] adblock-datacollection-contentscript.js:1 Zdravím, mám jednu webstránku, do teraz mi tam všetko fungovalo v pohode, (resp. aj stále funguje) avšak od dnes na mojej stránke sa mi v konzoli chrome vždy objaví hláška, ktorá je hore, pokaždé když kliknu na akékoľvek tlačítko s odkazom [ul>li>a]. Je mi jasné že je to spôsobené adblockerom. Na stránke avšak nemám vôbec žiadny prvok ktorý by mi mal adblok blokovať. Jak to vyriešiť, abych nemal v konzoli túto chybu chyby.... deje se to len v Chrome |
||
Mlocik97 Profil |
#2 · Zasláno: 21. 6. 2018, 20:38:23
dodám že chyba odkazuje na tento kód:
var matchSelectors = []; var pairs = []; const chunkSize = 1000; function* genFunc() { var i = pairs.length; while (i--) { yield pairs.splice((-1 * chunkSize), chunkSize); } } chrome.runtime.sendMessage({type: "getSelectors"}, response => { if (document.readyState != "loading") { selectors = []; pairs = response.selectors; let interval = setInterval(() => { let val = genFunc().next(); if (val.done) { clearInterval(interval); if (matchSelectors.length > 0) { let noDuplicates = Array.from(new Set(matchSelectors)); // remove any duplicates chrome.runtime.sendMessage({ type: "datacollection.elementHide", selectors: noDuplicates }); } } else { let selectors = val.value; for (let selector of selectors) { for (let element of document.querySelectorAll(selector)) { // Only consider selectors that actually have an effect on the // computed styles, and aren't overridden by rules with higher // priority, or haven't been circumvented in a different way. if (getComputedStyle(element).display == "none") { matchSelectors.push(selector); } } } } }, 10); // pause 10 milli-seconds between each chunck } }); |
||
Časová prodleva: 7 let
|
0