|
1 | | -- domains: |
2 | | - - www.thestar.com |
3 | | - - www.niagarafallsreview.ca |
4 | | - - www.stcatharinesstandard.ca |
5 | | - - www.thepeterboroughexaminer.com |
6 | | - - www.therecord.com |
7 | | - - www.thespec.com |
8 | | - - www.wellandtribune.ca |
| 1 | +- domain: theathletic.com |
9 | 2 | injections: |
10 | 3 | - position: head |
11 | 4 | append: | |
12 | 5 | <script> |
13 | | - window.localStorage.clear(); |
14 | 6 | document.addEventListener("DOMContentLoaded", () => { |
15 | | - const paywall = document.querySelectorAll('div.subscriber-offers'); |
16 | | - paywall.forEach(el => { el.remove(); }); |
17 | | - const subscriber_only = document.querySelectorAll('div.subscriber-only'); |
18 | | - for (const elem of subscriber_only) { |
19 | | - if (elem.classList.contains('encrypted-content') && dompurify_loaded) { |
20 | | - const parser = new DOMParser(); |
21 | | - const doc = parser.parseFromString('<div>' + DOMPurify.sanitize(unscramble(elem.innerText)) + '</div>', 'text/html'); |
22 | | - const content_new = doc.querySelector('div'); |
23 | | - elem.parentNode.replaceChild(content_new, elem); |
24 | | - } |
25 | | - elem.removeAttribute('style'); |
26 | | - elem.removeAttribute('class'); |
27 | | - } |
28 | | - const banners = document.querySelectorAll('div.subscription-required, div.redacted-overlay, div.subscriber-hide, div.tnt-ads-container'); |
29 | | - banners.forEach(el => { el.remove(); }); |
30 | | - const ads = document.querySelectorAll('div.tnt-ads-container, div[class*="adLabelWrapper"]'); |
31 | | - ads.forEach(el => { el.remove(); }); |
32 | | - const recommendations = document.querySelectorAll('div[id^="tncms-region-article"]'); |
33 | | - recommendations.forEach(el => { el.remove(); }); |
| 7 | + let overlays = document.querySelectorAll('div[id*="overlay"], div:empty:not([data-rjs])'); |
| 8 | + overlays.forEach(el => el.remove()); |
| 9 | +
|
| 10 | + let slideup = document.querySelectorAll('div[id^=slideup-]'); |
| 11 | + slideup.forEach(el => el.remove()); |
| 12 | +
|
| 13 | + let apron = document.getElementById('free-apron-cta'); |
| 14 | + apron.remove(); |
| 15 | + |
| 16 | + let body = document.querySelector('body'); |
| 17 | + body.style.overflow = 'visible'; |
| 18 | + body.style.position = 'relative'; |
34 | 19 | }); |
35 | 20 | </script> |
36 | | -
|
| 21 | + tests: |
| 22 | + - url: https://theathletic.com/5097900/2023/11/29/corey-perry-blackhawks-nhl/ |
| 23 | + test: document.querySelector('div[id*="overlay"], div:empty:not([data-rjs])') === null |
| 24 | + - url: https://theathletic.com/5097851/2023/11/29/mandel-mailbag-cfp-texas-alabama/ |
| 25 | + test: document.getElementById('free-apron-cta') === null |
37 | 26 | - domains: |
38 | | - - www.nytimes.com |
39 | | - - www.time.com |
40 | | - headers: |
41 | | - ueser-agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) |
42 | | - cookie: nyt-a=; nyt-gdpr=0; nyt-geo=DE; nyt-privacy=1 |
43 | | - referer: https://www.google.com/ |
| 27 | + - www.foxbusiness.com |
| 28 | + - www.foxnews.com |
44 | 29 | injections: |
45 | 30 | - position: head |
46 | 31 | append: | |
47 | 32 | <script> |
48 | | - window.localStorage.clear(); |
49 | 33 | document.addEventListener("DOMContentLoaded", () => { |
50 | | - const banners = document.querySelectorAll('div[data-testid="inline-message"], div[id^="ad-"], div[id^="leaderboard-"], div.expanded-dock, div.pz-ad-box, div[id="top-wrapper"], div[id="bottom-wrapper"]'); |
| 34 | + let featuredVideo = document.querySelector('.featured-video'); |
| 35 | + featuredVideo.remove(); |
| 36 | +
|
| 37 | + let relatedArticles = document.querySelectorAll('p a strong'); |
| 38 | + relatedArticles.forEach(el => el.remove()); |
| 39 | + }); |
| 40 | + </script> |
| 41 | + tests: |
| 42 | + - url: https://www.foxbusiness.com/fox-news-tech/elon-musk-tells-advertisers-who-left-x-go-f-yourself |
| 43 | + test: document.querySelector('video') === null && document.querySelector('strong') === null |
| 44 | + - url: https://www.foxnews.com/media/mayim-bialik-calls-feminists-silence-hamas-rape-torture-october-7-terror-attacks |
| 45 | + test: document.querySelector('video') === null && document.querySelector('strong') === null |
| 46 | +- domain: www.usatoday.com |
| 47 | + injections: |
| 48 | + - position: head |
| 49 | + append: | |
| 50 | + <script> |
| 51 | + document.addEventListener("DOMContentLoaded", () => { |
| 52 | + const banners = document.querySelectorAll('div.roadblock-container, .gnt_nb, [aria-label="advertisement"], div[id="main-frame-error"]'); |
51 | 53 | banners.forEach(el => { el.remove(); }); |
52 | 54 | }); |
53 | 55 | </script> |
|
88 | 90 | } |
89 | 91 | }); |
90 | 92 | </script> |
| 93 | + tests: |
| 94 | + - url: https://www.americanbanker.com/news/how-foster-youth-become-financially-forgotten |
| 95 | + test: document.querySelector('.inline-gate') === null |
| 96 | +- domains: |
| 97 | + - www.nytimes.com |
| 98 | + - www.time.com |
| 99 | + headers: |
| 100 | + ueser-agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) |
| 101 | + cookie: nyt-a=; nyt-gdpr=0; nyt-geo=DE; nyt-privacy=1 |
| 102 | + referer: https://www.google.com/ |
| 103 | + content-security-policy: "default-src * 'unsafe-inline' 'unsafe-eval' data: blob:;" |
| 104 | + injections: |
| 105 | + - position: head |
| 106 | + append: | |
| 107 | + <script> |
| 108 | + window.localStorage.clear(); |
| 109 | + document.addEventListener("DOMContentLoaded", () => { |
| 110 | + const banners = document.querySelectorAll('div[data-testid="inline-message"], div[id^="ad-"], div[id^="leaderboard-"], div.expanded-dock, div.pz-ad-box, div[id="top-wrapper"], div[id="bottom-wrapper"]'); |
| 111 | + banners.forEach(el => { el.remove(); }); |
| 112 | + }); |
| 113 | + </script> |
| 114 | + tests: |
| 115 | + - url: https://www.nytimes.com/2023/11/24/business/retail-workers-black-friday-shopping.html |
| 116 | + test: document.querySelector('div[data-testid="inline-message"]') === null |
| 117 | +- domain: medium.com |
| 118 | + headers: |
| 119 | + referer: https://t.co/x?amp=1 |
| 120 | + x-forwarded-for: none |
| 121 | + user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 |
| 122 | + content-security-policy: script-src 'self'; |
| 123 | + cookie: |
91 | 124 |
|
92 | 125 | - domain: www.washingtonpost.com |
93 | 126 | injections: |
|
103 | 136 | headimage.forEach(image => { image.style.filter = ''; }); |
104 | 137 | }); |
105 | 138 | </script> |
106 | | -
|
107 | | -- domain: www.usatoday.com |
| 139 | + tests: |
| 140 | + - url: https://www.washingtonpost.com/world/2023/11/24/russia-crimea-tunnel-china/ |
| 141 | + test: document.querySelector('div[data-qa="subscribe-promo"]') === null |
| 142 | +- domains: |
| 143 | + - www.thestar.com |
| 144 | + - www.niagarafallsreview.ca |
| 145 | + - www.stcatharinesstandard.ca |
| 146 | + - www.thepeterboroughexaminer.com |
| 147 | + - www.therecord.com |
| 148 | + - www.thespec.com |
| 149 | + - www.wellandtribune.ca |
108 | 150 | injections: |
109 | 151 | - position: head |
110 | 152 | append: | |
111 | 153 | <script> |
| 154 | + window.localStorage.clear(); |
112 | 155 | document.addEventListener("DOMContentLoaded", () => { |
113 | | - const banners = document.querySelectorAll('div.roadblock-container, .gnt_nb, [aria-label="advertisement"], div[id="main-frame-error"]'); |
| 156 | + const paywall = document.querySelectorAll('div.subscriber-offers'); |
| 157 | + paywall.forEach(el => { el.remove(); }); |
| 158 | + const subscriber_only = document.querySelectorAll('div.subscriber-only'); |
| 159 | + for (const elem of subscriber_only) { |
| 160 | + if (elem.classList.contains('encrypted-content') && dompurify_loaded) { |
| 161 | + const parser = new DOMParser(); |
| 162 | + const doc = parser.parseFromString('<div>' + DOMPurify.sanitize(unscramble(elem.innerText)) + '</div>', 'text/html'); |
| 163 | + const content_new = doc.querySelector('div'); |
| 164 | + elem.parentNode.replaceChild(content_new, elem); |
| 165 | + } |
| 166 | + elem.removeAttribute('style'); |
| 167 | + elem.removeAttribute('class'); |
| 168 | + } |
| 169 | + const banners = document.querySelectorAll('div.subscription-required, div.redacted-overlay, div.subscriber-hide, div.tnt-ads-container'); |
114 | 170 | banners.forEach(el => { el.remove(); }); |
| 171 | + const ads = document.querySelectorAll('div.tnt-ads-container, div[class*="adLabelWrapper"]'); |
| 172 | + ads.forEach(el => { el.remove(); }); |
| 173 | + const recommendations = document.querySelectorAll('div[id^="tncms-region-article"]'); |
| 174 | + recommendations.forEach(el => { el.remove(); }); |
115 | 175 | }); |
116 | 176 | </script> |
117 | | -
|
118 | | -- domain: medium.com |
119 | | - headers: |
120 | | - referer: https://t.co/x?amp=1 |
121 | | - x-forwarded-for: none |
122 | | - user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 |
123 | | - content-security-policy: script-src 'self'; |
124 | | - cookie: |
| 177 | + tests: |
| 178 | + - url: https://www.wellandtribune.ca/news/niagara-region/niagara-transit-commission-rejects-council-request-to-reduce-its-budget-increase/article_e9fb424c-8df5-58ae-a6c3-3648e2a9df66.html |
| 179 | + test: document.querySelector('div.subscriber-offers') === null |
125 | 180 |
|
126 | 181 | # loads amp version of page |
127 | 182 | - domain: tagesspiegel.de |
|
132 | 187 | query: |
133 | 188 | - key: amp |
134 | 189 | value: 1 |
| 190 | + tests: |
| 191 | + url: https://www.tagesspiegel.de/politik/impfungen-in-deutschland-und-der-welt-der-aktuelle-stand-der-impfkampagne/26809888.html |
| 192 | + test: document.querySelector('html').classList.contains('amp-mode') |
135 | 193 |
|
136 | 194 | - domain: www.nzz.ch |
137 | 195 | paths: |
|
157 | 215 | removeDOMElement(paywall) |
158 | 216 | }); |
159 | 217 | </script> |
| 218 | + tests: |
| 219 | + - url: https://www.nzz.ch/feuilleton/edward-w-said-der-ideologe-des-palaestinensischen-terrors-ld.1766658 |
| 220 | + test: document.querySelector('.dynamic-regwall') === null |
160 | 221 |
|
| 222 | +- domain: ft.com |
| 223 | + headers: |
| 224 | + referer: https://t.co/x?amp=1 |
| 225 | + content-security-policy: "default-src * 'unsafe-inline' 'unsafe-eval' data: blob:;" |
| 226 | + injections: |
| 227 | + - position: head |
| 228 | + append: | |
| 229 | + <script> |
| 230 | + document.addEventListener("DOMContentLoaded", () => { |
| 231 | + const styleTags = document.querySelectorAll('link[rel="stylesheet"]'); |
| 232 | + styleTags.forEach(el => { |
| 233 | + const href = el.getAttribute('href').substring(1); |
| 234 | + const updatedHref = href.replace(/(https?:\/\/.+?)\/{2,}/, '$1/'); |
| 235 | + el.setAttribute('href', updatedHref); |
| 236 | + }); |
| 237 | + setTimeout(() => { |
| 238 | + const cookie = document.querySelectorAll('.o-cookie-message, .js-article-ribbon, .o-ads, .o-banner, .o-message, .article__content-sign-up'); |
| 239 | + cookie.forEach(el => { el.remove(); }); |
| 240 | + }, 1000); |
| 241 | + }) |
| 242 | + </script> |
| 243 | + tests: |
| 244 | + - url: https://www.ft.com/content/5348ec64-010e-40f4-a27e-6d1252a0c537 |
| 245 | + test: document.querySelector('.o-cookie-message') === null |
161 | 246 | - domains: |
162 | 247 | - myprivacy.dpgmedia.be |
163 | 248 | - myprivacy.dpgmedia.nl |
|
172 | 257 | user-agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; Googlebot-News; +http://www.google.com/bot.html) Chrome/121.0.6140.0 Safari/537.36 |
173 | 258 | x-forwarded-for: none |
174 | 259 | referer: https://news.google.com |
| 260 | + content-security-policy: "default-src * 'unsafe-inline' 'unsafe-eval' data: blob:;" |
175 | 261 | regexRules: |
176 | 262 | - match: (\s&&\s)?window\.temptation(\s&&\s)?(\.init)?(\s&&\s)?(\(([^)]\s*)*\);)? |
177 | 263 | replace: true |
|
187 | 273 | document.querySelector('div[data-advert-placeholder-collapses]').remove(); |
188 | 274 | }); |
189 | 275 | </script> |
| 276 | + tests: |
| 277 | + - url: https://www.demorgen.be/nieuws/verkiezingen-2024-zullen-uitdraaien-op-een-strijd-tussen-vivaldi-en-bourgeois-blok~b0f7b8a9/ |
| 278 | + test: document.querySelector('div[data-temptation-position="ARTICLE_BOTTOM"]') === null |
190 | 279 |
|
191 | | -- domain: www.ft.com |
| 280 | +- domains: |
| 281 | + - apache.be |
192 | 282 | headers: |
193 | | - referer: https://t.co/x?amp=1 |
| 283 | + x-forwarded-for: none |
| 284 | + cookie: cookiesjsr=%7B%22base%22%3Afalse%2C%22functional%22%3Afalse%2C%22video%22%3Afalse%7D |
194 | 285 | injections: |
195 | 286 | - position: head |
196 | 287 | append: | |
197 | 288 | <script> |
198 | 289 | document.addEventListener("DOMContentLoaded", () => { |
199 | | - const styleTags = document.querySelectorAll('link[rel="stylesheet"]'); |
200 | | - styleTags.forEach(el => { |
201 | | - const href = el.getAttribute('href').substring(1); |
202 | | - const updatedHref = href.replace(/(https?:\/\/.+?)\/{2,}/, '$1/'); |
203 | | - el.setAttribute('href', updatedHref); |
204 | | - }); |
205 | | - setTimeout(() => { |
206 | | - const cookie = document.querySelectorAll('.o-cookie-message, .js-article-ribbon, .o-ads, .o-banner, .o-message, .article__content-sign-up'); |
207 | | - cookie.forEach(el => { el.remove(); }); |
208 | | - }, 1000); |
209 | | - }) |
| 290 | + // remove paywall |
| 291 | + document.querySelector("#spb-block-apachepopupblock").remove(); |
| 292 | + // restore scrolling |
| 293 | + document.body.style.overflow = "auto"; |
| 294 | + }); |
| 295 | + </script> |
| 296 | + tests: |
| 297 | + - url: https://apache.be/2024/03/25/chinese-spionkop-van-vlaams-belang |
| 298 | + test: document.querySelector('#spb-block-apachepopupblock') === null |
| 299 | + |
| 300 | +- domains: |
| 301 | + - kw.be |
| 302 | + headers: |
| 303 | + x-forwarded-for: none |
| 304 | + referer: https://news.google.com |
| 305 | + user-agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; Googlebot-News; +http://www.google.com/bot.html) Chrome/121.0.6140.0 Safari/537.36 |
| 306 | + injections: |
| 307 | + - position: head |
| 308 | + append: | |
| 309 | + <script> |
| 310 | + document.addEventListener("DOMContentLoaded", () => { |
| 311 | + // remove paywall |
| 312 | + document.querySelector("#paywall-modal").remove(); |
| 313 | + }); |
| 314 | + </script> |
| 315 | + - position: head |
| 316 | + append: | |
| 317 | + <script> |
| 318 | + document.addEventListener("scroll", () => { |
| 319 | + // reset overflow |
| 320 | + let htmlObject = document.getElementsByTagName("html")[0]; |
| 321 | + htmlObject.classList.remove("is-locked", "has-paywall"); |
| 322 | + htmlObject.style.overflow = "auto"; |
| 323 | + }); |
210 | 324 | </script> |
| 325 | + tests: |
| 326 | + - url: https://kw.be/nieuws/criminaliteit/geweld/in-40-jaar-nog-nooit-meegemaakt-chauffeur-meense-touroperator-krijgt-slag-in-gezicht-na-aanrijding-in-frankrijk/ |
| 327 | + test: document.querySelector('#paywall-modal') === null |
211 | 328 |
|
0 commit comments