PrivaBlock 3.1.2
“Blocks ads and trackers in Firefox. Open source, no account, no analytics.”
Archive contains Mozilla COSE digest manifestArchive contains Mozilla COSE signature file
SHA-256427a7f9912b79d714b828e0ad5c25a9f2880e563c69356cdb54f96c0de2a4f03
Evidence
1:11… hiding (cosmetic filtering), shared by Firefox and Chromium. Runs at document_start.
2// Rules are fetched once per frame and injected as a stylesheet, which also hides elements that
3// appear later — no DOM observer needed. One CSS rule per selector, so one invalid selector
4// can't disable the others.
5(() => {
6 const api = globalThis.browser ?? globalThis.chrome;
7 const MAX_SELECTORS = 3000;
8 const youtube = location.hostname === "youtube.com" || location.hostname.endsWith(".youtube.com");
9
10 // Built-in YouTube rules, injected before the page renders.
11 …
23:7… tion inject(id, selectors) {
24 if (!selectors.length) return null;
25 const style = document.createElement("style");
26 style.className = id;
27 style.textContent = selectors.map((s) => `${s}{display:none!important}`).join("\n");
28 (document.head || document.documentElement).appendChild(style);
29 return style;
30 }
31
32 // Scriptlet calls that came by message (Chromium: user filters and custom lists) go to the page-world
36:26… .documentElement;
37 let queued = [];
38 try {
39 queued = JSON.parse(root.getAttribute("data-privablock-sl") || "[]");
40 } catch {}
41 root.setAttribute("data-privablock-sl", JSON.stringify(queued.concat(calls)));
42 document.dispatchEvent(new Event("privablock-sl"));
43 }
44
45 const builtIn = youtube ? inject("privablo …
47:11… countHidden(selectors) {
48 let count = 0;
49 for (const s of selectors) {
50 try {
51 count += document.querySelectorAll(s).length;
52 } catch {
53 // invalid selector: already ignored by the stylesheet
⋯5 lines
60:96… essage.)
61 if (window === window.top) {
62 const shown = () => api.runtime.sendMessage({ type: "newDocument" }).catch(() => {});
63 addEventListener("pageshow", (event) => event.persisted && shown());
64 if (document.prerendering) document.addEventListe …
Showing the top 5 files — 6 more files (62 regions) not shown.
No evidence locations were recorded for this file. Raw result