From 95a9a99801c1fd838df1ec50215ba0738e5dce5c Mon Sep 17 00:00:00 2001 From: Amit Nandi Date: Fri, 4 Apr 2025 22:20:54 +0530 Subject: [PATCH] chrome branch code up --- LICENSE | 21 + LICENSE.txt | 21 + README.html | 1100 ++ README.md | 1239 +++ allowlist/Brave-macos-allowlist.mobileconfig | 63 + allowlist/Brave-windows-allowlist.reg | 3 + allowlist/Chrome-macos-allowlist.mobileconfig | 63 + allowlist/Chrome-windows-allowlist.reg | 3 + allowlist/Edge-macos-allowlist.mobileconfig | 63 + allowlist/Edge-windows-allowlist.reg | 3 + allowlist/Edge-windows-forcelist-undo.reg | 3 + allowlist/Edge-windows-forcelist.reg | 3 + allowlist/README.html | 66 + allowlist/README.md | 46 + allowlist/bypass_paywalls_clean_allowlist.ps1 | 39 + background.js | 2222 ++++ bypass-dark.png | Bin 0 -> 654 bytes bypass.png | Bin 0 -> 693 bytes changelog.txt | 3158 ++++++ contentScript.js | 9389 +++++++++++++++++ contentScript_once.js | 237 + contentScript_once_var.js | 106 + custom/manifest.json | 39 + custom/mv2/manifest.json | 33 + custom/sites_custom.json | 1368 +++ lib/empty.js | 0 lib/purify.min.js | 4 + manifest.json | 940 ++ options/clearCookies.js | 48 + options/htmlviewer.js | 155 + options/offscreen.html | 2 + options/offscreen.js | 19 + options/optin/opt-in.css | 7 + options/optin/opt-in.html | 56 + options/optin/opt-in.js | 112 + options/options.html | 51 + options/options.js | 228 + options/options_all.css | 21 + options/options_custom.html | 70 + options/options_custom.js | 560 + options/options_excluded.html | 33 + options/options_excluded.js | 52 + options/popup.html | 33 + options/popup.js | 170 + options/popup_switch.css | 58 + options/toggleIcon.js | 5 + options/version.js | 79 + sites.js | 3528 +++++++ sites_updated.json | 74 + updates.xml | 6 + 50 files changed, 25599 insertions(+) create mode 100644 LICENSE create mode 100644 LICENSE.txt create mode 100644 README.html create mode 100644 README.md create mode 100644 allowlist/Brave-macos-allowlist.mobileconfig create mode 100644 allowlist/Brave-windows-allowlist.reg create mode 100644 allowlist/Chrome-macos-allowlist.mobileconfig create mode 100644 allowlist/Chrome-windows-allowlist.reg create mode 100644 allowlist/Edge-macos-allowlist.mobileconfig create mode 100644 allowlist/Edge-windows-allowlist.reg create mode 100644 allowlist/Edge-windows-forcelist-undo.reg create mode 100644 allowlist/Edge-windows-forcelist.reg create mode 100644 allowlist/README.html create mode 100644 allowlist/README.md create mode 100644 allowlist/bypass_paywalls_clean_allowlist.ps1 create mode 100644 background.js create mode 100644 bypass-dark.png create mode 100644 bypass.png create mode 100644 changelog.txt create mode 100644 contentScript.js create mode 100644 contentScript_once.js create mode 100644 contentScript_once_var.js create mode 100644 custom/manifest.json create mode 100644 custom/mv2/manifest.json create mode 100644 custom/sites_custom.json create mode 100644 lib/empty.js create mode 100644 lib/purify.min.js create mode 100644 manifest.json create mode 100644 options/clearCookies.js create mode 100644 options/htmlviewer.js create mode 100644 options/offscreen.html create mode 100644 options/offscreen.js create mode 100644 options/optin/opt-in.css create mode 100644 options/optin/opt-in.html create mode 100644 options/optin/opt-in.js create mode 100644 options/options.html create mode 100644 options/options.js create mode 100644 options/options_all.css create mode 100644 options/options_custom.html create mode 100644 options/options_custom.js create mode 100644 options/options_excluded.html create mode 100644 options/options_excluded.js create mode 100644 options/popup.html create mode 100644 options/popup.js create mode 100644 options/popup_switch.css create mode 100644 options/toggleIcon.js create mode 100644 options/version.js create mode 100644 sites.js create mode 100644 sites_updated.json create mode 100644 updates.xml diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ab20918 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020, magnolia1234 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..ab20918 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020, magnolia1234 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.html b/README.html new file mode 100644 index 0000000..9006b51 --- /dev/null +++ b/README.html @@ -0,0 +1,1100 @@ + + + + + + README.md + + + +

Bypass Paywalls Clean for Chrome

+

Extension allows you to read articles from (supported) sites that implement a paywall.
+You can also add a domain as custom site and try to bypass the paywall.
+Weekly updates are released for fixes and new sites.

+ +

Installation

+

This extension is not available on the Google Chrome Web Store.
+The following instructions are needed to install third-party extensions in Chromium-based desktop browsers.
+In extension developer mode you can always install BPC by Load unpacked (latest master, but no automatic updates) or by crx-file (latest release & automatic updates, but possibly you have to add the extension to the allowlist).
+You can add/pin the extension icon to the toolbar with the toolbar extensions menu (jigsaw puzzle shaped icon).

+

Load unpacked: Chrome, MS Edge or Brave (all desktop)

+ +
    +
  1. Download this repository as a zip-file from GitFlic.
  2. +
  3. Unzip the file and you should have a folder named bypass-paywalls-chrome-clean-master
  4. +
  5. Move the folder to a permanent location on your computer (do not delete the folder after installation).
  6. +
  7. Go to the extensions page: chrome://extensions
  8. +
  9. Enable Developer Mode.
  10. +
  11. Click Load unpacked and select/open the extension folder (contains file manifest.json).
  12. +
+ +

CRX-file: other Chromium browsers (Opera/Vivaldi/Yandex)

+ +
    +
  1. Download the latest release as crx-file from GitFlic
  2. +
  3. In your browser go to the extensions page: chrome://extensions
  4. +
  5. Enable Developer Mode.
  6. +
  7. Drag your crx-file anywhere on the page to import it (when you have an active 'load unpacked' installation, first remove it (and backup your custom sites); for automatic updates).
  8. +
+ +

Update

+

For crx-installation: extension will update automatically or check for updates (in chrome://extensions).
+Extension may be disabled (in Chrome/Edge) when extension needs new host permissions for added domains: opt-in/opt-out to custom sites once to disable this 'error' (browser will remember granted host permissions).

+

For zip-installation (load unpacked/developer mode): unzip files to installation folder (& reload extension).

+

You can also check for (post-release) updates of site rules at startup (opt-in); only available until about 10 days after fix-release.
+For new (updated) sites you also have to opt-in to custom sites/request host permissions for new domains (or wait for new release).

+

Android

+

Install Quetta Browser from the Google PlayStore. You have two options:

+ +

* for custom sites use kiwi-custom crx-file (no grant of host permissions on Android).
+* Quetta Browser may disable the extension on update (of host permissions): re-enable it or install the kiwi-custom crx-file.
+* Kiwi Browser is officially abandoned (& final update to Chrome v132), but this extension will still be updated.

+

Firefox

+

Visit the Firefox repository on GitFlic of Bypass Paywalls Clean.
+Or install latest release as xpi-file from GitFlic

+

iOS/iPadOS

+

Use adblocker with custom (content)filter & userscript (manager): Bypass Paywalls Clean filters (read instructions).

+

Although Orion Browser supports installing this extension, it won't work for a lot of sites (no full support of WebExtensions API on iOS/iPadOS).

+

Troubleshooting

+ +

+ Go to top +

+

List of supported websites

+

+ * free articles only. +

+
National USA news
+

+ Reuters - +The New York Times - +The Washington Post

+
Business
+

+ Adweek - +American Affairs - +Barron's - +Benzinga - +Bloomberg - +Business Insider - +Citywire - +CNBC - +Fast Company - +Forbes - +Fortune - +Harvard Business Review - +Inc.com - +MarketWatch - +MIT Sloan Management Review - +Quartz - +S&P Global - +Stock News - +The Business Journals* - +The Business of Fashion - +The Wall Street Journal - +Vogue Business - +ZeroHedge

+

Grouped in options:
American Banker (+ Arizent; opt-in to custom sites)
BNP Media sites (opt-in to custom sites)
Bridge Tower Media sites (opt-in to custom sites)
California Business Journals sites like
Los Angeles Business Journal - +Orange County Business Journal - +San Diego Business Journal - +San Fernando Valley Business Journal
Crain Communications sites like
Ad Age - +Automotive News - +Crain's Chicago Business - +Crain's Cleveland Business - +Crain's Detroit Business - +Crain's Grand Rapids Business - +Crain's New York Business - +Modern Healthcare - +Pensions & Investments
+Global Polymer Group: +European Rubber Journal - +Plastics News - +Rubber News - +Sustainable Plastics - +Tire Business - +Urethanes Technology International
Digiday Media sites like
Digiday - +Glossy - +ModernRetail
Industry Dive sites (opt-in to custom sites)
Inside Retail sites (opt-in to custom sites)
PEI Media sites (opt-in to custom sites)

+
Tech/Science
+

+ Brill - +Bulletin of the Atomic Scientists - +Chemical & Engineering News - +Discover Magazine - +History Today - +Inside Higher Ed - +Interesting Engineering - +Medscape - +MIT Technology Review - +National Geographic USA - +Nautilus - +New Scientist - +Popular Science - +Science* - +ScienceNews.org - +Scientific American - +StatNews - +The Scientist - +Times Higher Education

+

Grouped in options:
Crain Communications sites like
360Dx - +GenomeWeb - +Precision Medicine Online
TechTarget Group sites like
Computer Weekly - +TechTarget
The Chronicle sites like
The Chronicle of Higher Education - +The Chronicle of Philanthropy

+
Encyclopedia/Book library/Knowledge base
+

+ BBC History Extra - +Encyclopedia Britannica - +eNotes - +Glassdoor - +Loeb Classical Library - +Philosophy Now - +Quora - +Scholastic - +SlideShare - +Study.com (only lessons; no videos)

+
Sports
+

+ CyclingNews - +ESPN USA - +Rivals - +RugbyPass - +Sports Illustrated - +The Athletic

+
Magazines/Blogs
+

Grouped in options:
Medium (custom) domains like (opt-in to custom sites for unlisted)
Medium - +Better Programming - +Towards Data Science

+

+ America's Test Kitchen - +American Purpose - +Apollo Magazine - +Artforum - +Artnet - +Atavist Magazine - +Axios - +Commentary Magazine - +Defector - +Dwell - +Field & Stream - +First Things - +Foreign Affairs - +Foreign Policy - +Harper's Magazine - +Jazzwise - +National Review - +Newsweek - +Outdoor Life - +Paste Magazine - +Pirate Wires - +Politico - +Project Syndicate - +Puck.news - +Slate - +SofRep - +Stereogum - +Stratfor - +Texas Monthly - +The American Conservative - +The American Interest - +The American Scholar - +The Art Newspaper - +The Atlantic - +The Baffler - +The Christian Science Monitor - +The Daily Beast - +The Daily Wire - +The Diplomat - +The Dispatch - +The Impression - +The Intercept - +The Juggernaut - +The Lamp Magazine - +The Nation - +The New Atlantis - +The New Criterion - +The New Republic - +The New York Review of Books - +The Point Magazine - +The Spectator World - +The Verge - +The Week - +The Wrap - +Vice - +Vox - +Washington Examiner

+

Grouped in options:
Condé Nast magazines sites like
Architectural Digest - +Bon Appétit - +British Vogue - +Condé Nast Traveler - +Epicurious - +GC - +The New Yorker - +Vanity Fair - +Vogue USA - +Wired
Hearst Communications magazines sites like
Bicycling - +Cosmopolitan - +Country Living - +Delish - +Elle Decor - +Elle USA - +Esquire - +Good Housekeeping - +Harper's Bazaar - +House Beautiful - +Men's Health - +Oprah Daily - +Popular Mechanics - +Prevention - +Road & Track - +Runner's World - +Town & Country - +Women's Health
Outside magazines sites like
Backpacker - +Beta - +Better Nutrition - +Clean Eating - +Climbing - +Outside - +Oxygen - +SKI - +Trail Runner - +Triathlete - +Vegetarian Times - +Women's Running - +Yoga Journal
Penske Media Corporation sites like
Billboard - +Rolling Stone - +Sourcing Journal - +Sportico - +Variety - +WWD
The Epoch Times sites like (opt-in to custom sites for br|cz|de|fr|jp|ro sites)
Epoch.org.il - +The Epoch Times

+
Local USA news
+

+ Albuquerque Journal - +CNN - +Fox News - +Honolulu Star-Advertiser - +Las Vegas Review-Journal - +Los Angeles Times - +Mountain View Voice - +New York Magazine (+ Curbed, Grub Street, The Cut & Vulture) - +Newsday - +Palo Alto Online - +Pittsburgh Post Gazette - +Star Tribune - +Tampa Bay Times - +The Baltimore Banner - +The Boston Globe - +The Columbian - +The Dallas Morning News - +The Hill - +The New York Sun - +The Salt Lake Tribune - +The San Francisco Standard - +The Seattle Times - +The Philadelphia Inquirer

+

+ USA Today +
+Grouped in options:
Advance Local sites like
AL/Alabama - +MLive/Michigan - +NJ/New Jersey - +Staten Island Advance - +The Express-Times - +The Oregonian - +The Patriot-News - +The Plain Dealer - +The Post-Standard - +The Republican
CNHI Group sites (opt-in to custom sites)
Forum Communications sites (opt-in to custom sites)
Gannett Group (local USA Today) sites like (opt-in to custom sites for unlisted)
Austin American-Statesman - +Democrat and Chronicle - +Detroit Free Press - +Knoxville News Sentinel - +Memphis Commercial Appeal - +Milwaukee Journal Sentinel - +The Arizona Republic - +The Cincinnati Enquirer - +The Columbus Dispatch - +The Courier-Journal - +The Des Moines Register - +The Detroit News - +The Florida Times-Union - +The Indianapolis Star - +The News-Press - +The Oklahoman - +The Record (North Jersey) - +The Tennessean
Hearst Communications (newspapers) sites like (opt-in to custom sites for unlisted)
Albany Times Union - +Connecticut Post - +Houston Chronicle - +New Haven Register - +San Antonio Express-News - +San Francisco Chronicle
Lee Enterprises Group sites like (opt-in to custom sites for unlisted)
Arizona Daily Star - +Lincoln Journal Star - +Omaha World-Herald - +Richmond Times-Dispatch - +St. Louis Post-Dispatch - +The Buffalo News - +The Times of Northwest Indiana - +Tulsa World - +Wisconsin State Journal - +Winston-Salem Journal
Maine Trust sites (opt-in to custom sites)
McClatchy Group sites like (opt-in to custom sites for unlisted)
Belleville News-Democrat - +El Nuevo Herald - +Fort Worth Star-Telegram - +Lexington Herald-Leader - +McClatchy DC - +Miami Herald - +The Charlotte Observer - +The Fresno Bee - +The Kansas City Star - +The News & Observer - +The Sacramento Bee - +The State - +The Wichita Eagle - +Tri-City Herald
MediaNews Group sites like (opt-in to custom sites for unlisted/local sites)
Boston Herald - +East Bay Times - +Orange County Register - +San Diego Union Tribune - +St. Paul Pioneer Press - +The Denver Post - +The Mercury News - +The Press-Enterprise
The Atlanta Journal-Constitution + Cox First Media (opt-in to custom sites)
The (New Orleans) Advocate Group sites like
The Advocate - +The New Orleans Advocate/The Times-Picayune - +The Shreveport-Bossier City Advocate
TownNews sites (Blox CMS) (opt-in to custom sites)
Tribune Publishing Company sites like
Baltimore Sun - +Capital Gazette - +Chicago Tribune - +Daily Press - +Hartford Courant - +New York Daily News - +Orlando Sentinel - +SunSentinel - +The Morning Call - +The Virginian-Pilot

+

Canada

+

+ iPolitics - +Le Devoir - +The Globe and Mail - +The Hill Times - +Winnipeg Free Press

+

Grouped in options:
Groupe Capitales Médias sites like (opt-in to custom sites for unlisted)
Le Soleil
Groupe Québecor sites like
Le Journal de Montréal - +Le Journal de Québec
Postmedia Network sites like (opt-in to custom sites for unlisted)
Calgary Herald - +Financial Post - +National Post - +The Province - +Toronto Sun - +Vancouver Sun
TorStar sites like
The Toronto Star and regional sites +Niagara Falls Review - +Peterborough Examiner - +St. Catharines Standard - +The Hamilton Spectator - +Waterloo Region Record - +Welland Tribune
Valnet Group sites (opt-in to custom sites)

+

Europe

+

+ Balkan Insight - +Bloomberg Adria - +EUobserver - +Follow the Money (ftm.eu)

+
United Kingdom/Ireland
+

+ Autocar - +Autosport* - +Belfast Telegraph - +Business Post - +Decanter - +Evening Standard - +Financial News - +Financial Times - +GB News - +Granta Magazine - +iNews - +Investors' Chronicle - +Irish Independent - +Literary Review - +London Review of Books - +Monocle - +Motor Sport Magazine - +Prospect Magazine - +Stylist - +Tes Magazine - +The Critic - +The Economist - +The Irish Examiner - +The Irish News - +The Irish Times - +The Lawyer - +The New European - +The New Statesman - +The Spectator - +The Telegraph - +The Times - +The Times Literary Supplement - +UnHerd

+

Grouped in options:
Daily Mail Group sites like
Daily Mail - +Mail on Sunday - +This is Money
DVV Media International sites (opt-in to custom sites)
Haymarket Media Group sites (opt-in to custom sites)
Haymarket Medical Network sites (opt-in to custom sites)
National World Publishing sites like (opt-in to custom sites for unlisted)
The Scotsman - +Yorkshire Post
Oxford University Press sites (opt-in to custom sites)*
Newsquest Media Group sites (opt-in to custom sites)
The Independent Group sites like
The Independent UK - +The Independent USA
The Stage Media sites like:
The Bookseller - +The Stage
William Reed Group sites (opt-in to custom sites)
The Sun Group sites like
The Scottish Sun - +The Sun UK

+
Bulgaria
+

+ Capital - +Dnevnik

+
Czechia
+

+ Deník +

+
Denmark
+

+ Berlingske +

+

Grouped in options:
DK Medier sites (opt-in to custom sites)

+
Finland
+

+ Suomen Sotilas +

+
France/Wallonia
+

+ 60 Millions de consommateurs - +Actu.fr - +Alternatives Economiques - +Atlantico - +Auto Hebdo - +Auto Plus - +Capital - +Causeur - +Challenges - +Charlie Hebdo - +Connaissance des Arts - +Cosmopolitan - +Courrier international - +Elle - +Esprit - +Jeune Afrique - +L'Écho - +L'Équipe - +L'Express - +L'Informé - +L'Oeil de la Photographie (fr/en) - +L'Opinion - +La Croix - +La Nouvelle République du Centre-Ouest - +Le Courrier des Stratèges - +Le Figaro - +Le Grand Continent - +Le Journal du Dimanche - +Le Journal du Net - +Le Monde - +Le Nouvel Economiste - +Le Parisien - +Le Point - +Le Revenu - +Le Télégramme - +Le Un - +Les Échos - +Les Inrockuptibles - +Libération - +Marianne - +Paris Match - +Philonomist (fr/en) - +Philosophie Magazine - +Politis - +Pour l'Éco - +Pour la Science - +Public - +Réforme - +Revue Conflits - +Science & Vie - +Sciences et Avenir - +Sciences Humaines - +Télérama - +Valeurs Actuelles - +XXI

+

Grouped in options:
Groupe Centre France sites like (opt-in to custom sites for unlisted)
La Montagne
Groupe Infopro Digital sites like (opt-in to custom sites for unlisted)
L'Usine Nouvelle
Groupe IPM sites like
DH Les Sports+ - +L'Avenir - +La Libre
Groupe La Dépêche sites like
Centre Presse - +Journal de Millau - +L'Indépendant - +La Dépêche du Midi - +La Nouvelle République des Pyrénées - +Le Petit Bleu d'Agen - +Midi Libre - +Midi Olympique
Groupe Nice-Matin sites like
Monaco-Matin - +Nice-Matin - +Var-Matin
Groupe Profession Santé sites like
Le Quotidien du Médecin - +Le Quotidien du Pharmacien
Groupe Sud Ouest sites like
Charente libre - +La République des Pyrénées - +Sud Ouest
Groupe SynerJ Media sites (opt-in to custom sites)
Roularta Media Group sites like
Femmes d'Aujourd'hui - +Flair.be - +Le Vif
TechTarget Group sites like
LeMagIT

+
Germany/Austria
+

+ Aachener Zeitung - +Ärzte Zeitung - +Automobilwoche - +Berliner Zeitung - +Bild - +Börsen-Zeitung - +Cicero - +Der Freitag - +Der Spiegel - +Der Tagesspiegel - +Die Rheinpfalz - +Die Welt - +Die Zeit - +Frankfurter Allgemeine Zeitung - +Hamburger Morgenpost - +Handelsblatt - +Heise online - +Jacobin Magazin - +Kölner Stadt-Anzeiger - +Kölnische Rundschau - +Krautreporter - +Kurier.at - +Manager Magazin - +Neue Westfälische - +Nordwest Zeitung - +Philosophie Magazin - +Piqd - +Profil.at - +Spektrum - +Springer Medizin - +Süddeutsche Zeitung - +Südkurier - +T3n - +Tiroler Tageszeitung - +Vorarlberg Nachrichten - +Vorarlberg Online - +Weltkunst - +Weser-Kurier

+

Grouped in options:
Deutscher Fachverlag Mediengruppe (opt-in to custom sites)
Funke Mediengruppe sites like
Berliner Morgenpost - +Braunschweiger Zeitung - +Hamburger Abendblatt - +Iserlohner Kreisanzeiger und Zeitung - +Neue Ruhr Zeitung - +Ostthüringer Zeitung - +Thüringer Allgemeine - +Thüringische Landeszeitung - +Westdeutsche Allgemeine Zeitung - +Westfalenpost - +Westfälische Rundschau
Haas Mediengruppe sites like (opt-in to custom sites for unlisted)
Mannheimer Morgen
Ippen.media sites like (opt-in to custom sites for unlisted)
Frankfurter Rundschau - +Münchner Merkur - +Oberbayerisches Volksblatt
Landwirtschaftsverlag sites like
Profi.de - +Top Agrar - +Wochenblatt für Landwirtschaft & Landleben
Madsack Mediengruppe sites like (opt-in to custom sites for unlisted)
Hannoversche Allgemeine Zeitung - +Kieler Nachrichten - +Leipziger Volkszeitung - +Lübecker Nachrichten - +Märkische Allgemeine - +Neue Presse (Hannover) - +Ostsee-Zeitung - +RedaktionsNetzwerk Deutschland - +Sächsische Zeitung
Media Group Westfalen sites like (opt-in to custom sites for unlisted)
Ruhr Nachrichten
Motor Presse Stuttgart sites like
Aerokurier - +Auto Motor und Sport - +Flug Revue - +Motorrad - +Women's Health
NOZ/MHN Mediengruppe sites like
Neue Osnabrücker Zeitung - +Schleswig-Holsteinischer Zeitungsverlag
+Rheinische Post Mediengruppe like
General-Anzeiger Bonn - +Rheinische Post - +Saarbrücker Zeitung - +Trierischer Volksfreund
Verlagsgruppe Rhein Main sites like (opt-in to custom sites for unlisted)
Allgemeine Zeitung (Mainz) - +Darmstädter Echo - +Wiesbadener Kurier

+
Greece
+

+ Kathimerini +

+
Italy
+

+ Corriere della Sera - +Corriere dello Sport - +Domani - +Eastwest - +Il Fatto Quotidiano - +Il Foglio - +Il Manifesto - +Il Sole 24 Ore (24+) - +Internazionale - +Italia Oggi - +La Gazzetta dello Sport - +Milano Finanza - +Sky Sport - +Sky TG24 - +Tuttosport

+

Grouped in options:
Gruppo GEDI.it sites like
Huffingtonpost.it - +Italian.tech - +La Repubblica - +La Stampa - +Le Scienze - +Moda & Beauty

+

+ Il Messaggero and regional sites like +Corriere Adriatico - +Il Gazzettino - +Il Mattino - +Quotidiano di Puglia

+

+ Quotidiano Nazionale and regional sites like +Il Giorno - +Il Resto del Carlino - +Il Telegrafo Livorno - +La Nazione

+

+ + Gruppo SAE.it + * sites like (opt-in to custom sites for unlisted)
Il Tirreno* - +La Nuova Sardegna*

+
Netherlands/Flanders
+

+ Business AM - +Business Insider Nederland - +De Tijd - +Doorbraak - +Follow the Money - +Groene Amsterdammer - +Het Laatste Nieuws - +Linda - +NRC Handelsblad - +Telegraaf - +Vrij Nederland

+

Grouped in options:
Algemeen Dagblad (+ regional/ADR) sites like
Algemeen Dagblad - +BN DeStem - +Brabants Dagblad - +Eindhovens Dagblad - +Gelderlander - +PZC - +Stentor - +Tubantia
DPG Media (not ADR) sites like
De Morgen - +De Volkskrant - +Flair.nl - +Humo - +Libelle.nl - +Margriet - +Parool - +Trouw
Mediahuis België sites like
De Standaard - +Gazet van Antwerpen - +Het Belang van Limburg - +Het Nieuwsblad
Mediahuis Noord sites like (opt-in to custom sites for unlisted)
Dagblad van het Noorden - +Leeuwarder Courant
ProMedia Group sites (opt-in to custom sites)
Roularta Media Group sites like
Artsenkrant - +Beleggers Belangen - +Flair.be - +Knack - +Krant van West-Vlaanderen - +Libelle.be

+
Norway
+

+ Bergens Tidende - +Dagsavisen
+Grouped in options:
DN Media Group sites like
DN - +Europower - +Fiskeribladet - +Hydrogen Insight - +Intrafish - +Intrafish.no - +Recharge - +TradeWinds - +Upstream

+
Poland
+

+ Polityka - +Puls Biznesu

+

Grouped in options:
GremiMedia.pl Group sites like
Parkiet - +Rzeczpospolita
Ringier Axel Springer Polska sites like
Auto Swiat - +Business Insider - +Forbes - +Komputer Swiat - +Newsweek - +Onet
Wyborcza Group sites like
Magazyn-kuchnia.pl - +Wyborcza.biz - +Wyborcza.pl - +Wysokieobcasy.pl

+
Portugal
+

+ Diário de Notícias - +Expresso - +Observador - +Record - +Sábado

+
Russia
+

+ Wonderzine +

+
Spain
+

+ Diario de Navarra - +El Confidencial - +El Diario.es - +El Español - +El País - +La Vanguardia - +Mundo Deportivo - +Política Exterior - +Público

+

Grouped in options:
ARA sites like
Ara.cat - +Ara Balears
Grupo Prensa Ibérica sites like (opt-in to custom sites for unlisted)
Diario de Mallorca - +El Día - +El Periódico de Catalunya - +El Periódico de España - +Faro de Vigo - +Información - +La Nueva España - +La Provincia - +Levante-EMV - +Mallorca Zeitung - +Superdeporte
Grupo Unidad Editorial sites like
El Mundo - +Expansión - +Marca
Grupo Vocento sites like
ABC - +Canarias7 - +El Comercio - +El Correo - +El Diario Montañés - +El Diario Vasco - +El Norte de Castilla - +Hoy - +Ideal - +La Rioja - +La Verdad - +La Voz de Cádiz - +Las Provincias - +Sur

+

+ + Sport Life Ibérica + sites (opt-in to custom sites)

+
Sweden
+

+ Dagens ETC - +NyTeknik

+

Grouped in options:
Bonnier News Group sites like (opt-in to custom sites for unlisted)
Dagens Medicin - +Dagens Nyheter - +Helsingborgs Dagblad - +Sydsvenskan
NWT Media sites (opt-in to custom sites)

+
Switzerland
+

+ Neue Zürcher Zeitung - +Schweizer Monat - +The Market

+

Grouped in options:
CH Media sites like (opt-in to custom sites for unlisted)
Aargauer Zeitung - +Luzerner Zeitung - +St. Galler Tagblatt
Ringier Gruppe sites like
Blick - +Beobachter - +Handelszeitung
TAmedia sites like (opt-in to custom sites for unlisted)
24 heures - +Basler Zeitung - +Berner Zeitung - +Der Bund - +Tages-Anzeiger - +Tribune de Genève

+

Grouped in options:
Groupe ESH Médias sites like
ArcInfo - +La Côte - +Le Nouvelliste

+
Ukraine
+

+ Forbes - +New Voice

+

Africa

+
Kenya
+

+ The Standard +

+

Grouped in options:
Nation Media Group sites like (opt-in to custom sites for unlisted)
Business Daily - +Daily Nation

+
Australia/New Zealand
+

+ BusinessDesk - +Forbes Australia - +Inkl - +MacroBusiness - +New Zealand Herald - +The Saturday Paper - +The Spectator Australia - +The West Australian (+ regional/opt-in to custom sites)

+

Grouped in options:
Australia News Corp sites like
Cairns Post - +Code Sports - +Geelong Advertiser - +Gold Coast Bulletin - +Herald Sun - +The Advertiser/AdelaideNow - +The Australian - +The Chronicle - +The Courier-Mail - +The Daily Telegraph - +The Mercury Tasmania - +The Weekly Times - +Townsville Bulletin
Australia Nine Entertainment sites like
Brisbane Times - +The Age - +The Australian Financial Review - +The Sydney Morning Herald - +WAtoday
Australian Community Media sites like (opt-in to custom sites for unlisted)
Bendigo Advertiser - +Central Western Daily - +Daily Liberal - +Illawarra Mercury - +Newcastle Herald - +The Advocate - +The Border Mail - +The Canberra Times - +The Courier - +The Daily Advertiser - +The Examiner - +The Northern Daily Leader - +The Standard - +Western Advocate
InvestSmart sites like
InvestSmart - +Intelligent Investor
McPherson Media Group sites (opt-in to custom sites)
Private Media sites like
Crikey - +Smart Company - +The Mandarin

+
China, Hong Kong & Taiwan
+

+ CommonWealth Magazine Taiwan* - +DigiTimes Asia - +South China Morning Post - +Southern Weekly - +The News Lens

+
India
+

+ Bar and Bench - +Bhaskar - +Business Standard - +Hindustan Times - +Inc42 - +India Today - +Live Law - +LiveMint - +Malayala Manorama - +Mid-Day - +Newslaundry - +NDTV Profit - +Outlook - +Outlook Business - +Swarajyamag - +The Economic Times (ET Prime) - +The Financial Express - +The Hindu - +The Hindu BusinessLine - +The Indian Express - +The Leaflet - +The News Minute - +The Quint - +Times of India - +Vikatan

+
Indonesia
+

+ Kompas - +Tempo

+
Israel
+

+ Globes - +The Jerusalem Post - +Ynet

+

Grouped in options:
Haaretz Group sites like
Haaretz.co.il - +Haaretz.com - +The Marker

+
Japan
+

+ Business Insider Japan - +Mainichi Shimbun - +Nikkei Asian Review - +The Japan Times

+
Singapore
+

+ Initium Media - +Tech in Asia
+Grouped in options:
SPH Media sites like
The Business Times - +The Straits Times

+

Latin America

+
Argentina
+

+ Ámbito - +El Cronista - +El Tribuno - +La Gaceta - +La Nación*

+

Grouped in options:
Grupo Clarín sites like
Clarín - +La Voz del Interior - +Los Andes - +Olé

+
Bolivia
+

+ El Deber +

+
Brazil
+

+ ABC Mais - +CartaCapital - +Correio do Povo - +Crusoé - +Estado de Minas - +Exame - +GaúchaZH - +Gazeta do Povo - +Grupo Abril - +Le Monde Diplomatique Brasil - +NSC Total - +O Estado de S. Paulo - +O Globo - +Revista Oeste - +Valor Econômico

+

Grouped in options:
UOL sites like
Folha de S. Paulo - +UOL

+
Chile
+

+ Diario Financiero - +El Mercurio (+ regional/opt-in to custom sites) - +La Tercera

+
Colombia
+

+ Cambio Colombia - +El Espectador - +El Tiempo

+
Ecuador
+

+ El Universo +

+
Mexico
+

+ El Universal - +Mexico News Daily

+
Peru
+

+ Grupo El Comercio sites like
Diario Correo - +El Comercio - +Gestión

+
Uruguay
+

+ El Observador - +El País - +La Diaria

+

+ * free articles only. +

+

+ Go to top +

+

Sites with limited number of free articles

+

The free article limit can normally be bypassed by removing cookies for the site.
+Click on the BPC-icon and then clear cookies-button in the popup (for unsupported sites grant host permission for domain).
+If removing the cookies works you can also add the site as a custom site.

+

New site requests

+

You can submit a request for a new website
+Please use the issue template, read the following instructions and share your results for a quicker process.
+Remember to check the previous requests before asking for a new website.

+
    +
  1. Open incognito window.
  2. +
  3. Clear cookies for the site (by this extension: opt-in to custom sites or grant host permission for the site; also enables blocking of general paywall scripts).
  4. +
  5. Disable JavaScript on the site (by browser, uBlock Origin or other extension).
  6. +
  7. Add the domain as custom site for more bypass options.
  8. +
  9. Open page in reader view (by browser or extension).
  10. +
  11. Try one of the archive sites.
  12. +
+

Add custom site

+

Add your own custom site/group (for group use comma-separated list; set domain like group_...).
+Check 'Options'-link in popup-menu and go to custom sites.
+* by default BPC has limited host permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for unlisted sites). You can also just request host permissions for the custom sites you've added yourself (or clear cookies (BPC-icon) to ask for host permission for current site).

+

By default sites' cookies/local storage are blocked/removed (for example to bypass article limit when metered paywall).

+

Additional custom options:

+ +

+ Download example list of custom sites +

+

Add excluded site

+

Add excluded sites/domains (for your subscriptions).
+You can also exclude a specific domain which is grouped in options.

+

Changelog-releases

+ +

License

+ +

Disclaimer

+ +

+ Go to top +

+ + diff --git a/README.md b/README.md new file mode 100644 index 0000000..b2b4dba --- /dev/null +++ b/README.md @@ -0,0 +1,1239 @@ +# Bypass Paywalls Clean for Chrome + +Extension allows you to read articles from (supported) sites that implement a paywall. +You can also add a domain as custom site and try to bypass the paywall. +Weekly updates are released for fixes and new sites. + +* [Installation](#installation) +* [Update](#update) +* [Android](#android) +* [Troubleshooting](#troubleshooting) +* [List of supported websites](#list-of-supported-websites) +* [Sites with limited number of free articles](#sites-with-limited-number-of-free-articles) +* [New site requests](#new-site-requests) +* [Add custom site](#add-custom-site) +* [Add excluded site](#add-excluded-site) +* [Changelog-releases](#changelog-releases) +* [License](#license) +* [Disclaimer](#disclaimer) + +### Installation +This extension is not available on the Google Chrome Web Store. +The following instructions are needed to install third-party extensions in [Chromium](https://en.wikipedia.org/wiki/Chromium_(web_browser))-based desktop browsers. +In extension developer mode you can always install BPC by *Load unpacked* (latest master, but no automatic updates) or by crx-file (latest release & automatic updates, but possibly you have to add the extension to the allowlist). +You can add/pin the extension icon to the toolbar with the toolbar extensions menu (jigsaw puzzle shaped icon). + +#### Load unpacked: Chrome, MS Edge or Brave (all desktop) +* or add extension to allowlist and install automatically updating crx-file (see next section) + +1. Download this repository as a zip-file from [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads/blob/raw?file=bypass-paywalls-chrome-clean-master.zip). +2. Unzip the file and you should have a folder named *bypass-paywalls-chrome-clean-master* +3. Move the folder to a permanent location on your computer (do not delete the folder after installation). +4. Go to the extensions page: *chrome://extensions* +5. Enable Developer Mode. +6. Click *Load unpacked* and select/open the extension folder (contains file manifest.json). + +* By default BPC has limited host permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for unlisted sites). You can also just request host permissions for the custom sites you added yourself (or *clear cookies* (BPC-icon) to ask for host permission for current site). + +#### CRX-file: other Chromium browsers (Opera/Vivaldi/Yandex) +* or add extension to allowlist for Chrome, MS Edge or Brave (see instructions [local](allowlist/README.html) or [online](https://gitflic.ru/project/magnolia1234/bypass-paywalls-chrome-clean/blob?file=allowlist%2FREADME.md)) + +1. Download the latest release as crx-file from [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads) +2. In your browser go to the extensions page: *chrome://extensions* +3. Enable Developer Mode. +4. Drag your crx-file anywhere on the page to import it (when you have an active 'load unpacked' installation, first remove it (and backup your custom sites); for automatic updates). + +* By default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for unlisted sites). You can also just request host permissions for the custom sites you added yourself (or *clear cookies* (BPC-icon) to ask for host permission for current site). + +### Update +For crx-installation: extension will update automatically or check for updates (in chrome://extensions).\ +Extension may be disabled (in Chrome/Edge) when extension needs new host permissions for added domains: opt-in/opt-out to custom sites once to disable this 'error' (browser will remember granted host permissions). + +For zip-installation (load unpacked/developer mode): unzip files to installation folder (& reload extension). + +You can also check for (post-release) updates of site rules at startup (opt-in); only available until about 10 days after fix-release.\ +For new (updated) sites you also have to opt-in to custom sites/request host permissions for new domains (or wait for new release). + +#### Android +Install [Quetta Browser](https://play.google.com/store/apps/details?id=net.quetta.browser) from the Google PlayStore. You have two options: +* load the latest release as crx-file from [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads) (auto-updating, no allowlist needed) +* install latest master zip-file (no automatic updates, for custom sites use manifest.json from custom folder). + +\* for custom sites use kiwi-custom crx-file (no grant of host permissions on Android).\ +\* Quetta Browser may disable the extension on update (of host permissions): re-enable it or install the kiwi-custom crx-file.\ +\* [Kiwi Browser](https://play.google.com/store/apps/details?id=com.kiwibrowser.browser) is officially abandoned (& final update to Chrome v132), but this extension will still be updated. + +#### Firefox +Visit the [Firefox repository on GitFlic](https://gitflic.ru/project/magnolia1234/bypass-paywalls-firefox-clean) of Bypass Paywalls Clean.\ +Or install latest release as xpi-file from [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads) + +#### iOS/iPadOS +Use adblocker with custom (content)filter & userscript (manager): [Bypass Paywalls Clean filters](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters) (read instructions). + +Although [Orion Browser](https://apps.apple.com/us/app/orion-browser-by-kagi/id1484498200) supports installing this extension, it won't work for a lot of sites (no full support of WebExtensions API on iOS/iPadOS). + +### Troubleshooting +* If a site doesn't work, first try to turn off your adblocker (or other extension) and refresh page. +* Make sure the (new) site is checked under Options. +* Clear cookies by extension's icon (popup) and grant host permission for site (or opt-in to custom sites) +* You will be logged out for some of the sites you have enabled. +* Make sure you're running the latest version of Bypass Paywalls Clean. +* archive.is/today will not work with Secured DNS by Cloudflare (or when you change referer/user-agent for the archive site) +* for Google Search/Inspection Tool test url, view tested page, copy html (tab) code to https://codebeautify.org/htmlviewer & *Open in New Window*: click BPC icon once to clean layout of page (or use tool for desktop & open screenshot in new tab) +* Some sites need to redirect to an amp-page (this may cause a redirect-loop by an amp-to-html extension or browser setting like in Kiwi Browser (Android) > Settings > Privacy and security > Remove AMP or in Quetta Browser (Android) > Settings > Privacy Guard > Advanced > Auto De-AMP). +* If none of these work, you can submit an issue on [GitHub](https://github.com/bpc-clone/bpc_chrome_support/issues) or only when GitHub repo is offline use [X (DM)](https://x.com/Magnolia1234B). +* Always provide used extension version, paywalled article (url) and describe issue in detail. +* This extension works best alongside the adblocker [uBlock Origin](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm). +* If you live in the EU, also consider adding these filters to your adblocker (in order to remove cookie warnings): [Easylist Cookies](https://secure.fanboy.co.nz/fanboy-cookiemonster.txt) | [I don't care about cookies custom filter](https://www.i-dont-care-about-cookies.eu/abp). Some sites need to set a consent-cookie for (social) media. + +[Go to top](#bypass-paywalls-clean-for-chrome) + +### List of supported websites + +_* free articles only._ + +##### National USA news +[Reuters](https://www.reuters.com) - +[The New York Times](https://www.nytimes.com) - +[The Washington Post](https://www.washingtonpost.com) + +##### Business +[Adweek](https://www.adweek.com) - +[American Affairs](https://americanaffairsjournal.org) - +[Barron's](https://www.barrons.com) - +[Benzinga](https://www.benzinga.com) - +[Bloomberg](https://www.bloomberg.com) - +[Business Insider](https://www.businessinsider.com) - +[Citywire](https://www.citywire.com) - +[CNBC](https://www.cnbc.com) - +[Fast Company](https://www.fastcompany.com) - +[Forbes](https://www.forbes.com) - +[Fortune](https://fortune.com) - +[Harvard Business Review](https://www.hbr.org) - +[Inc.com](https://www.inc.com) - +[MarketWatch](https://www.marketwatch.com) - +[MIT Sloan Management Review](https://sloanreview.mit.edu) - +[Quartz](https://qz.com) - +[S&P Global](https://www.spglobal.com) - +[Stock News](https://stocknews.com) - +[The Business Journals](https://www.bizjournals.com)* - +[The Business of Fashion](https://www.businessoffashion.com) - +[The Wall Street Journal](https://www.wsj.com) - +[Vogue Business](https://www.voguebusiness.com) - +[ZeroHedge](https://www.zerohedge.com) + +Grouped in options:\ +*[American Banker](https://www.americanbanker.com) (+ [Arizent](https://www.arizent.com/brands)*; opt-in to custom sites)\ +*[BNP Media](https://www.bnpmedia.com/our-audiences)* sites (opt-in to custom sites)\ +*[Bridge Tower Media](https://bridgetowermedia.com/markets)* sites (opt-in to custom sites)\ +*California Business Journals* sites like\ +[Los Angeles Business Journal](https://labusinessjournal.com) - +[Orange County Business Journal](https://www.ocbj.com) - +[San Diego Business Journal](https://www.sdbj.com) - +[San Fernando Valley Business Journal](https://www.sfvbj.com)\ +*Crain Communications* sites like\ +[Ad Age](https://adage.com) - +[Automotive News](https://www.autonews.com) - +[Crain's Chicago Business](https://www.chicagobusiness.com) - +[Crain's Cleveland Business](https://www.crainscleveland.com) - +[Crain's Detroit Business](https://www.crainsdetroit.com) - +[Crain's Grand Rapids Business](https://www.crainsgrandrapids.com) - +[Crain's New York Business](https://www.crainsnewyork.com) - +[Modern Healthcare](https://www.modernhealthcare.com) - +[Pensions & Investments](https://www.pionline.com)\ +Global Polymer Group: +[European Rubber Journal](https://www.european-rubber-journal.com) - +[Plastics News](https://www.plasticsnews.com) - +[Rubber News](https://www.rubbernews.com) - +[Sustainable Plastics](https://www.sustainableplastics.com) - +[Tire Business](https://www.tirebusiness.com) - +[Urethanes Technology International](https://www.utech-polyurethane.com)\ +*Digiday Media* sites like\ +[Digiday](https://digiday.com) - +[Glossy](https://www.glossy.co) - +[ModernRetail](https://www.modernretail.co)\ +*[Industry Dive](https://www.industrydive.com/publications)* sites (opt-in to custom sites)\ +*[Inside Retail](https://octomedia.com.au/our-brands/inside-retail)* sites (opt-in to custom sites)\ +*[PEI Media](https://www.pei.group/brands)* sites (opt-in to custom sites) + +##### Tech/Science +[Brill](https://brill.com) - +[Bulletin of the Atomic Scientists](https://thebulletin.org) - +[Chemical & Engineering News](https://cen.acs.org) - +[Discover Magazine](https://www.discovermagazine.com) - +[History Today](https://www.historytoday.com) - +[Inside Higher Ed](https://www.insidehighered.com) - +[Interesting Engineering](https://interestingengineering.com) - +[Medscape](https://www.medscape.com) - +[MIT Technology Review](https://www.technologyreview.com) - +[National Geographic USA](https://www.nationalgeographic.com) - +[Nautilus](https://nautil.us) - +[New Scientist](https://www.newscientist.com) - +[Popular Science](https://www.popsci.com) - +[Science](https://www.science.org)* - +[ScienceNews.org](https://www.sciencenews.org) - +[Scientific American](https://www.scientificamerican.com) - +[StatNews](https://www.statnews.com) - +[The Scientist](https://www.the-scientist.com) - +[Times Higher Education](https://www.timeshighereducation.com) + +Grouped in options:\ +*Crain Communications* sites like\ +[360Dx](https://www.360dx.com) - +[GenomeWeb](https://www.genomeweb.com) - +[Precision Medicine Online](https://www.precisionmedicineonline.com)\ +*TechTarget Group* sites like\ +[Computer Weekly](https://www.computerweekly.com) - +[TechTarget](https://www.techtarget.com)\ +*The Chronicle* sites like\ +[The Chronicle of Higher Education](https://www.chronicle.com) - +[The Chronicle of Philanthropy](https://www.philanthropy.com) + +##### Encyclopedia/Book library/Knowledge base +[BBC History Extra](https://www.historyextra.com) - +[Encyclopedia Britannica](https://www.britannica.com) - +[eNotes](https://www.enotes.com) - +[Glassdoor](https://www.glassdoor.com) - +[Loeb Classical Library](https://www.loebclassics.com) - +[Philosophy Now](https://philosophynow.org) - +[Quora](https://www.quora.com) - +[Scholastic](https://www.scholastic.com) - +[SlideShare](https://www.slideshare.net) - +[Study.com (only lessons; no videos)](https://study.com) + +###### Sports +[CyclingNews](https://www.cyclingnews.com) - +[ESPN USA](https://www.espn.com) - +[Rivals](https://rivals.com) - +[RugbyPass](https://www.rugbypass.com) - +[Sports Illustrated](https://www.si.com) - +[The Athletic](https://www.nytimes.com/athletic) + +##### Magazines/Blogs +Grouped in options:\ +*Medium (custom) domains* like (opt-in to custom sites for unlisted)\ +[Medium](https://www.medium.com) - +[Better Programming](https://betterprogramming.pub) - +[Towards Data Science](https://towardsdatascience.com) + +[America's Test Kitchen](https://www.americastestkitchen.com) - +[American Purpose](https://www.americanpurpose.com) - +[Apollo Magazine](https://www.apollo-magazine.com) - +[Artforum](https://www.artforum.com) - +[Artnet](https://www.artnet.com) - +[Atavist Magazine](https://magazine.atavist.com) - +[Axios](https://www.axios.com) - +[Commentary Magazine](https://www.commentary.org) - +[Defector](https://defector.com) - +[Dwell](https://www.dwell.com) - +[Field & Stream](https://www.fieldandstream.com) - +[First Things](https://www.firstthings.com) - +[Foreign Affairs](https://www.foreignaffairs.com) - +[Foreign Policy](https://www.foreignpolicy.com) - +[Harper's Magazine](https://harpers.org) - +[Jazzwise](https://www.jazzwise.com) - +[National Review](https://www.nationalreview.com) - +[Newsweek](https://www.newsweek.com) - +[Outdoor Life](https://www.outdoorlife.com) - +[Paste Magazine](https://www.pastemagazine.com) - +[Pirate Wires](https://www.piratewires.com) - +[Politico](https://www.politico.com) - +[Project Syndicate](https://www.project-syndicate.org) - +[Puck.news](https://puck.news) - +[Slate](https://slate.com) - +[SofRep](https://sofrep.com) - +[Stereogum](https://www.stereogum.com) - +[Stratfor](https://stratfor.com) - +[Texas Monthly](https://www.texasmonthly.com) - +[The American Conservative](https://www.theamericanconservative.com) - +[The American Interest](https://www.the-american-interest.com) - +[The American Scholar](https://theamericanscholar.org) - +[The Art Newspaper](https://www.theartnewspaper.com) - +[The Atlantic](https://www.theatlantic.com) - +[The Baffler](https://thebaffler.com) - +[The Christian Science Monitor](https://www.csmonitor.com) - +[The Daily Beast](https://www.thedailybeast.com) - +[The Daily Wire](https://www.dailywire.com) - +[The Diplomat](https://thediplomat.com) - +[The Dispatch](https://thedispatch.com) - +[The Impression](https://theimpression.com) - +[The Intercept](https://theintercept.com) - +[The Juggernaut](https://www.thejuggernaut.com) - +[The Lamp Magazine](https://thelampmagazine.com) - +[The Nation](https://www.thenation.com) - +[The New Atlantis](https://www.thenewatlantis.com) - +[The New Criterion](https://newcriterion.com) - +[The New Republic](https://newrepublic.com) - +[The New York Review of Books](https://www.nybooks.com) - +[The Point Magazine](https://thepointmag.com) - +[The Spectator World](https://thespectator.com) - +[The Verge](https://www.theverge.com) - +[The Week](https://theweek.com) - +[The Wrap](https://www.thewrap.com) - +[Vice](https://www.vice.com) - +[Vox](https://www.vox.com) - +[Washington Examiner](https://www.washingtonexaminer.com) + +Grouped in options:\ +*Condé Nast magazines* sites like\ +[Architectural Digest](https://www.architecturaldigest.com) - +[Bon Appétit](https://www.bonappetit.com) - +[British Vogue](https://www.vogue.co.uk) - +[Condé Nast Traveler](https://www.cntraveler.com) - +[Epicurious](https://www.epicurious.com) - +[GC](https://www.gq.com) - +[The New Yorker](https://www.newyorker.com) - +[Vanity Fair](https://www.vanityfair.com) - +[Vogue USA](https://www.vogue.com) - +[Wired](https://www.wired.com)\ +*Hearst Communications magazines* sites like\ +[Bicycling](https://www.bicycling.com) - +[Cosmopolitan](https://www.cosmopolitan.com) - +[Country Living](https://www.countryliving.com) - +[Delish](https://www.delish.com) - +[Elle Decor](https://www.elledecor.com) - +[Elle USA](https://www.elle.com) - +[Esquire](https://www.esquire.com) - +[Good Housekeeping](https://www.goodhousekeeping.com) - +[Harper's Bazaar](https://www.harpersbazaar.com) - +[House Beautiful](https://www.housebeautiful.com) - +[Men's Health](https://www.menshealth.com) - +[Oprah Daily](https://www.oprahdaily.com) - +[Popular Mechanics](https://www.popularmechanics.com) - +[Prevention](https://www.prevention.com) - +[Road & Track](https://www.roadandtrack.com) - +[Runner's World](https://www.runnersworld.com) - +[Town & Country](https://www.townandcountrymag.com) - +[Women's Health](https://www.womenshealthmag.com)\ +*Outside magazines* sites like\ +[Backpacker](https://www.backpacker.com) - +[Beta](https://www.betamtb.com) - +[Better Nutrition](https://www.betternutrition.com) - +[Clean Eating](https://www.cleaneatingmag.com) - +[Climbing](https://www.climbing.com) - +[Outside](https://www.outsideonline.com) - +[Oxygen](https://www.oxygenmag.com) - +[SKI](https://www.skimag.com) - +[Trail Runner](https://www.trailrunnermag.com) - +[Triathlete](https://www.triathlete.com) - +[Vegetarian Times](https://www.vegetariantimes.com) - +[Women's Running](https://www.womensrunning.com) - +[Yoga Journal](https://www.yogajournal.com)\ +*Penske Media Corporation* sites like\ +[Billboard](https://www.billboard.com) - +[Rolling Stone](https://www.rollingstone.com) - +[Sourcing Journal](https://sourcingjournal.com) - +[Sportico](https://www.sportico.com) - +[Variety](https://variety.com) - +[WWD](https://wwd.com)\ +*The Epoch Times* sites like (opt-in to custom sites for br|cz|de|fr|jp|ro sites)\ +[Epoch.org.il](https://epoch.org.il) - +[The Epoch Times](https://www.theepochtimes.com) + +##### Local USA news +[Albuquerque Journal](https://www.abqjournal.com) - +[CNN](https://www.cnn.com) - +[Fox News](https://www.foxnews.com) - +[Honolulu Star-Advertiser](https://www.staradvertiser.com) - +[Las Vegas Review-Journal](https://www.reviewjournal.com) - +[Los Angeles Times](https://www.latimes.com) - +[Mountain View Voice](https://www.mv-voice.com) - +[New York Magazine](https://www.nymag.com) (+ [Curbed](https://www.curbed.com), [Grub Street](https://www.grubstreet.com), [The Cut](https://www.thecut.com) & [Vulture](https://www.vulture.com)) - +[Newsday](https://www.newsday.com) - +[Palo Alto Online](https://www.paloaltoonline.com) - +[Pittsburgh Post Gazette](https://www.post-gazette.com) - +[Star Tribune](https://www.startribune.com) - +[Tampa Bay Times](https://www.tampabay.com) - +[The Baltimore Banner](https://www.thebaltimorebanner.com) - +[The Boston Globe](https://www.bostonglobe.com) - +[The Columbian](https://www.columbian.com) - +[The Dallas Morning News](https://www.dallasnews.com) - +[The Hill](https://thehill.com) - +[The New York Sun](https://www.nysun.com) - +[The Salt Lake Tribune](https://www.sltrib.com) - +[The San Francisco Standard](https://www.sfstandard.com) - +[The Seattle Times](https://www.seattletimes.com) - +[The Philadelphia Inquirer](https://www.inquirer.com) + +[USA Today](https://www.usatoday.com)\ +Grouped in options:\ +*Advance Local* sites like\ +[AL/Alabama](https://www.al.com) - +[MLive/Michigan](https://www.mlive.com) - +[NJ/New Jersey](https://www.nj.com) - +[Staten Island Advance](https://www.silive.com) - +[The Express-Times](https://www.lehighvalleylive.com) - +[The Oregonian](https://www.oregonlive.com) - +[The Patriot-News](https://www.pennlive.com) - +[The Plain Dealer](https://www.cleveland.com) - +[The Post-Standard](https://www.syracuse.com) - +[The Republican](https://www.masslive.com)\ +*[CNHI Group](https://www.cnhi.com/newspapers)* sites (opt-in to custom sites)\ +*[Forum Communications](https://www.forumcomm.com/brands)* sites (opt-in to custom sites)\ +*Gannett Group (local USA Today)* sites like (opt-in to custom sites for unlisted)\ +[Austin American-Statesman](https://www.statesman.com) - +[Democrat and Chronicle](https://www.democratandchronicle.com) - +[Detroit Free Press](https://www.freep.com) - +[Knoxville News Sentinel](https://www.knoxnews.com) - +[Memphis Commercial Appeal](https://www.commercialappeal.com) - +[Milwaukee Journal Sentinel](https://www.jsonline.com) - +[The Arizona Republic](https://www.azcentral.com) - +[The Cincinnati Enquirer](https://www.cincinnati.com) - +[The Columbus Dispatch](https://www.dispatch.com) - +[The Courier-Journal](https://www.courier-journal.com) - +[The Des Moines Register](https://www.desmoinesregister.com) - +[The Detroit News](https://www.detroitnews.com) - +[The Florida Times-Union](https://www.jacksonville.com) - +[The Indianapolis Star](https://www.indystar.com) - +[The News-Press](https://www.news-press.com) - +[The Oklahoman](https://www.oklahoman.com) - +[The Record (North Jersey)](https://www.northjersey.com) - +[The Tennessean](https://www.tennessean.com)\ +*Hearst Communications (newspapers)* sites like (opt-in to custom sites for unlisted)\ +[Albany Times Union](https://www.timesunion.com) - +[Connecticut Post](https://www.ctpost.com) - +[Houston Chronicle](https://www.houstonchronicle.com) - +[New Haven Register](https://www.nhregister.com) - +[San Antonio Express-News](https://www.expressnews.com) - +[San Francisco Chronicle](https://www.sfchronicle.com)\ +*Lee Enterprises Group* sites like (opt-in to custom sites for unlisted)\ +[Arizona Daily Star](https://tucson.com) - +[Lincoln Journal Star](https://journalstar.com) - +[Omaha World-Herald](https://omaha.com) - +[Richmond Times-Dispatch](https://richmond.com) - +[St. Louis Post-Dispatch](https://www.stltoday.com) - +[The Buffalo News](https://buffalonews.com) - +[The Times of Northwest Indiana](https://www.nwitimes.com) - +[Tulsa World](https://tulsaworld.com) - +[Wisconsin State Journal](https://madison.com) - +[Winston-Salem Journal](https://www.journalnow.com)\ +*[Maine Trust](https://www.metln.org)* sites (opt-in to custom sites)\ +*McClatchy Group* sites like (opt-in to custom sites for unlisted)\ +[Belleville News-Democrat](https://www.bnd.com) - +[El Nuevo Herald](https://www.elnuevoherald.com) - +[Fort Worth Star-Telegram](https://www.star-telegram.com) - +[Lexington Herald-Leader](https://www.kentucky.com) - +[McClatchy DC](https://www.mcclatchydc.com) - +[Miami Herald](https://www.miamiherald.com) - +[The Charlotte Observer](https://www.charlotteobserver.com) - +[The Fresno Bee](https://www.fresnobee.com) - +[The Kansas City Star](https://www.kansascity.com) - +[The News & Observer](https://www.newsobserver.com) - +[The Sacramento Bee](https://www.sacbee.com) - +[The State](https://www.thestate.com) - +[The Wichita Eagle](https://www.kansas.com) - +[Tri-City Herald](https://www.tri-cityherald.com)\ +*MediaNews Group* sites like (opt-in to custom sites for unlisted/local sites)\ +[Boston Herald](https://www.bostonherald.com) - +[East Bay Times](https://www.eastbaytimes.com) - +[Orange County Register](https://www.ocregister.com) - +[San Diego Union Tribune](https://www.sandiegouniontribune.com) - +[St. Paul Pioneer Press](https://www.twincities.com) - +[The Denver Post](https://www.denverpost.com) - +[The Mercury News](https://www.mercurynews.com) - +[The Press-Enterprise](https://www.pressenterprise.com)\ +*[The Atlanta Journal-Constitution](https://www.ajc.com) + Cox First Media* (opt-in to custom sites)\ +*The (New Orleans) Advocate Group* sites like\ +[The Advocate](https://www.theadvocate.com) - +[The New Orleans Advocate/The Times-Picayune](https://www.nola.com) - +[The Shreveport-Bossier City Advocate](https://www.shreveportbossieradvocate.com)\ +*TownNews sites (Blox CMS)* (opt-in to custom sites)\ +*Tribune Publishing Company* sites like\ +[Baltimore Sun](https://www.baltimoresun.com) - +[Capital Gazette](https://www.capitalgazette.com) - +[Chicago Tribune](https://www.chicagotribune.com) - +[Daily Press](https://www.dailypress.com) - +[Hartford Courant](https://www.courant.com) - +[New York Daily News](https://www.nydailynews.com) - +[Orlando Sentinel](https://www.orlandosentinel.com) - +[SunSentinel](https://www.sun-sentinel.com) - +[The Morning Call](https://www.mcall.com) - +[The Virginian-Pilot](https://www.pilotonline.com) + +#### Canada +[iPolitics](https://www.ipolitics.ca) - +[Le Devoir](https://www.ledevoir.com) - +[The Globe and Mail](https://www.theglobeandmail.com) - +[The Hill Times](https://www.hilltimes.com) - +[Winnipeg Free Press](https://www.winnipegfreepress.com) + +Grouped in options:\ +*Groupe Capitales Médias* sites like (opt-in to custom sites for unlisted)\ +[Le Soleil](https://www.lesoleil.com)\ +*Groupe Québecor* sites like\ +[Le Journal de Montréal](https://www.journaldemontreal.com) - +[Le Journal de Québec](https://www.journaldequebec.com)\ +*Postmedia Network* sites like (opt-in to custom sites for unlisted)\ +[Calgary Herald](https://calgaryherald.com) - +[Financial Post](https://www.financialpost.com) - +[National Post](https://www.nationalpost.com) - +[The Province](https://theprovince.com) - +[Toronto Sun](https://torontosun.com) - +[Vancouver Sun](https://vancouversun.com)\ +*TorStar* sites like\ +[The Toronto Star](https://www.thestar.com) and regional sites +[Niagara Falls Review](https://www.niagarafallsreview.ca) - +[Peterborough Examiner](https://www.thepeterboroughexaminer.com) - +[St. Catharines Standard](https://www.stcatharinesstandard.ca) - +[The Hamilton Spectator](https://www.thespec.com) - +[Waterloo Region Record](https://www.therecord.com) - +[Welland Tribune](https://www.wellandtribune.ca)\ +*[Valnet Group](https://www.valnetinc.com/our-brands)* sites (opt-in to custom sites) + +#### Europe + +[Balkan Insight](https://balkaninsight.com) - +[Bloomberg Adria](https://www.bloombergadria.com) - +[EUobserver](https://euobserver.com) - +[Follow the Money (ftm.eu)](https://www.ftm.eu) + +##### United Kingdom/Ireland +[Autocar](https://www.autocar.co.uk) - +[Autosport](https://www.autosport.com)* - +[Belfast Telegraph](https://www.belfasttelegraph.co.uk) - +[Business Post](https://www.businesspost.ie) - +[Decanter](https://www.decanter.com) - +[Evening Standard](https://www.standard.co.uk) - +[Financial News](https://www.fnlondon.com) - +[Financial Times](https://www.ft.com) - +[GB News](https://www.gbnews.com) - +[Granta Magazine](https://granta.com) - +[iNews](https://inews.co.uk) - +[Investors' Chronicle](https://www.investorschronicle.co.uk) - +[Irish Independent](https://www.independent.ie) - +[Literary Review](https://literaryreview.co.uk) - +[London Review of Books](https://www.lrb.co.uk) - +[Monocle](https://monocle.com) - +[Motor Sport Magazine](https://www.motorsportmagazine.com) - +[Prospect Magazine](https://www.prospectmagazine.co.uk) - +[Stylist](https://www.stylist.co.uk) - +[Tes Magazine](https://www.tes.com/magazine) - +[The Critic](https://thecritic.co.uk) - +[The Economist](https://www.economist.com) - +[The Irish Examiner](https://www.irishexaminer.com) - +[The Irish News](https://www.irishnews.com) - +[The Irish Times](https://www.irishtimes.com) - +[The Lawyer](https://www.thelawyer.com) - +[The New European](https://www.theneweuropean.co.uk) - +[The New Statesman](https://www.newstatesman.com) - +[The Spectator](https://www.spectator.co.uk) - +[The Telegraph](https://www.telegraph.co.uk) - +[The Times](https://www.thetimes.com) - +[The Times Literary Supplement](https://www.the-tls.co.uk) - +[UnHerd](https://unherd.com) + +Grouped in options:\ +*Daily Mail Group* sites like\ +[Daily Mail](https://www.dailymail.co.uk) - +[Mail on Sunday](https://www.mailonsunday.co.uk) - +[This is Money](https://www.thisismoney.co.uk)\ +*[DVV Media International](https://www.dvvmediainternational.com)* sites (opt-in to custom sites)\ +*[Haymarket Media Group](https://haymarket.com/brands)* sites (opt-in to custom sites)\ +*[Haymarket Medical Network](https://www.haymarketmedicalnetwork.com)* sites (opt-in to custom sites)\ +*National World Publishing* sites like (opt-in to custom sites for unlisted)\ +[The Scotsman](https://www.scotsman.com) - +[Yorkshire Post](https://www.yorkshirepost.co.uk)\ +*Oxford University Press* sites (opt-in to custom sites)*\ +*[Newsquest Media Group](https://www.newsquest.co.uk/news-brands)* sites (opt-in to custom sites)\ +*The Independent Group* sites like\ +[The Independent UK ](https://www.independent.co.uk) - +[The Independent USA ](https://www.the-independent.com)\ +*The Stage Media* sites like:\ +[The Bookseller](https://www.thebookseller.com) - +[The Stage](https://www.thestage.co.uk)\ +*[William Reed Group](https://www.william-reed.com/what-we-do)* sites (opt-in to custom sites)\ +*The Sun Group* sites like\ +[The Scottish Sun](https://www.thescottishsun.co.uk) - +[The Sun UK](https://www.thesun.co.uk) + +##### Bulgaria +[Capital](https://www.capital.bg) - +[Dnevnik](https://www.dnevnik.bg) + +##### Czechia +[Deník](https://www.denik.cz) + +##### Denmark +[Berlingske](https://www.berlingske.dk) + +Grouped in options:\ +*[DK Medier](https://www.dkmedier.dk)* sites (opt-in to custom sites) + +##### Finland +[Suomen Sotilas](https://suomensotilas.fi) + +##### France/Wallonia +[60 Millions de consommateurs](https://www.60millions-mag.com) - +[Actu.fr](https://actu.fr) - +[Alternatives Economiques](https://www.alternatives-economiques.fr) - +[Atlantico](https://atlantico.fr) - +[Auto Hebdo](https://www.autohebdo.fr) - +[Auto Plus](https://www.autoplus.fr) - +[Capital](https://www.capital.fr) - +[Causeur](https://www.causeur.fr) - +[Challenges](https://www.challenges.fr) - +[Charlie Hebdo](https://charliehebdo.fr) - +[Connaissance des Arts](https://www.connaissancedesarts.com) - +[Cosmopolitan](https://www.cosmopolitan.fr) - +[Courrier international](https://www.courrierinternational.com) - +[Elle](https://www.elle.fr) - +[Esprit](https://esprit.presse.fr) - +[Jeune Afrique](https://www.jeuneafrique.com) - +[L'Écho](https://lecho.be) - +[L'Équipe](https://www.lequipe.fr) - +[L'Express](https://www.lexpress.fr) - +[L'Informé](https://www.linforme.com) - +[L'Oeil de la Photographie (fr/en)](https://loeildelaphotographie.com) - +[L'Opinion](https://www.lopinion.fr) - +[La Croix](https://www.la-croix.com) - +[La Nouvelle République du Centre-Ouest](https://www.lanouvellerepublique.fr) - +[Le Courrier des Stratèges](https://lecourrierdesstrateges.fr) - +[Le Figaro](https://www.lefigaro.fr) - +[Le Grand Continent](https://legrandcontinent.eu) - +[Le Journal du Dimanche](https://lejdd.fr) - +[Le Journal du Net](https://www.journaldunet.com) - +[Le Monde](https://www.lemonde.fr) - +[Le Nouvel Economiste](https://www.lenouveleconomiste.fr) - +[Le Parisien](https://www.leparisien.fr) - +[Le Point](https://www.lepoint.fr) - +[Le Revenu](https://www.lerevenu.com) - +[Le Télégramme](https://www.letelegramme.fr) - +[Le Un](https://le1hebdo.fr) - +[Les Échos](https://www.lesechos.fr) - +[Les Inrockuptibles](https://www.lesinrocks.com) - +[Libération](https://www.liberation.fr) - +[Marianne](https://www.marianne.net) - +[Paris Match](https://www.parismatch.com) - +[Philonomist (fr/en)](https://www.philonomist.com) - +[Philosophie Magazine](https://www.philomag.com) - +[Politis](https://www.politis.fr) - +[Pour l'Éco](https://www.pourleco.com) - +[Pour la Science](https://www.pourlascience.fr) - +[Public](https://www.public.fr) - +[Réforme](https://www.reforme.net) - +[Revue Conflits](https://www.revueconflits.com) - +[Science & Vie](https://www.science-et-vie.com) - +[Sciences et Avenir](https://www.sciencesetavenir.fr) - +[Sciences Humaines](https://www.scienceshumaines.com) - +[Télérama](https://www.telerama.fr) - +[Valeurs Actuelles](https://www.valeursactuelles.com) - +[XXI](https://www.revue21.fr) + +Grouped in options:\ +*Groupe Centre France* sites like (opt-in to custom sites for unlisted)\ +[La Montagne](https://www.lamontagne.fr)\ +*Groupe Infopro Digital* sites like (opt-in to custom sites for unlisted)\ +[L'Usine Nouvelle](https://www.usinenouvelle.com)\ +*Groupe IPM* sites like\ +[DH Les Sports+](https://www.dhnet.be) - +[L'Avenir](https://www.lavenir.net) - +[La Libre](https://www.lalibre.be)\ +*Groupe La Dépêche* sites like\ +[Centre Presse](https://www.centrepresseaveyron.fr) - +[Journal de Millau](https://www.journaldemillau.fr) - +[L'Indépendant](https://www.lindependant.fr) - +[La Dépêche du Midi](https://www.ladepeche.fr) - +[La Nouvelle République des Pyrénées](https://www.nrpyrenees.fr) - +[Le Petit Bleu d'Agen](https://www.petitbleu.fr) - +[Midi Libre](https://www.midilibre.fr) - +[Midi Olympique](https://www.rugbyrama.fr/midi-olympique)\ +*Groupe Nice-Matin* sites like\ +[Monaco-Matin](https://www.monacomatin.mc) - +[Nice-Matin](https://www.nicematin.com) - +[Var-Matin](https://www.varmatin.com)\ +*Groupe Profession Santé* sites like\ +[Le Quotidien du Médecin](https://www.lequotidiendumedecin.fr) - +[Le Quotidien du Pharmacien](https://www.lequotidiendupharmacien.fr)\ +*Groupe Sud Ouest* sites like\ +[Charente libre](https://www.charentelibre.fr) - +[La République des Pyrénées](https://www.larepubliquedespyrenees.fr) - +[Sud Ouest](https://www.sudouest.fr)\ +*[Groupe SynerJ Media](https://synerj.media)* sites (opt-in to custom sites)\ +*Roularta Media Group* sites like\ +[Femmes d'Aujourd'hui](https://www.femmesdaujourdhui.be) - +[Flair.be](https://www.flair.be/fr) - +[Le Vif](https://www.levif.be)\ +*TechTarget Group* sites like\ +[LeMagIT](https://www.lemagit.fr) + +##### Germany/Austria +[Aachener Zeitung](https://www.aachener-zeitung.de) - +[Ärzte Zeitung](https://www.aerztezeitung.de) - +[Automobilwoche](https://www.automobilwoche.de) - +[Berliner Zeitung](https://www.berliner-zeitung.de) - +[Bild](https://www.bild.de) - +[Börsen-Zeitung](https://www.boersen-zeitung.de) - +[Cicero](https://www.cicero.de) - +[Der Freitag](https://www.freitag.de) - +[Der Spiegel](https://www.spiegel.de) - +[Der Tagesspiegel](https://www.tagesspiegel.de) - +[Die Rheinpfalz](https://www.rheinpfalz.de) - +[Die Welt](https://www.welt.de) - +[Die Zeit](https://www.zeit.de) - +[Frankfurter Allgemeine Zeitung](https://www.faz.net) - +[Hamburger Morgenpost](https://www.mopo.de) - +[Handelsblatt](https://www.handelsblatt.com) - +[Heise online](https://www.heise.de) - +[Jacobin Magazin](https://jacobin.de) - +[Kölner Stadt-Anzeiger](https://www.ksta.de) - +[Kölnische Rundschau](https://www.rundschau-online.de) - +[Krautreporter](https://krautreporter.de) - +[Kurier.at](https://kurier.at) - +[Manager Magazin](https://www.manager-magazin.de) - +[Neue Westfälische](https://www.nw.de) - +[Nordwest Zeitung](https://www.nwzonline.de) - +[Philosophie Magazin](https://www.philomag.de) - +[Piqd](https://www.piqd.de) - +[Profil.at](https://www.profil.at) - +[Spektrum](https://www.spektrum.de) - +[Springer Medizin](https://www.springermedizin.de) - +[Süddeutsche Zeitung](https://www.sueddeutsche.de) - +[Südkurier](https://www.suedkurier.de) - +[T3n](https://t3n.de) - +[Tiroler Tageszeitung](https://www.tt.com) - +[Vorarlberg Nachrichten](https://www.vn.at) - +[Vorarlberg Online](https://www.vol.at) - +[Weltkunst](https://www.weltkunst.de) - +[Weser-Kurier](https://www.weser-kurier.de) + +Grouped in options:\ +*[Deutscher Fachverlag Mediengruppe](https://www.dfv.de)* (opt-in to custom sites)\ +*Funke Mediengruppe* sites like\ +[Berliner Morgenpost](https://www.morgenpost.de) - +[Braunschweiger Zeitung](https://www.braunschweiger-zeitung.de) - +[Hamburger Abendblatt](https://www.abendblatt.de) - +[Iserlohner Kreisanzeiger und Zeitung](https://www.ikz-online.de) - +[Neue Ruhr Zeitung](https://www.nrz.de) - +[Ostthüringer Zeitung](https://www.otz.de) - +[Thüringer Allgemeine](https://www.thueringer-allgemeine.de) - +[Thüringische Landeszeitung](https://www.tlz.de) - +[Westdeutsche Allgemeine Zeitung](https://www.waz.de) - +[Westfalenpost](https://www.wp.de) - +[Westfälische Rundschau](https://www.wr.de)\ +*[Haas Mediengruppe](https://www.haas-mediengruppe.de/marken)* sites like (opt-in to custom sites for unlisted)\ +[Mannheimer Morgen](https://www.mannheimer-morgen.de)\ +*Ippen.media* sites like (opt-in to custom sites for unlisted)\ +[Frankfurter Rundschau](https://www.fr.de) - +[Münchner Merkur](https://www.merkur.de) - +[Oberbayerisches Volksblatt](https://www.ovb-online.de)\ +*Landwirtschaftsverlag* sites like\ +[Profi.de](https://www.profi.de) - +[Top Agrar](https://www.topagrar.com) - +[Wochenblatt für Landwirtschaft & Landleben](https://www.wochenblatt.com)\ +*Madsack Mediengruppe* sites like (opt-in to custom sites for unlisted)\ +[Hannoversche Allgemeine Zeitung](https://www.haz.de) - +[Kieler Nachrichten](https://www.kn-online.de) - +[Leipziger Volkszeitung](https://www.lvz.de) - +[Lübecker Nachrichten](https://www.ln-online.de) - +[Märkische Allgemeine](https://www.maz-online.de) - +[Neue Presse (Hannover)](https://www.neuepresse.de) - +[Ostsee-Zeitung](https://www.ostsee-zeitung.de) - +[RedaktionsNetzwerk Deutschland](https://www.rnd.de) - +[Sächsische Zeitung](https://www.saechsische.de)\ +*[Media Group Westfalen](https://mgw.de/portfolio/tageszeitungen)* sites like (opt-in to custom sites for unlisted)\ +[Ruhr Nachrichten](https://www.ruhrnachrichten.de)\ +*[Motor Presse Stuttgart](https://www.motorpresse.de)* sites like\ +[Aerokurier](https://www.aerokurier.de) - +[Auto Motor und Sport](https://www.auto-motor-und-sport.de) - +[Flug Revue](https://www.flugrevue.de) - +[Motorrad](https://www.motorradonline.de) - +[Women's Health](https://www.womenshealth.de)\ +*NOZ/MHN Mediengruppe* sites like\ +[Neue Osnabrücker Zeitung](https://www.noz.de) - +[Schleswig-Holsteinischer Zeitungsverlag](https://www.shz.de)\ +Rheinische Post Mediengruppe like\ +[General-Anzeiger Bonn](https://ga.de) - +[Rheinische Post](https://rp-online.de) - +[Saarbrücker Zeitung](https://www.saarbruecker-zeitung.de) - +[Trierischer Volksfreund](https://www.volksfreund.de)\ +*Verlagsgruppe Rhein Main* sites like (opt-in to custom sites for unlisted)\ +[Allgemeine Zeitung (Mainz)](https://www.allgemeine-zeitung.de) - +[Darmstädter Echo](https://www.echo-online.de) - +[Wiesbadener Kurier](https://www.wiesbadener-kurier.de) + +##### Greece +[Kathimerini](https://www.kathimerini.gr) + +##### Italy +[Corriere della Sera](https://www.corriere.it) - +[Corriere dello Sport](https://www.corrieredellosport.it) - +[Domani](https://editorialedomani.it) - +[Eastwest](https://eastwest.eu) - +[Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) - +[Il Foglio](https://www.ilfoglio.it) - +[Il Manifesto](https://ilmanifesto.it) - +[Il Sole 24 Ore (24+)](https://24plus.ilsole24ore.com) - +[Internazionale](https://www.internazionale.it) - +[Italia Oggi](https://www.italiaoggi.it) - +[La Gazzetta dello Sport](https://www.gazzetta.it) - +[Milano Finanza](https://www.milanofinanza.it) - +[Sky Sport](https://sport.sky.it) - +[Sky TG24](https://tg24.sky.it) - +[Tuttosport](https://www.tuttosport.com) + +Grouped in options:\ +*Gruppo GEDI.it* sites like\ +[Huffingtonpost.it](https://www.huffingtonpost.it) - +[Italian.tech](https://www.italian.tech) - +[La Repubblica](https://www.repubblica.it) - +[La Stampa](https://www.lastampa.it) - +[Le Scienze](https://www.lescienze.it) - +[Moda & Beauty](https://www.moda.it) + +[Il Messaggero](https://www.ilmessaggero.it) and regional sites like +[Corriere Adriatico](https://www.corriereadriatico.it) - +[Il Gazzettino](https://www.ilgazzettino.it) - +[Il Mattino](https://www.ilmattino.it) - +[Quotidiano di Puglia](https://www.quotidianodipuglia.it) + +[Quotidiano Nazionale](https://www.quotidiano.net) and regional sites like +[Il Giorno](https://www.ilgiorno.it) - +[Il Resto del Carlino](https://www.ilrestodelcarlino.it) - +[Il Telegrafo Livorno](https://www.iltelegrafolivorno.it) - +[La Nazione](https://www.lanazione.it) + +*[Gruppo SAE.it](https://www.grupposae.it/i-quotidiani)** sites like (opt-in to custom sites for unlisted)\ +[Il Tirreno](https://www.iltirreno.it)* - +[La Nuova Sardegna](https://www.lanuovasardegna.it)* + +##### Netherlands/Flanders +[Business AM](https://businessam.be) - +[Business Insider Nederland](https://www.businessinsider.nl) - +[De Tijd](https://www.tijd.be) - +[Doorbraak](https://doorbraak.be) - +[Follow the Money](https://www.ftm.nl) - +[Groene Amsterdammer](https://www.groene.nl) - +[Het Laatste Nieuws](https://www.hln.be) - +[Linda](https://www.linda.nl) - +[NRC Handelsblad](https://www.nrc.nl) - +[Telegraaf](https://www.telegraaf.nl) - +[Vrij Nederland](https://www.vn.nl) + +Grouped in options:\ +*Algemeen Dagblad (+ regional/ADR)* sites like\ +[Algemeen Dagblad](https://www.ad.nl) - +[BN DeStem](https://www.bndestem.nl) - +[Brabants Dagblad](https://www.bd.nl) - +[Eindhovens Dagblad](https://www.ed.nl) - +[Gelderlander](https://www.gelderlander.nl) - +[PZC](https://www.pzc.nl) - +[Stentor](https://www.destentor.nl) - +[Tubantia](https://tubantia.nl)\ +*DPG Media (not ADR)* sites like\ +[De Morgen](https://www.demorgen.be) - +[De Volkskrant](https://www.volkskrant.nl) - +[Flair.nl](https://www.flair.nl) - +[Humo](https://www.humo.be) - +[Libelle.nl](https://www.libelle.nl) - +[Margriet](https://www.margriet.nl) - +[Parool](https://www.parool.nl) - +[Trouw](https://www.trouw.nl)\ +*Mediahuis België* sites like\ +[De Standaard](https://www.standaard.be) - +[Gazet van Antwerpen](https://www.gva.be) - +[Het Belang van Limburg](https://www.hbvl.be) - +[Het Nieuwsblad](https://www.nieuwsblad.be)\ +*Mediahuis Noord* sites like (opt-in to custom sites for unlisted)\ +[Dagblad van het Noorden](https://www.dvhn.nl) - +[Leeuwarder Courant](https://www.lc.nl)\ +*[ProMedia Group](https://www.promedia.nl/publicaties)* sites (opt-in to custom sites)\ +*Roularta Media Group* sites like\ +[Artsenkrant](https://www.artsenkrant.com) - +[Beleggers Belangen](https://www.beleggersbelangen.nl) - +[Flair.be](https://www.flair.be/nl) - +[Knack](https://www.knack.be) - +[Krant van West-Vlaanderen](https://kw.be) - +[Libelle.be](https://www.libelle.be) + +##### Norway +[Bergens Tidende](https://www.bt.no) - +[Dagsavisen](https://www.dagsavisen.no)\ +Grouped in options:\ +*DN Media Group* sites like\ +[DN](https://www.dn.no) - +[Europower](https://www.europower.no) - +[Fiskeribladet](https://www.fiskeribladet.no) - +[Hydrogen Insight](https://www.hydrogeninsight.com) - +[Intrafish](https://www.intrafish.com) - +[Intrafish.no](https://www.intrafish.no) - +[Recharge](https://www.rechargenews.com) - +[TradeWinds](https://www.tradewindsnews.com) - +[Upstream](https://www.upstreamonline.com) + +##### Poland +[Polityka](https://www.polityka.pl) - +[Puls Biznesu](https://www.pb.pl) + +Grouped in options:\ +*GremiMedia.pl Group* sites like\ +[Parkiet](https://www.parkiet.com) - +[Rzeczpospolita](https://www.rp.pl)\ +*Ringier Axel Springer Polska* sites like\ +[Auto Swiat](https://www.auto-swiat.pl) - +[Business Insider](https://businessinsider.com.pl) - +[Forbes](https://www.forbes.pl) - +[Komputer Swiat](https://www.komputerswiat.pl) - +[Newsweek](https://www.newsweek.pl) - +[Onet](https://www.onet.pl)\ +*Wyborcza Group* sites like\ +[Magazyn-kuchnia.pl](https://magazyn-kuchnia.pl) - +[Wyborcza.biz](https://wyborcza.biz) - +[Wyborcza.pl](https://wyborcza.pl) - +[Wysokieobcasy.pl](https://www.wysokieobcasy.pl) + +##### Portugal +[Diário de Notícias](https://www.dn.pt) - +[Expresso](https://expresso.pt) - +[Observador](https://observador.pt) - +[Record](https://www.record.pt) - +[Sábado](https://www.sabado.pt) + +##### Russia +[Wonderzine](https://www.wonderzine.com) + +##### Spain +[Diario de Navarra](https://www.diariodenavarra.es) - +[El Confidencial](https://www.elconfidencial.com) - +[El Diario.es](https://www.eldiario.es) - +[El Español](https://www.elespanol.com) - +[El País](https://elpais.com) - +[La Vanguardia](https://www.lavanguardia.com) - +[Mundo Deportivo](https://www.mundodeportivo.com) - +[Política Exterior](https://www.politicaexterior.com) - +[Público](https://www.publico.es) + +Grouped in options:\ +*ARA* sites like\ +[Ara.cat](https://www.ara.cat) - +[Ara Balears](https://www.arabalears.cat)\ +*Grupo Prensa Ibérica* sites like (opt-in to custom sites for unlisted)\ +[Diario de Mallorca](https://www.diariodemallorca.es) - +[El Día](https://www.eldia.es) - +[El Periódico de Catalunya](https://www.elperiodico.com) - +[El Periódico de España](https://www.epe.es) - +[Faro de Vigo](https://www.farodevigo.es) - +[Información](https://www.informacion.es) - +[La Nueva España](https://www.lne.es) - +[La Provincia](https://www.laprovincia.es) - +[Levante-EMV](https://www.levante-emv.com) - +[Mallorca Zeitung](https://www.mallorcazeitung.es) - +[Superdeporte](https://www.superdeporte.es)\ +*Grupo Unidad Editorial* sites like\ +[El Mundo](https://www.elmundo.es) - +[Expansión](https://www.expansion.com) - +[Marca](https://www.marca.com)\ +*Grupo Vocento* sites like\ +[ABC](https://www.abc.es) - +[Canarias7](https://www.canarias7.es) - +[El Comercio](https://www.elcomercio.es) - +[El Correo](https://www.elcorreo.com) - +[El Diario Montañés](https://www.eldiariomontanes.es) - +[El Diario Vasco](https://www.diariovasco.com) - +[El Norte de Castilla](https://www.elnortedecastilla.es) - +[Hoy](https://www.hoy.es) - +[Ideal](https://www.ideal.es) - +[La Rioja](https://www.larioja.com) - +[La Verdad](https://www.laverdad.es) - +[La Voz de Cádiz](https://www.lavozdigital.es) - +[Las Provincias](https://www.lasprovincias.es) - +[Sur](https://www.diariosur.es) + +*[Sport Life Ibérica](https://www.sportlifeiberica.es)* sites (opt-in to custom sites) + +##### Sweden +[Dagens ETC](https://www.etc.se) - +[NyTeknik](https://www.nyteknik.se) + +Grouped in options:\ +*Bonnier News Group* sites like (opt-in to custom sites for unlisted)\ +[Dagens Medicin](https://www.dagensmedicin.se) - +[Dagens Nyheter](https://www.dn.se) - +[Helsingborgs Dagblad](https://www.hd.se) - +[Sydsvenskan](https://www.sydsvenskan.se)\ +*[NWT Media](https://www.nwtmedia.se)* sites (opt-in to custom sites) + +##### Switzerland +[Neue Zürcher Zeitung](https://www.nzz.ch) - +[Schweizer Monat](https://schweizermonat.ch) - +[The Market](https://themarket.ch) + +Grouped in options:\ +*[CH Media](https://chmedia.ch/marken)* sites like (opt-in to custom sites for unlisted)\ +[Aargauer Zeitung](https://www.aargauerzeitung.ch) - +[Luzerner Zeitung](https://www.luzernerzeitung.ch) - +[St. Galler Tagblatt](https://www.tagblatt.ch)\ +*Ringier Gruppe* sites like\ +[Blick](https://www.blick.ch) - +[Beobachter](https://www.beobachter.ch) - +[Handelszeitung](https://www.handelszeitung.ch)\ +*[TAmedia](https://www.tamedia.ch/de/medien)* sites like (opt-in to custom sites for unlisted)\ +[24 heures](https://www.24heures.ch) - +[Basler Zeitung](https://www.bazonline.ch) - +[Berner Zeitung](https://www.bernerzeitung.ch) - +[Der Bund](https://www.derbund.ch) - +[Tages-Anzeiger](https://www.tagesanzeiger.ch) - +[Tribune de Genève](https://www.tdg.ch) + +Grouped in options:\ +*[Groupe ESH Médias](https://www.eshmedias.ch)* sites like\ +[ArcInfo](https://www.arcinfo.ch) - +[La Côte](https://www.lacote.ch) - +[Le Nouvelliste](https://www.lenouvelliste.ch) + +##### Ukraine +[Forbes](https://forbes.ua) - +[New Voice](https://nv.ua) + +#### Africa + +###### Kenya + +[The Standard](https://www.standardmedia.co.ke) + +Grouped in options:\ +*[Nation Media Group](https://www.nationmedia.com/brands)* sites like (opt-in to custom sites for unlisted)\ +[Business Daily](https://www.businessdailyafrica.com) - +[Daily Nation](https://nation.africa) + +##### Australia/New Zealand + +[BusinessDesk](https://businessdesk.co.nz) - +[Forbes Australia](https://www.forbes.com.au) - +[Inkl](https://www.inkl.com) - +[MacroBusiness](https://www.macrobusiness.com.au) - +[New Zealand Herald](https://www.nzherald.co.nz) - +[The Saturday Paper](https://www.thesaturdaypaper.com.au) - +[The Spectator Australia](https://www.spectator.com.au) - +[The West Australian (+ regional/opt-in to custom sites)](https://thewest.com.au) + +Grouped in options:\ +*Australia News Corp* sites like\ +[Cairns Post](https://www.cairnspost.com.au) - +[Code Sports](https://www.codesports.com.au) - +[Geelong Advertiser](https://www.geelongadvertiser.com.au) - +[Gold Coast Bulletin](https://www.goldcoastbulletin.com.au) - +[Herald Sun](https://www.heraldsun.com.au) - +[The Advertiser/AdelaideNow](https://www.adelaidenow.com.au) - +[The Australian](https://www.theaustralian.com.au) - +[The Chronicle](https://www.thechronicle.com.au) - +[The Courier-Mail](https://www.couriermail.com.au) - +[The Daily Telegraph](https://www.dailytelegraph.com.au) - +[The Mercury Tasmania](https://www.themercury.com.au) - +[The Weekly Times](https://www.weeklytimesnow.com.au) - +[Townsville Bulletin](https://www.townsvillebulletin.com.au)\ +*Australia Nine Entertainment* sites like\ +[Brisbane Times](https://www.brisbanetimes.com.au) - +[The Age](https://www.theage.com.au) - +[The Australian Financial Review](https://www.afr.com) - +[The Sydney Morning Herald](https://www.smh.com.au) - +[WAtoday](https://www.watoday.com.au)\ +*Australian Community Media* sites like (opt-in to custom sites for unlisted)\ +[Bendigo Advertiser](https://www.bendigoadvertiser.com.au) - +[Central Western Daily](https://www.centralwesterndaily.com.au) - +[Daily Liberal](https://www.dailyliberal.com.au) - +[Illawarra Mercury](https://www.illawarramercury.com.au) - +[Newcastle Herald](https://www.newcastleherald.com.au) - +[The Advocate](https://www.theadvocate.com.au) - +[The Border Mail](https://www.bordermail.com.au) - +[The Canberra Times](https://www.canberratimes.com.au) - +[The Courier](https://www.thecourier.com.au) - +[The Daily Advertiser](https://www.dailyadvertiser.com.au) - +[The Examiner](https://www.examiner.com.au) - +[The Northern Daily Leader](https://www.northerndailyleader.com.au) - +[The Standard](https://www.standard.net.au) - +[Western Advocate](https://www.westernadvocate.com.au)\ +*InvestSmart* sites like\ +[InvestSmart](https://www.investsmart.com.au) - +[Intelligent Investor](https://www.intelligentinvestor.com.au)\ +*[McPherson Media Group](https://www.mmg.com.au/portfolio)* sites (opt-in to custom sites)\ +*[Private Media](https://www.privatemedia.com.au)* sites like\ +[Crikey](https://www.crikey.com.au) - +[Smart Company](https://www.smartcompany.com.au) - +[The Mandarin](https://www.themandarin.com.au) + +##### China, Hong Kong & Taiwan +[CommonWealth Magazine Taiwan](https://www.cw.com.tw)* - +[DigiTimes Asia](https://www.digitimes.com) - +[South China Morning Post](https://www.scmp.com) - +[Southern Weekly](https://www.infzm.com) - +[The News Lens](https://www.thenewslens.com) + +##### India +[Bar and Bench](https://www.barandbench.com) - +[Bhaskar](https://www.bhaskar.com) - +[Business Standard](https://www.business-standard.com) - +[Hindustan Times](https://www.hindustantimes.com) - +[Inc42](https://inc42.com) - +[India Today](https://www.indiatoday.in) - +[Live Law](https://www.livelaw.in) - +[LiveMint](https://www.livemint.com) - +[Malayala Manorama](https://www.manoramaonline.com) - +[Mid-Day](https://www.mid-day.com) - +[Newslaundry](https://www.newslaundry.com) - +[NDTV Profit](https://www.ndtvprofit.com) - +[Outlook](https://www.outlookindia.com) - +[Outlook Business](https://www.outlookbusiness.com) - +[Swarajyamag](https://swarajyamag.com) - +[The Economic Times (ET Prime)](https://economictimes.indiatimes.com) - +[The Financial Express](https://www.financialexpress.com) - +[The Hindu](https://www.thehindu.com) - +[The Hindu BusinessLine](https://www.thehindubusinessline.com) - +[The Indian Express](https://indianexpress.com) - +[The Leaflet](https://theleaflet.in) - +[The News Minute](https://www.thenewsminute.com) - +[The Quint](https://www.thequint.com) - +[Times of India](https://timesofindia.indiatimes.com) - +[Vikatan](https://www.vikatan.com) + +##### Indonesia +[Kompas](https://www.kompas.id) - +[Tempo](https://www.tempo.co) + +##### Israel +[Globes](https://www.globes.co.il) - +[The Jerusalem Post](https://www.jpost.com) - +[Ynet](https://www.ynet.co.il) + +Grouped in options:\ +*Haaretz Group* sites like\ +[Haaretz.co.il](https://www.haaretz.co.il) - +[Haaretz.com](https://www.haaretz.com) - +[The Marker](https://www.themarker.com) + +##### Japan +[Business Insider Japan](https://www.businessinsider.jp) - +[Mainichi Shimbun](https://mainichi.jp) - +[Nikkei Asian Review](https://asia.nikkei.com) - +[The Japan Times](https://www.japantimes.co.jp) + +##### Singapore +[Initium Media](https://theinitium.com) - +[Tech in Asia](https://www.techinasia.com)\ +Grouped in options:\ +*SPH Media* sites like\ +[The Business Times](https://www.businesstimes.com.sg) - +[The Straits Times](https://www.straitstimes.com) + +#### Latin America + +##### Argentina +[Ámbito](https://www.ambito.com) - +[El Cronista](https://www.cronista.com) - +[El Tribuno](https://www.eltribuno.com) - +[La Gaceta](https://www.lagaceta.com.ar) - +[La Nación](https://www.lanacion.com.ar)* + +Grouped in options:\ +*Grupo Clarín* sites like\ +[Clarín](https://www.clarin.com) - +[La Voz del Interior](https://www.lavoz.com.ar) - +[Los Andes](https://www.losandes.com.ar) - +[Olé](https://www.ole.com.ar) + +##### Bolivia +[El Deber](https://eldeber.com.bo) + +##### Brazil +[ABC Mais](https://www.abcmais.com) - +[CartaCapital](https://www.cartacapital.com.br) - +[Correio do Povo](https://www.correiodopovo.com.br) - +[Crusoé](https://crusoe.com.br) - +[Estado de Minas](https://www.em.com.br) - +[Exame](https://exame.com) - +[GaúchaZH](https://gauchazh.clicrbs.com.br) - +[Gazeta do Povo](https://www.gazetadopovo.com.br) - +[Grupo Abril](https://grupoabril.com.br) - +[Le Monde Diplomatique Brasil](https://diplomatique.org.br) - +[NSC Total](https://www.nsctotal.com.br) - +[O Estado de S. Paulo](https://estadao.com.br) - +[O Globo](https://oglobo.globo.com) - +[Revista Oeste](https://revistaoeste.com) - +[Valor Econômico](https://valor.globo.com) + +Grouped in options:\ +*UOL* sites like\ +[Folha de S. Paulo](https://www.folha.uol.com.br) - +[UOL](https://www.uol.com.br) + +##### Chile +[Diario Financiero](https://www.df.cl) - +[El Mercurio (+ regional/opt-in to custom sites)](https://digital.elmercurio.com) - +[La Tercera](https://www.latercera.com) +##### Colombia +[Cambio Colombia](https://cambiocolombia.com) - +[El Espectador](https://www.elespectador.com) - +[El Tiempo](https://www.eltiempo.com) +##### Ecuador +[El Universo](https://www.eluniverso.com) +##### Mexico +[El Universal](https://www.eluniversal.com.mx) - +[Mexico News Daily](https://mexiconewsdaily.com) +##### Peru +*Grupo El Comercio* sites like\ +[Diario Correo](https://diariocorreo.pe) - +[El Comercio](https://elcomercio.pe) - +[Gestión](https://gestion.pe) +##### Uruguay +[El Observador](https://www.elobservador.com.uy) - +[El País](https://www.elpais.com.uy) - +[La Diaria](https://ladiaria.com.uy) + +_* free articles only._ + +[Go to top](#bypass-paywalls-clean-for-chrome) + +### Sites with limited number of free articles +The free article limit can normally be bypassed by removing cookies for the site. +Click on the BPC-icon and then *clear cookies*-button in the popup (for unsupported sites grant host permission for domain). +If removing the cookies works you can also add the site as a custom site. + +### New site requests +You can [submit a request for a new website](https://github.com/bpc-clone/bpc_chrome_support/issues) +Please use the issue template, read the following instructions and share your results for a quicker process. +Remember to check the previous requests before asking for a new website. +1. Open incognito window. +2. Clear cookies for the site (by this extension: opt-in to custom sites or grant host permission for the site; also enables blocking of general paywall scripts). +3. Disable JavaScript on the site (by browser, uBlock Origin or other extension). +4. Add the domain as custom site for more bypass options. +5. Open page in reader view (by browser or extension). +6. Try one of the archive sites. + +### Add custom site +Add your own custom site/group (for group use comma-separated list; set domain like group_...). +Check 'Options'-link in popup-menu and go to custom sites. +\* by default BPC has limited host permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for unlisted sites). You can also just request host permissions for the custom sites you've added yourself (or *clear cookies* (BPC-icon) to ask for host permission for current site). + +By default sites' cookies/local storage are blocked/removed (for example to bypass article limit when metered paywall). + +Additional custom options: +* allow/remove cookies (no options selected: cookies are blocked) +* set useragent to Googlebot, Bingbot, Facebookbot or custom +* set referer (to Facebook, Google, Twitter or custom; ignored when Googlebot is set) +* set random ip-address (header X-Forwarded-For) +* disable JavaScript for (sub)domain(s), external domains (when host permission) and/or inline scripts +* block regular expression (to block specific script and/or xhr) +* block_host_perm_add: add additinal host permission(s) for blocked content +* unhide text amp-page +* redirect to amp-page when paywall(selector) +* load text from json when paywall|article(selector) +* load text from archive.is when paywall|article(selector) +* add external link to archive-site when paywall|article(selector) +* remove/unhide elements in dom (optional for dev; check examples) + +[Download example list of custom sites](https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=sites_custom.json) + +### Add excluded site +Add excluded sites/domains (for your subscriptions).\ +You can also exclude a specific domain which is grouped in options. + +### Changelog-releases +* Visit the changelog page: [local](changelog.txt) or [online](https://gitflic.ru/project/magnolia1234/bypass-paywalls-chrome-clean/blob/raw?file=changelog.txt) +* Download the latest version from [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads) + +### License +* Bypass Paywalls Clean is [MIT-licensed](LICENSE.txt). + +### Disclaimer +* This software is provided for educational purposes only and is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. + +[Go to top](#bypass-paywalls-clean-for-chrome) \ No newline at end of file diff --git a/allowlist/Brave-macos-allowlist.mobileconfig b/allowlist/Brave-macos-allowlist.mobileconfig new file mode 100644 index 0000000..bd7b230 --- /dev/null +++ b/allowlist/Brave-macos-allowlist.mobileconfig @@ -0,0 +1,63 @@ + + + + + PayloadContent + + + PayloadContent + + com.brave.Browser + + Forced + + + mcx_preference_settings + + + +ExtensionInstallAllowlist + +lkbebcjgcmobigpeffafkodonchffocl + + + + + + + + + PayloadDisplayName + Brave ExtensionInstallAllowlist - add BPC ID to override browser's restriction + PayloadEnabled + + PayloadIdentifier + com.example.Brave.example.bpc + PayloadType + com.apple.ManagedClient.preferences + PayloadUUID + a5c53548-65aa-11e7-907b-a6006ad3dba0 + PayloadVersion + 1 + + + PayloadDescription + Bypass Paywalls Chrome Clean - Brave + PayloadDisplayName + Brave ExtensionInstallAllowlist for Bypass Paywalls Clean + PayloadIdentifier + com.example.Brave.example.bpc + PayloadOrganization + Bypass Paywalls Chrome Clean + PayloadRemovalDisallowed + + PayloadScope + User + PayloadType + Configuration + PayloadUUID + 33e27889678746574b5f4882e1d3985764907861895746574f95fa247c6003d0cd + PayloadVersion + 1 + + diff --git a/allowlist/Brave-windows-allowlist.reg b/allowlist/Brave-windows-allowlist.reg new file mode 100644 index 0000000..c69fe3b --- /dev/null +++ b/allowlist/Brave-windows-allowlist.reg @@ -0,0 +1,3 @@ +Windows Registry Editor Version 5.00 +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\BraveSoftware\Brave\ExtensionInstallAllowlist] +"1"="lkbebcjgcmobigpeffafkodonchffocl" \ No newline at end of file diff --git a/allowlist/Chrome-macos-allowlist.mobileconfig b/allowlist/Chrome-macos-allowlist.mobileconfig new file mode 100644 index 0000000..47b5a4c --- /dev/null +++ b/allowlist/Chrome-macos-allowlist.mobileconfig @@ -0,0 +1,63 @@ + + + + + PayloadContent + + + PayloadContent + + com.google.Chrome + + Forced + + + mcx_preference_settings + + + +ExtensionInstallAllowlist + +lkbebcjgcmobigpeffafkodonchffocl + + + + + + + + + PayloadDisplayName + Chrome ExtensionInstallAllowlist - add BPC ID to override browser's restriction + PayloadEnabled + + PayloadIdentifier + com.example.Chrome.example.bpc + PayloadType + com.apple.ManagedClient.preferences + PayloadUUID + a5c53548-65aa-11e7-907b-a6006ad3dba0 + PayloadVersion + 1 + + + PayloadDescription + Bypass Paywalls Chrome Clean + PayloadDisplayName + Chrome ExtensionInstallAllowlist for Bypass Paywalls Clean + PayloadIdentifier + com.example.Chrome.example.bpc + PayloadOrganization + Bypass Paywalls Chrome Clean + PayloadRemovalDisallowed + + PayloadScope + User + PayloadType + Configuration + PayloadUUID + 33e27889678746574b5f4882e1d3985764907861895746574f95fa247c6003d0cd + PayloadVersion + 1 + + diff --git a/allowlist/Chrome-windows-allowlist.reg b/allowlist/Chrome-windows-allowlist.reg new file mode 100644 index 0000000..df78ee4 --- /dev/null +++ b/allowlist/Chrome-windows-allowlist.reg @@ -0,0 +1,3 @@ +Windows Registry Editor Version 5.00 +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist] +"1"="lkbebcjgcmobigpeffafkodonchffocl" \ No newline at end of file diff --git a/allowlist/Edge-macos-allowlist.mobileconfig b/allowlist/Edge-macos-allowlist.mobileconfig new file mode 100644 index 0000000..4c0d7dc --- /dev/null +++ b/allowlist/Edge-macos-allowlist.mobileconfig @@ -0,0 +1,63 @@ + + + + + PayloadContent + + + PayloadContent + + com.microsoft.Edge + + Forced + + + mcx_preference_settings + + + +ExtensionInstallAllowlist + +lkbebcjgcmobigpeffafkodonchffocl + + + + + + + + + PayloadDisplayName + MS Edge ExtensionInstallAllowlist - add BPC ID to override browser's restriction + PayloadEnabled + + PayloadIdentifier + com.example.Edge.example.bpc + PayloadType + com.apple.ManagedClient.preferences + PayloadUUID + a5c53548-65aa-11e7-907b-a6006ad3dba0 + PayloadVersion + 1 + + + PayloadDescription + Bypass Paywalls Chrome Clean - MS Edge + PayloadDisplayName + MS Edge ExtensionInstallAllowlist for Bypass Paywalls Clean + PayloadIdentifier + com.example.Edge.example.bpc + PayloadOrganization + Bypass Paywalls Chrome Clean + PayloadRemovalDisallowed + + PayloadScope + User + PayloadType + Configuration + PayloadUUID + 33e27889678746574b5f4882e1d3985764907861895746574f95fa247c6003d0cd + PayloadVersion + 1 + + diff --git a/allowlist/Edge-windows-allowlist.reg b/allowlist/Edge-windows-allowlist.reg new file mode 100644 index 0000000..cfefa2f --- /dev/null +++ b/allowlist/Edge-windows-allowlist.reg @@ -0,0 +1,3 @@ +Windows Registry Editor Version 5.00 +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallAllowlist] +"1"="lkbebcjgcmobigpeffafkodonchffocl" \ No newline at end of file diff --git a/allowlist/Edge-windows-forcelist-undo.reg b/allowlist/Edge-windows-forcelist-undo.reg new file mode 100644 index 0000000..15cfedd --- /dev/null +++ b/allowlist/Edge-windows-forcelist-undo.reg @@ -0,0 +1,3 @@ +Windows Registry Editor Version 5.00 +[-HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist] +"1"="lkbebcjgcmobigpeffafkodonchffocl" diff --git a/allowlist/Edge-windows-forcelist.reg b/allowlist/Edge-windows-forcelist.reg new file mode 100644 index 0000000..82a5ecb --- /dev/null +++ b/allowlist/Edge-windows-forcelist.reg @@ -0,0 +1,3 @@ +Windows Registry Editor Version 5.00 +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist] +"1"="lkbebcjgcmobigpeffafkodonchffocl" diff --git a/allowlist/README.html b/allowlist/README.html new file mode 100644 index 0000000..a84b981 --- /dev/null +++ b/allowlist/README.html @@ -0,0 +1,66 @@ + + + + + + README.md + + + +

Add extension (crx) to allowlist

+ +

Windows

+

Advance Notice: after adding the allowlist-policy you'll get a message Your browser is managed by your organisation on the extensions page (and some settings like Secure DNS are disabled).
+To remove this message you'll have to remove the added policy from the registry again (run regedit and for Chrome check HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome).

+

If you still want to add the extension to the allowlist:

+

Run as administrator one of the reg-files in allowlist-folder of extension (unzip).

+ +

If you already added extensions to the allowlist than you should change "1" to a new value (also change name of HLM-key for beta/developer versions of browsers).
+To add more extensions to the allowlist you can add more lines.
+Example Chrome-regfile:

+
+      Windows Registry Editor Version 5.00  
+[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist]  
+"1"="lkbebcjgcmobigpeffafkodonchffocl"
+"2"="extension-id2"
+
+    
+

You can also run the PowerShell script bypass_paywalls_clean_allowlist.ps1 (as administrator) to add extension to the allowlist (script checks if extension already allowed or adds new registry-key).
+For the parameter browser enter chrome, edge or brave.

+

macOS

+

Run with admin rights one of the .mobileconfig files in allowlist-folder of extension (unzip).
+Finally restart the browser's process (in the Dock: right click on Chrome, 'Quit', reopen).
+This assumes your device is not being managed by MDM software and you don't have any profile related to the 'ExtensionInstallAllowlist' policy already active.
+To add more extensions to the allowlist you can add more lines.

+
+      <key>ExtensionInstallAllowlist</key>
+<array>
+<string>lkbebcjgcmobigpeffafkodonchffocl</string>
+<string>extension-id2</string>
+</array>
+
+    
+

Linux

+

+ Chromium-based browsers allow local installations of extensions, so not necessary :)

+ + diff --git a/allowlist/README.md b/allowlist/README.md new file mode 100644 index 0000000..42b202f --- /dev/null +++ b/allowlist/README.md @@ -0,0 +1,46 @@ +# Add extension (crx) to allowlist + +* [Windows](#windows) +* [macOS](#macOS) +* [Linux](#linux) + +### Windows + +Advance Notice: after adding the allowlist-policy you'll get a message *Your browser is managed by your organisation* on the extensions page (and some settings like Secure DNS are disabled).\ +To remove this message you'll have to remove the added policy from the registry again (run regedit and for Chrome check HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome). + +If you still want to add the extension to the allowlist: + +Run as administrator one of the reg-files in allowlist-folder of extension (unzip). +* for Edge 116+ you may also need to run the *Forcelist* reg-file (also undo reg-file provided) or switch to *Load unpacked* installation. + +If you already added extensions to the allowlist than you should change "1" to a new value (also change name of HLM-key for beta/developer versions of browsers).\ +To add more extensions to the allowlist you can add more lines.\ +Example Chrome-regfile: +``` +Windows Registry Editor Version 5.00 +[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist] +"1"="lkbebcjgcmobigpeffafkodonchffocl" +"2"="extension-id2" +``` + +You can also run the PowerShell script *bypass_paywalls_clean_allowlist.ps1* (as administrator) to add extension to the allowlist (script checks if extension already allowed or adds new registry-key).\ +For the parameter browser enter chrome, edge or brave. + +### macOS + +Run with admin rights one of the .mobileconfig files in allowlist-folder of extension (unzip).\ +Finally restart the browser's process (in the Dock: right click on Chrome, 'Quit', reopen).\ +This assumes your device is not being managed by MDM software and you don't have any profile related to the 'ExtensionInstallAllowlist' policy already active.\ +To add more extensions to the allowlist you can add more lines. +``` +ExtensionInstallAllowlist + +lkbebcjgcmobigpeffafkodonchffocl +extension-id2 + +``` + +### Linux + +[Chromium-based browsers allow local installations of extensions](https://developer.chrome.com/docs/extensions/mv3/hosting/#hosting), so not necessary :) diff --git a/allowlist/bypass_paywalls_clean_allowlist.ps1 b/allowlist/bypass_paywalls_clean_allowlist.ps1 new file mode 100644 index 0000000..de0bedb --- /dev/null +++ b/allowlist/bypass_paywalls_clean_allowlist.ps1 @@ -0,0 +1,39 @@ +param( + [Parameter(Mandatory=$true)] + [ValidateSet("edge", "chrome", "brave")] + [string]$browser +) + +$regPath = switch ($browser) { + "edge" { "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallAllowlist" } + "chrome" { "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist" } + "brave" { "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\BraveSoftware\Brave\ExtensionInstallAllowlist" } +} + +$valueData = "lkbebcjgcmobigpeffafkodonchffocl" + +if (Test-Path $regPath) { + + $values = Get-ItemProperty $regPath + +} else { + + New-Item -Path $regPath -ItemType RegistryKey -Force + +} + +if ($values | Where-Object { $_.PSObject.Properties.Value -eq $valueData} ) { + + Write-Host "The value already exists." + +} else { + $newValueName = 1 + while ($values | Where-Object { $_.PSObject.Properties.Name -eq $newValueName.ToString()} ) { + $newValueName++ + } + + New-ItemProperty -Path $regPath -Name $newValueName -Value $valueData -PropertyType String + + Write-Host "A new value has been added with the name '$newValueName'." + +} diff --git a/background.js b/background.js new file mode 100644 index 0000000..93dcbac --- /dev/null +++ b/background.js @@ -0,0 +1,2222 @@ +'use strict'; +var ext_api = (typeof browser === 'object') ? browser : chrome; +var url_loc = (typeof browser === 'object') ? 'firefox' : 'chrome'; +var manifestData = ext_api.runtime.getManifest(); +var ext_name = manifestData.name; +var ext_version = manifestData.version; +var ext_manifest_version = manifestData.manifest_version; +var navigator_ua = navigator.userAgent; +var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile'); + +if (ext_manifest_version === 3) + self.importScripts('sites.js'); + +if (typeof ext_api.action !== 'object') { + ext_api.action = ext_api.browserAction; +} + +var dompurify_sites = []; +var optin_setcookie = false; +var optin_update = true; +var blocked_referer = false; +var domain; + +// defaultSites are loaded from sites.js at installation extension + +var restrictions = { + 'autohebdo.fr': /\/www\.autohebdo\.fr\//, + 'bloomberg.com': /^((?!\.bloomberg\.com\/news\/terminal\/).)*$/, + 'bloombergadria.com': /^((?!\.bloombergadria\.com\/video\/).)*$/, + 'dailywire.com': /^((?!\.dailywire\.com\/(episode|show|videos|watch)).)*$/, + 'economictimes.com': /\.economictimes\.com($|\/($|(__assets|prime)(\/.+)?|.+\.cms))/, + 'espn.com': /^((?!espn\.com\/watch).)*$/, + 'esquire.com': /^((?!\/classic\.esquire\.com\/).)*$/, + 'expresso.pt': /^((?!\/tribuna\.expresso\.pt\/).)*$/, + 'foreignaffairs.com': /^((?!\/reader\.foreignaffairs\.com\/).)*$/, + 'ft.com': /^((?!\/cn\.ft\.com\/).)*$/, + 'hilltimes.com': /^((?!\.hilltimes\.com\/slideshow\/).)*$/, + 'hindustantimes.com': /^((?!\/epaper\.hindustantimes\.com\/).)*$/, + 'ilmanifesto.it': /^((?!\/ilmanifesto\.it\/edizioni\/).)*$/, + 'ilsole24ore.com': /^((?!\/ntplus.+\.ilsole24ore\.com\/).)*$/, + 'leparisien.fr': /^((?!\/l\.leparisien\.fr\/).)*$/, + 'livemint.com': /^((?!\/epaper\.livemint\.com\/).)*$/, + 'lopinion.fr': /^((?!\.lopinion\.fr\/lejournal).)*$/, + 'mid-day.com': /^((?!\/epaper\.mid-day\.com\/).)*$/, + 'nytimes.com': /^((?!\/(help|myaccount|timesmachine)\.nytimes\.com\/).)*$/, + 'nzz.ch': /^((?!\/epaper\.nzz\.ch\/).)*$/, + 'quora.com': /^((?!quora\.com\/search\?q=).)*$/, + 'science.org': /^((?!\.science\.org\/doi\/).)*$/, + 'sky.it': /\/(sport|tg24)\.sky\.it\//, + 'study.com': /\/study\.com\/.+\/lesson\//, + 'sueddeutsche.de': /^((?!zeitung\.sueddeutsche\.de).)*$/, + 'tagesspiegel.de': /^((?!\/(background|checkpoint)\.tagesspiegel\.de\/).)*$/, + 'techinasia.com': /\.techinasia\.com\/.+/, + 'thehindu.com': /^((?!epaper\.thehindu\.com).)*$/, + 'thehindubusinessline.com': /^((?!epaper\.thehindubusinessline\.com).)*$/, + 'thetimes.com': /^((?!epaper\.thetimes\.com).)*$/, + 'uol.com.br': /^((?!(conta|email)\.uol\.com\.br).)*$/, +} + +for (let domain of grouped_sites['###_au_news_corp']) + restrictions[domain] = new RegExp('^((?!todayspaper\\.' + domain.replace(/\./g, '\\.') + '\\/).)*$'); +for (let domain of grouped_sites['###_ch_media']) + restrictions[domain] = new RegExp('^((?!epaper\\.' + domain.replace(/\./g, '\\.') + '\\/).)*$'); + +if (typeof browser !== 'object') { + for (let domain of []) + restrictions[domain] = new RegExp('((\\/|\\.)' + domain.replace(/\./g, '\\.') + '\\/$|' + restrictions[domain].toString().replace(/(^\/|\/$)/g, '') + ')'); +} + +// Don't remove cookies before/after page load +var allow_cookies = []; +var remove_cookies = []; +// select specific cookie(s) to hold/drop from remove_cookies domains +var remove_cookies_select_hold, remove_cookies_select_drop; + +// Set User-Agent/headers +var use_google_bot, use_bing_bot, use_facebook_bot, use_useragent_custom, use_useragent_custom_obj, use_headers_custom, use_headers_custom_obj; +// Set Referer +var use_facebook_referer, use_google_referer, use_twitter_referer, use_referer_custom, use_referer_custom_obj; +// Set random IP-address +var random_ip = {}; +var use_random_ip = []; +// concat all sites with change of headers (useragent, referer or random ip) +var change_headers; + +// block paywall-scripts +var blockedRegexes = {}; +var blockedRegexesDomains = []; +var blockedRegexesGeneral = {}; +var blockedJsInline = {}; +var blockedJsInlineDomains = []; + +// unhide text on amp-page +var amp_unhide; +// redirect to amp-page +var amp_redirect; +// load contentScript in all frames +var cs_all_frames; +// block contentScript +var cs_block; +// clear localStorage in contentScript +var cs_clear_lclstrg; +// code for contentScript +var cs_code; +// parameters for contentScript (default) +var cs_param; +// load text from json (script[type="application/ld+json"]) +var ld_json; +// load text from json (script#__NEXT_DATA__) +var ld_json_next; +// load text from json (script source) +var ld_json_source; +// load text from json (link[rel="alternate"][type="application/json"][href]) +var ld_json_url; +// load text from archive.is +var ld_archive_is; +// load text from och.to/unlock +var ld_och_to_unlock; +// add external link to article +var add_ext_link; + +// custom: block javascript +var block_js_custom = []; +var block_js_custom_ext = []; + +// manifest v3 +var gpw_domains; +var rule_excluded_base_domains; + +function initSetRules() { + allow_cookies = []; + remove_cookies = []; + remove_cookies_select_drop = {}; + remove_cookies_select_hold = {}; + use_google_bot = []; + use_bing_bot = []; + use_facebook_bot = []; + use_useragent_custom = []; + use_useragent_custom_obj = {}; + use_headers_custom = []; + use_headers_custom_obj = {}; + use_facebook_referer = []; + use_google_referer = []; + use_twitter_referer = []; + use_referer_custom = []; + use_referer_custom_obj = {}; + random_ip = {}; + change_headers = []; + amp_unhide = []; + amp_redirect = {}; + cs_all_frames = []; + cs_block = {}; + cs_clear_lclstrg = []; + cs_code = {}; + cs_param = {}; + ld_json = {}; + ld_json_next = {}; + ld_json_source = {}; + ld_json_url = {}; + ld_archive_is = {}; + ld_och_to_unlock = {}; + add_ext_link = {}; + block_js_custom = []; + block_js_custom_ext = []; + blockedRegexes = {}; + blockedRegexesDomains = []; + blockedRegexesGeneral = {}; + blockedJsInline = {}; + blockedJsInlineDomains = []; + init_custom_flex_domains(); +} + +const userAgentDesktopG = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"; +const userAgentMobileG = "Chrome/115.0.5790.171 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)"; + +const userAgentDesktopB = "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"; +const userAgentMobileB = "Chrome/115.0.5790.171 Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"; + +const userAgentDesktopF = 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)'; + +var enabledSites = []; +var disabledSites = []; +var optionSites = {}; +var customSites = {}; +var customSites_grouped_domains = []; +var customSites_domains = []; +var updatedSites = {}; +var updatedSites_new = []; +var updatedSites_domains_new = []; +var excludedSites = []; + +function setDefaultOptions() { + ext_api.storage.local.set({ + sites: filterObject(defaultSites, function (val, key) { + return val.domain && !val.domain.match(/^(###$|#options_(disable|optin)_)/) + }, + function (val, key) { + return [key, val.domain] + }) + }, function () { + ext_api.runtime.openOptionsPage(); + }); +} + +function check_sites_updated(sites_updated_json, optin_update = false) { + fetch(sites_updated_json) + .then(response => { + if (response.ok) { + response.json().then(json => { + json = filterObject(json, function (val, key) { + let domain_filter = []; + return (val.domain && !domain_filter.includes(val.domain) && !(val.upd_version && (val.upd_version <= ext_version))) + }); + expandSiteRules(json, true); + ext_api.storage.local.set({ + sites_updated: json + }); + if (!optin_update) { + let updated_ext_version_new = Object.values(json).map(x => x.upd_version || '').sort().pop(); + if (updated_ext_version_new) + setExtVersionNew(updated_ext_version_new); + } + }) + } + }).catch(err => false); +} + +var ext_path = 'https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file='; +var sites_updated_json = 'sites_updated.json'; +var sites_updated_json_online = ext_path + sites_updated_json; +var self_hosted = !!(manifestData.update_url || (manifestData.browser_specific_settings && manifestData.browser_specific_settings.gecko.update_url)); + +function clear_sites_updated() { + ext_api.storage.local.set({ + sites_updated: {} + }); +} + +function prep_regex_str(str, domain = '') { + if (domain) + str = str.replace(/{domain}/g, domain.replace(/\./g, '\\.')); + return str.replace(/^\//, '').replace(/\/\//g, '/').replace(/([^\\])\/$/, "$1") +} + +var add_session_rule; +var init_session_rules; +var push_session_rule; +var update_session_rules; +if (ext_manifest_version === 3) { + +init_session_rules = function (counters = true, rules = true) { + if (counters) { + rule_id = 0; + regex_id = 0; + domain_id = 0; + } + if (rules) { + sesRules = []; + sesRuleIds = []; + } +} + +push_session_rule = function (rule, rule_id) { + sesRules.push(rule); + sesRuleIds.push(rule_id); +} + +update_session_rules = function (rules, rule_ids) { + ext_api.declarativeNetRequest.updateSessionRules({ + addRules: rules, + removeRuleIds: rule_ids + }, ); +} + +add_session_rule = function (domain, rule, blockedRegexes_rule = '', blockedRegexesGeneral_rule = '', blockedJsInline_rule = '') { + function regexToUrlFilter(rule, regex, domain) { + let urlFilter; + if (!(regex.match(/([([|*{$\^]|\\[a-z\?])/) || regex.match(/([^\.]|\\\.)\+/))) { + let match_domain = gpw_domains.concat(['tinypass.com', domain]).find(x => regex.replace(/\\/g, '').match(new RegExp(x.replace(/\./, '\\.')))); + urlFilter = regex.replace(/\\/g, '').replace(/\.\+/g, '*'); + if (match_domain) + urlFilter = '||' + urlFilter.replace(/^[\.\/]/g, ''); + delete rule.condition.regexFilter; + rule.condition.urlFilter = urlFilter; + } + if (!urlFilter) + regex_id++; + } + domain_id++; + if (block_js_custom.includes(domain) || block_js_custom_ext.includes(domain)) { + rule_id++; + let rule_regex; + let url_filter; + let allow = false; + if (block_js_custom.includes(domain)) { + rule_regex = "[\\/\\.]" + domain.replace(/\./g, '\\.') + "\\/"; + url_filter = '||' + domain; + if (block_js_custom_ext.includes(domain)) + url_filter = '*'; + } else if (block_js_custom_ext.includes(domain)) { + url_filter = '*'; + allow = true; + } + + let block_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "block" + }, + "condition": { + "initiatorDomains": [domain], + "urlFilter": url_filter, + "resourceTypes": ["script"] + } + }; + push_session_rule(block_rule, rule_id); + + if (allow) { + rule_id++; + let allow_rule = { + "id": rule_id, + "priority": 2, + "action": { + "type": "allow" + }, + "condition": { + "initiatorDomains": [domain], + "urlFilter": '||' + domain, + "resourceTypes": ["script"] + } + }; + push_session_rule(allow_rule, rule_id); + } + + } else if (blockedRegexes_rule) { + rule_id++; + let rule_regex = blockedRegexes_rule; + if (rule_regex instanceof RegExp) + rule_regex = rule_regex.source; + + let block_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "block" + }, + "condition": { + "initiatorDomains": [domain], + "regexFilter": rule_regex, + "resourceTypes": ["script", "xmlhttprequest"] + } + }; + regexToUrlFilter(block_rule, rule_regex, domain); + push_session_rule(block_rule, rule_id); + } + + if (blockedRegexesGeneral_rule) { + rule_id++; + let rule_regex = blockedRegexesGeneral_rule.block_regex; + if (rule_regex instanceof RegExp) + rule_regex = rule_regex.source; + let rule_excluded_domains = excludedSites.concat(rule_excluded_base_domains, blockedRegexesGeneral_rule.excluded_domains); + + let block_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "block" + }, + "condition": { + "excludedInitiatorDomains": rule_excluded_domains, + "regexFilter": rule_regex, + "resourceTypes": ["script", "xmlhttprequest"] + } + }; + regexToUrlFilter(block_rule, rule_regex, domain); + push_session_rule(block_rule, rule_id); + } + + let header_rule = {}; + if (!rule.allow_cookies || rule.useragent || rule.useragent_custom || rule.headers_custom || rule.referer || rule.referer_custom || rule.random_ip) { + rule_id++; + header_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "modifyHeaders", + "requestHeaders": [] + }, + "condition": { + "urlFilter": "||" + domain, + "resourceTypes": ["main_frame", "sub_frame", "xmlhttprequest"] + } + }; + + if (!allow_cookies.includes(domain)) { + header_rule.action.requestHeaders.push({ + "header": "Cookie", + "operation": "set", + "value": "" + }); + } + + let mobile = navigator.userAgent.toLowerCase().includes('mobile'); + let useUserAgentMobile = mobile && ![].includes(domain); + + let userAgentG = useUserAgentMobile ? userAgentMobileG : userAgentDesktopG; + let userAgentB = useUserAgentMobile ? userAgentMobileB : userAgentDesktopB; + + if (rule.useragent || rule.useragent_custom || rule.headers_custom) { + if (rule.useragent === 'googlebot') { + let googlebotEnabled = !(grouped_sites['###_es_grupo_vocento'].includes(domain) && mobile); + if (googlebotEnabled) { + if (['economictimes.com', 'economictimes.indiatimes.com'].includes(domain)) { + header_rule.condition.urlFilter = '||' + domain + '/*.cms'; + } else if (domain === 'handelsblatt.com') { + header_rule.condition.urlFilter = '||' + domain + '/*.html'; + } else if (domain === 'leparisien.fr') { + header_rule.condition.urlFilter = '||www.' + domain; + } + header_rule.action.requestHeaders.push({ + "header": "User-Agent", + "operation": "set", + "value": userAgentG + }); + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": "https://www.google.com/" + }); + header_rule.action.requestHeaders.push({ + "header": "X-Forwarded-For", + "operation": "set", + "value": "66.249.66.1" + }); + } + } else if (rule.useragent === 'bingbot') { + header_rule.action.requestHeaders.push({ + "header": "User-Agent", + "operation": "set", + "value": userAgentB + }); + } else if (rule.useragent === 'facebookbot') { + header_rule.action.requestHeaders.push({ + "header": "User-Agent", + "operation": "set", + "value": userAgentDesktopF + }); + } else { + if (rule.useragent_custom) { + header_rule.action.requestHeaders.push({ + "header": "User-Agent", + "operation": "set", + "value": use_useragent_custom_obj[domain] + }); + } + if (rule.headers_custom) { + for (let header in use_headers_custom_obj[domain]) { + header_rule.action.requestHeaders.push({ + "header": header, + "operation": "set", + "value": use_headers_custom_obj[domain][header] + }); + } + } + } + } else if (rule.referer || rule.referer_custom) { + if (use_google_referer.includes(domain)) { + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": "https://www.google.com/" + }); + } else if (use_facebook_referer.includes(domain)) { + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": "https://www.facebook.com/" + }); + } else if (use_twitter_referer.includes(domain)) { + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": "https://t.co/" + }); + } + if (rule.referer_custom) { + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": use_referer_custom_obj[domain] + }); + } + } + + if (rule.random_ip) { + let randomIP_val; + if (rule.random_ip === 'eu') + randomIP_val = randomIP(185, 185); + else + randomIP_val = randomIP(); + header_rule.action.requestHeaders.push({ + "header": "X-Forwarded-For", + "operation": "set", + "value": randomIP_val + }); + } + if (header_rule.action.requestHeaders.length) + push_session_rule(header_rule, rule_id); + else + rule_id--; + } + + if (blockedJsInline_rule) { + rule_id++; + let rule_regex = blockedJsInline_rule.source; + let block_inline_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "modifyHeaders", + "responseHeaders": [{ + "header": "Content-Security-Policy", + "operation": "set", + "value": "script-src *;" + } + ] + }, + "condition": { + "requestDomains": [domain], + "regexFilter": rule_regex, + "resourceTypes": ["main_frame", "sub_frame"] + } + } + regexToUrlFilter(block_inline_rule, rule_regex, domain); + push_session_rule(block_inline_rule, rule_id); + } + + if (grouped_sites['###_au_news_corp'].includes(domain)) { + rule_id++; + regex_id++; + let redirect_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "redirect", + "redirect": { + "regexSubstitution": "https://www." + domain + "/\\1?amp" + } + }, + "condition": { + "regexFilter": ".+\\." + domain + "\\/subscribe\\/.+&dest=.+\\.com\\.au%2F([\\w-%]+)&.+", + "resourceTypes": ["main_frame"] + } + }; + push_session_rule(redirect_rule, rule_id); + } +} + +} // manifest v3 + +function addRules(domain, rule, flex = false) { + if (rule.remove_cookies > 0 || rule.hasOwnProperty('remove_cookies_select_hold') || !(rule.hasOwnProperty('allow_cookies') || rule.hasOwnProperty('remove_cookies_select_drop')) || rule.cs_clear_lclstrg) + cs_clear_lclstrg.push(domain); + if (rule.hasOwnProperty('remove_cookies_select_drop') || rule.hasOwnProperty('remove_cookies_select_hold')) { + rule.allow_cookies = 1; + rule.remove_cookies = 1; + } + if (rule.allow_cookies > 0 && !allow_cookies.includes(domain)) + allow_cookies.push(domain); + if (rule.remove_cookies > 0 && !remove_cookies.includes(domain)) + remove_cookies.push(domain); + if (rule.hasOwnProperty('remove_cookies_select_drop')) + remove_cookies_select_drop[domain] = rule.remove_cookies_select_drop; + if (rule.hasOwnProperty('remove_cookies_select_hold')) + remove_cookies_select_hold[domain] = rule.remove_cookies_select_hold; + if (rule.hasOwnProperty('block_regex')) { + if (rule.block_regex instanceof RegExp) + blockedRegexes[domain] = rule.block_regex; + else { + try { + blockedRegexes[domain] = new RegExp(prep_regex_str(rule.block_regex, domain)); + } catch (e) { + console.log(`regex not valid, error: ${e}`); + } + } + } + if (rule.hasOwnProperty('block_regex_general')) { + if (rule.block_regex_general instanceof RegExp) + blockedRegexesGeneral[domain] = {block_regex: rule.block_regex_general}; + else { + try { + blockedRegexesGeneral[domain] = {block_regex: new RegExp(prep_regex_str(rule.block_regex_general, domain))}; + } catch (e) { + console.log(`regex not valid, error: ${e}`); + } + } + blockedRegexesGeneral[domain]['excluded_domains'] = rule.excluded_domains ? rule.excluded_domains : []; + } + if (rule.hasOwnProperty('block_js_inline')) { + if (rule.block_js_inline instanceof RegExp) + blockedJsInline[domain] = rule.block_js_inline; + else { + try { + blockedJsInline[domain] = new RegExp(prep_regex_str(rule.block_js_inline, domain)); + } catch (e) { + console.log(`regex not valid, error: ${e}`); + } + } + } + if (rule.useragent) { + switch (rule.useragent) { + case 'googlebot': + if (!use_google_bot.includes(domain)) + use_google_bot.push(domain); + break; + case 'bingbot': + if (!use_bing_bot.includes(domain)) + use_bing_bot.push(domain); + break; + case 'facebookbot': + if (!use_facebook_bot.includes(domain)) + use_facebook_bot.push(domain); + break; + } + } else if (rule.useragent_custom || rule.headers_custom) { + if (!use_useragent_custom.includes(domain)) { + use_useragent_custom.push(domain); + use_useragent_custom_obj[domain] = rule.useragent_custom; + } + if (!use_headers_custom.includes(domain)) { + use_headers_custom.push(domain); + use_headers_custom_obj[domain] = rule.headers_custom; + } + } + if (rule.referer) { + switch (rule.referer) { + case 'facebook': + if (!use_facebook_referer.includes(domain)) + use_facebook_referer.push(domain); + break; + case 'google': + if (!use_google_referer.includes(domain)) + use_google_referer.push(domain); + break; + case 'twitter': + if (!use_twitter_referer.includes(domain)) + use_twitter_referer.push(domain); + break; + } + } else if (rule.referer_custom) { + if (!use_referer_custom.includes(domain)) { + use_referer_custom.push(domain); + use_referer_custom_obj[domain] = rule.referer_custom; + } + } + if (rule.random_ip) { + random_ip[domain] = rule.random_ip; + } + if (rule.amp_unhide > 0 && !amp_unhide.includes(domain)) + amp_unhide.push(domain); + if (rule.amp_redirect) + amp_redirect[domain] = rule.amp_redirect; + if (rule.cs_all_frames) + cs_all_frames.push(domain); + if (rule.cs_block) + cs_block[domain] = 1; + if (rule.cs_code) { + if (typeof rule.cs_code === 'string') { + try { + rule.cs_code = JSON.parse(rule.cs_code); + } catch (e) { + console.log(`cs_code not valid: ${rule.cs_code} error: ${e}`); + } + } + if (typeof rule.cs_code === 'object') + cs_code[domain] = rule.cs_code; + } + if (rule.cs_param) + cs_param[domain] = rule.cs_param; + if (rule.ld_json) + ld_json[domain] = rule.ld_json; + if (rule.ld_json_next) + ld_json_next[domain] = rule.ld_json_next; + if (rule.ld_json_source) + ld_json_source[domain] = rule.ld_json_source; + if (rule.ld_json_url) + ld_json_url[domain] = rule.ld_json_url; + if (rule.ld_archive_is) + ld_archive_is[domain] = rule.ld_archive_is; + if (rule.ld_och_to_unlock) + ld_och_to_unlock[domain] = rule.ld_och_to_unlock; + if (rule.ld_json || rule.ld_json_next || rule.ld_json_source || rule.ld_json_url || rule.ld_archive_is || rule.ld_och_to_unlock || rule.cs_dompurify) + if (!dompurify_sites.includes(domain)) + dompurify_sites.push(domain); + if (rule.add_ext_link && rule.add_ext_link_type) + add_ext_link[domain] = {css: rule.add_ext_link, type: rule.add_ext_link_type}; + + // custom + if (rule.block_js > 0) + block_js_custom.push(domain); + if (rule.block_js_ext > 0) + block_js_custom_ext.push(domain); + + if (ext_manifest_version === 3) { + init_session_rules(false, flex); + add_session_rule(domain, rule, blockedRegexes[domain], blockedRegexesGeneral[domain], blockedJsInline[domain]); + if (flex && sesRules.length) + update_session_rules(sesRules, sesRuleIds); + } +} + +function customFlexAddRules(custom_domain, rule) { + addRules(custom_domain, rule, true); + if (blockedRegexes[custom_domain]) + blockedRegexesDomains.push(custom_domain); + if (blockedJsInline[custom_domain]) { + blockedJsInlineDomains.push(custom_domain); + if (ext_manifest_version === 2) + disableJavascriptInline(); + } + if (rule.useragent || rule.useragent_custom || rule.headers_custom || rule.referer || rule.referer_custom || rule.random_ip) + change_headers.push(custom_domain); + if (rule.random_ip) + use_random_ip.push(custom_domain); + ext_api.tabs.reload({bypassCache: true}); +} + +// manifest v3 +var rule_id = 0; +var regex_id = 0; +var domain_id = 0; +var sesRules = []; +var sesRuleIds = []; + +function set_rules(sites, sites_updated, sites_custom) { + initSetRules(); + let prev_rule_id = rule_id; + if (ext_manifest_version === 3) + init_session_rules(); + for (let site in sites) { + let site_domain = sites[site].toLowerCase(); + let custom = false; + if (!site_domain.match(/^(###$|#options_)/)) { + let rule = {}; + let site_default = defaultSites.hasOwnProperty(site) ? site : Object.keys(defaultSites).find(default_key => compareKey(default_key, site)); + if (site_default) { + rule = defaultSites[site_default]; + let site_updated = Object.keys(sites_updated).find(updated_key => compareKey(updated_key, site)); + if (site_updated) { + rule = sites_updated[site_updated]; + if (rule.nofix && rule.group) { + enabledSites.splice(enabledSites.indexOf(site_domain), 1); + nofix_sites.push(site_domain); + } + } + } else if (sites_updated.hasOwnProperty(site)) { // updated (new) sites + rule = sites_updated[site]; + } else if (sites_custom.hasOwnProperty(site)) { // custom (new) sites + rule = sites_custom[site]; + custom = true; + } else + continue; + let domains = [site_domain]; + let group = false; + if (rule.hasOwnProperty('group')) { + domains = (typeof rule.group !== 'string') ? rule.group : rule.group.split(','); + group = true; + } + let rule_default = {}; + if (rule.hasOwnProperty('exception')) { + for (let key in rule) + rule_default[key] = rule[key]; + } + for (let domain of domains) { + let custom_in_group = false; + if (rule_default.hasOwnProperty('exception')) { + let exception_rule = rule_default.exception.filter(x => domain === x.domain || (typeof x.domain !== 'string' && x.domain.includes(domain))); + if (exception_rule.length > 0) + rule = exception_rule[0]; + else + rule = rule_default; + } + // custom domain for default site(group) + if (!custom) { + let isCustomSite = matchDomain(customSites_domains, domain); + let customSite_title = isCustomSite ? Object.keys(customSites).find(key => customSites[key].domain === isCustomSite) : ''; + if (customSite_title && !customSitesExt_remove.includes(isCustomSite)) { + // add default block_regex + let block_regex_default = ''; + if (rule.hasOwnProperty('block_regex')) + block_regex_default = rule.block_regex; + rule = {}; + for (let key in sites_custom[customSite_title]) + rule[key] = sites_custom[customSite_title][key]; + if (block_regex_default && !rule.block_regex_ignore_default) { + if (rule.hasOwnProperty('block_regex')) { + if (block_regex_default instanceof RegExp) + block_regex_default = block_regex_default.source; + rule.block_regex = '(' + block_regex_default + '|' + prep_regex_str(rule.block_regex, domain) + ')'; + } else + rule.block_regex = block_regex_default; + } + if (group) + custom_in_group = true; + else + custom = true; + } else { + if (rule.nofix) { + enabledSites.splice(enabledSites.indexOf(domain), 1); + nofix_sites.push(domain); + } + } + } + addRules(domain, rule); + } + } + } + blockedRegexesDomains = Object.keys(blockedRegexes); + blockedJsInlineDomains = Object.keys(blockedJsInline); + if (ext_manifest_version === 2) + disableJavascriptInline(); + else if (ext_manifest_version === 3) + update_session_rules(sesRules, sesRuleIds); + use_random_ip = Object.keys(random_ip); + change_headers = use_google_bot.concat(use_bing_bot, use_facebook_bot, use_useragent_custom, use_headers_custom, use_facebook_referer, use_google_referer, use_twitter_referer, use_referer_custom, use_random_ip); + + if (ext_manifest_version === 3) { + let block_rules_length = blockedRegexesDomains.length + blockedJsInlineDomains.length; + console.log('block_rules: ' + block_rules_length); + console.log('regex_rules (max. 1000): ' + regex_id); + console.log('total_rules (max. 5000): ' + rule_id); + console.log('domains: ' + domain_id); + + let fake_rules = []; + let fake_rules_ids = []; + for (let i = rule_id + 1; i < prev_rule_id + 1; i++) { + fake_rules.push({ + "id": i, + "priority": 1, + "action": { + "type": "allow" + }, + "condition": { + "urlFilter": "###", + "resourceTypes": ["main_frame"] + } + }); + fake_rules_ids.push(i); + } + + ext_api.declarativeNetRequest.updateSessionRules({ + removeRuleIds: fake_rules_ids + }, () => { + if (ext_api.runtime.lasterror) + console.log(ext_api.runtime.lasterrror.message) + }); + } + +}// manifest v3 + +// add grouped sites to en/disabledSites (and exclude sites) +function add_grouped_enabled_domains(groups) { + for (let key in groups) { + if (enabledSites.includes(key)) + enabledSites = enabledSites.concat(groups[key]); + else + disabledSites = disabledSites.concat(groups[key]); + } + // custom + for (let site in customSites) { + let group = customSites[site].group; + if (group) { + let group_array = group.split(','); + if (enabledSites.includes(customSites[site].domain)) + enabledSites = enabledSites.concat(group_array); + else + disabledSites = disabledSites.concat(group_array); + } + } + for (let site of excludedSites) { + if (enabledSites.includes(site)) { + enabledSites.splice(enabledSites.indexOf(site), 1); + disabledSites.push(site); + } + } +} + +// Get the enabled sites (from local storage) & set_rules for sites +ext_api.storage.local.get({ + sites: {}, + sites_default: Object.keys(defaultSites).filter(x => defaultSites[x].domain && !defaultSites[x].domain.match(/^(#options_|###$)/)), + sites_custom: {}, + sites_updated: {}, + sites_excluded: [], + ext_version_old: '2.3.9.0', + optIn: false, + optInUpdate: true +}, function (items) { + var sites = items.sites; + optionSites = sites; + var sites_default = items.sites_default; + customSites = items.sites_custom; + customSites = filterObject(customSites, function (val, key) { + return !(val.add_ext_link && !val.add_ext_link_type) + }); + customSites_grouped_domains = Object.values(customSites).map(x => x.domain); + customSites_domains = customSites_grouped_domains.concat(Object.values(customSites).filter(x => x.group).map(x => x.group.split(',').map(x => x.trim())).flat()); + updatedSites = items.sites_updated; + updatedSites_domains_new = Object.values(updatedSites).filter(x => x.domain && !defaultSites_domains.includes(x.domain) || x.group).map(x => x.group ? x.group.filter(y => !defaultSites_domains.includes(y)).concat([x.domain]) : x.domain).flat(); + var ext_version_old = items.ext_version_old; + optin_setcookie = items.optIn; + optin_update = items.optInUpdate; + excludedSites = items.sites_excluded; + + enabledSites = Object.values(sites).filter(function (val) { + return (val && val !== '###' && (defaultSites_domains.concat(customSites_domains, updatedSites_domains_new).includes(val))); + }).map(function (val) { + return val.toLowerCase(); + }); + + // Enable new sites by default (opt-in) + updatedSites_new = Object.keys(updatedSites).filter(x => updatedSites[x].domain && !defaultSites_domains.includes(updatedSites[x].domain)); + for (let site_updated in updatedSites) { + defaultSites[site_updated] = updatedSites[site_updated]; + if (updatedSites[site_updated].group) + grouped_sites[updatedSites[site_updated].domain] = updatedSites[site_updated].group; + } + if (ext_version > ext_version_old || updatedSites_new.length > 0) { + if (enabledSites.includes('#options_enable_new_sites')) { + let sites_new = Object.keys(defaultSites).filter(x => defaultSites[x].domain && !defaultSites[x].domain.match(/^(#options_|###$)/) && !sites_default.some(key => compareKey(key, x))); + for (let site_new of sites_new) + sites[site_new] = defaultSites[site_new].domain; + let sites_old = ['NHST Media Group']; + for (let site_old of sites_old) + if (sites[site_old]) + delete sites[site_old]; + // reset ungrouped sites + let ungrouped_sites = { + 'The Stage Media (UK)': '###_uk_thestage_media', + 'The Week (regwall)': 'theweek.com' + }; + for (let key in ungrouped_sites) { + if (sites[key] && sites[key] !== ungrouped_sites[key]) + sites[key] = ungrouped_sites[key]; + } + ext_api.storage.local.set({ + sites: sites + }); + } else { + ext_api.management.getSelf(function (result) { + if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) { + let new_groups = ['###_de_ippen_media', '###_se_bonnier_group', '###_uk_independent', '###_uk_thesun']; + let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))); + if (open_options) + ext_api.runtime.openOptionsPage(); + } + }); + } + sites_default = Object.keys(defaultSites).filter(x => defaultSites[x].domain && !defaultSites[x].domain.match(/^(#options_|###$)/)); + ext_api.storage.local.set({ + sites_default: sites_default, + ext_version_old: ext_version + }); + } + + disabledSites = defaultSites_grouped_domains.concat(customSites_grouped_domains, updatedSites_domains_new).filter(x => !enabledSites.includes(x)); + add_grouped_enabled_domains(grouped_sites); + if (ext_manifest_version === 3) { + gpw_domains = Object.values(defaultSites).filter(x => x.block_regex_general && !x.domain.startsWith('###')).map(x => x.domain); + rule_excluded_base_domains = disabledSites.filter(x => !x.match(/(^###|_)/) && !gpw_domains.includes(x)); + } + set_rules(sites, updatedSites, customSites); + if (optin_update) + check_update(); + if (enabledSites.includes('#options_optin_update_rules') && self_hosted) { + sites_updated_json = sites_updated_json_online; + sites_custom_ext_json = ext_path + 'sites_custom.json'; + } + check_sites_updated(sites_updated_json, optin_update); + check_sites_custom_ext(); + if (!Object.keys(sites).length) + ext_api.runtime.openOptionsPage(); +}); + +// Listen for changes to options +ext_api.storage.onChanged.addListener(function (changes, namespace) { + if (namespace === 'sync') + return; + for (let key in changes) { + var storageChange = changes[key]; + if (key === 'sites') { + var sites = storageChange.newValue; + optionSites = sites; + enabledSites = Object.values(sites).filter(function (val) { + return (val && val !== '###' && (defaultSites_domains.concat(customSites_domains, updatedSites_domains_new).includes(val))); + }).map(function (val) { + return val.toLowerCase(); + }); + disabledSites = defaultSites_grouped_domains.concat(customSites_grouped_domains, updatedSites_domains_new).filter(x => !enabledSites.includes(x)); + add_grouped_enabled_domains(grouped_sites); + if (ext_manifest_version === 3) { + gpw_domains = Object.values(defaultSites).filter(x => x.block_regex_general && !x.domain.startsWith('###')).map(x => x.domain); + rule_excluded_base_domains = disabledSites.filter(x => !x.match(/(^###|_)/) && !gpw_domains.includes(x)); + } + set_rules(sites, updatedSites, customSites); + } + if (key === 'sites_custom') { + var sites_custom = storageChange.newValue ? storageChange.newValue : {}; + var sites_custom_old = storageChange.oldValue ? storageChange.oldValue : {}; + customSites = sites_custom; + customSites_grouped_domains = Object.values(customSites).map(x => x.domain); + customSites_domains = customSites_grouped_domains.concat(Object.values(customSites).filter(x => x.group).map(x => x.group.split(',').map(x => x.trim())).flat()); + + // add/remove custom sites in options (not for default site(group)) + var sites_custom_added = Object.keys(sites_custom).filter(x => !Object.keys(sites_custom_old).includes(x) && !defaultSites.hasOwnProperty(x) && !defaultSites_domains.includes(sites_custom[x].domain)); + var sites_custom_removed = Object.keys(sites_custom_old).filter(x => !Object.keys(sites_custom).includes(x) && !defaultSites.hasOwnProperty(x) && !defaultSites_domains.includes(sites_custom_old[x].domain)); + + ext_api.storage.local.get({ + sites: {} + }, function (items) { + var sites = items.sites; + if (sites_custom_added.concat(sites_custom_removed).length > 0) { + for (let key of sites_custom_added) + sites[key] = sites_custom[key].domain; + for (let key of sites_custom_removed) + delete sites[key]; + + ext_api.storage.local.set({ + sites: sites + }, function () { + true; + }); + } else { + var sites_custom_group_update = Object.keys(sites_custom).filter(x => sites_custom[x].group && Object.keys(sites_custom_old).includes(x) && sites_custom_old[x].group && sites_custom[x].group !== sites_custom_old[x].group && enabledSites.includes(sites_custom[x].domain)); + for (let key of sites_custom_group_update) + enabledSites = enabledSites.concat(sites_custom[key].group.split(',')); + set_rules(sites, updatedSites, customSites); + } + }); + } + if (key === 'sites_updated') { + var sites_updated = storageChange.newValue ? storageChange.newValue : {}; + updatedSites = sites_updated; + updatedSites_domains_new = Object.values(updatedSites).filter(x => (x.domain && !defaultSites_domains.includes(x.domain) || x.group)).map(x => x.group ? x.group.filter(y => !defaultSites_domains.includes(y)) : x.domain).flat(); + updatedSites_new = Object.keys(updatedSites).filter(x => updatedSites[x].domain && !defaultSites_domains.includes(updatedSites[x].domain)); + if (updatedSites_new.length > 0) { + if (enabledSites.includes('#options_enable_new_sites')) { + for (let site_updated_new of updatedSites_new) + optionSites[site_updated_new] = updatedSites[site_updated_new].domain; + ext_api.storage.local.set({ + sites: optionSites + }); + } + } else + set_rules(optionSites, updatedSites, customSites); + } + if (key === 'sites_excluded') { + var sites_excluded = storageChange.newValue ? storageChange.newValue : []; + var sites_excluded_old = storageChange.oldValue ? storageChange.oldValue : []; + excludedSites = sites_excluded; + + // add/remove excluded sites in en/disabledSites + var sites_excluded_added = sites_excluded.filter(x => !sites_excluded_old.includes(x)); + var sites_excluded_removed = sites_excluded_old.filter(x => !sites_excluded.includes(x)); + + for (let site of sites_excluded_added) { + if (enabledSites.includes(site)) { + enabledSites.splice(enabledSites.indexOf(site), 1); + disabledSites.push(site); + } + } + for (let site of sites_excluded_removed) { + if (disabledSites.includes(site)) { + disabledSites.splice(disabledSites.indexOf(site), 1); + enabledSites.push(site); + } + } + } + if (key === 'ext_version_new') { + ext_version_new = storageChange.newValue; + } + if (key === 'optIn') { + optin_setcookie = storageChange.newValue; + } + if (key === 'optInUpdate') { + optin_update = storageChange.newValue; + } + } +}); + +// Set and show default options on install +ext_api.runtime.onInstalled.addListener(function (details) { + if (details.reason == "install") { + setDefaultOptions(); + } else if (details.reason == "update") { + ext_api.management.getSelf(function (result) { + if (enabledSites.includes('#options_on_update') && result.installType !== 'development') + ext_api.runtime.openOptionsPage(); // User updated extension (non-developer mode) + }); + } +}); + +if (ext_manifest_version === 2) { + +// Google AMP cache redirect +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + var url = details.url.split('?')[0]; + var updatedUrl; + if (matchUrlDomain('cdn.ampproject.org', url)) + updatedUrl = 'https://' + url.split(/cdn\.ampproject\.org\/[a-z]\/s\//)[1]; + else if (matchUrlDomain('google.com', url)) + updatedUrl = 'https://' + url.split(/\.google\.com\/amp\/s\//)[1]; + return { redirectUrl: decodeURIComponent(updatedUrl) }; +}, +{urls:["*://*.cdn.ampproject.org/*/s/*", "*://*.google.com/amp/s/*"], types:["main_frame"]}, +["blocking"] +); + +// inkl bypass +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + if (!isSiteEnabled(details)) { + return; + } + var updatedUrl = details.url.replace(/etok=[\w]*&/, ''); + if (details.url.includes('/signin?') && details.url.includes('redirect_to=')) + updatedUrl = 'https://www.inkl.com' + decodeURIComponent(updatedUrl.split('redirect_to=')[1]); + return { redirectUrl: updatedUrl }; +}, +{urls:["*://*.inkl.com/*"], types:["main_frame"]}, +["blocking"] +); + +// Australia News Corp redirect subscribe to amp +var au_news_corp_subscr = grouped_sites['###_au_news_corp'].map(domain => '*://www.' + domain + '/subscribe/*'); +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + if (!isSiteEnabled(details) || details.url.includes('/digitalprinteditions') || !(details.url.includes('dest=') && details.url.split('dest=')[1].split('&')[0])) { + return; + } + var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]) + '?amp'; + return { + redirectUrl: updatedUrl + }; +}, { + urls: au_news_corp_subscr, + types: ["main_frame"] +}, + ["blocking"]); + +// fix nytimes x-frame-options (hidden iframe content) +ext_api.webRequest.onHeadersReceived.addListener(function (details) { + if (!isSiteEnabled(details)) { + return; + } + var headers = details.responseHeaders; + headers = headers.map(function (header) { + if (header.name === 'x-frame-options') + header.value = 'SAMEORIGIN'; + return header; + }); + return { + responseHeaders: headers + }; +}, { + urls: ["*://*.nytimes.com/*"] +}, + ['blocking', 'responseHeaders']); + +}// manifest v2 + +function blockJsInlineListener(details) { + let domain = matchUrlDomain(blockedJsInlineDomains, details.url); + let matched = domain && details.url.match(blockedJsInline[domain]); + if (matched && optin_setcookie && ['uol.com.br'].includes(domain)) + matched = false; + if (!isSiteEnabled(details) || !matched) + return; + var headers = details.responseHeaders; + headers.push({ + 'name': 'Content-Security-Policy', + 'value': "script-src *;" + }); + return { + responseHeaders: headers + }; +} + +function disableJavascriptInline() { + // block inline script + ext_api.webRequest.onHeadersReceived.removeListener(blockJsInlineListener); + var block_js_inline_urls = []; + for (let domain in blockedJsInline) + block_js_inline_urls.push("*://*." + domain + "/*"); + if (block_js_inline_urls.length) + ext_api.webRequest.onHeadersReceived.addListener(blockJsInlineListener, { + 'types': ['main_frame', 'sub_frame'], + 'urls': block_js_inline_urls + }, + ['blocking', 'responseHeaders']); +} + +if (typeof browser !== 'object') { + var focus_changed = false; + ext_api.windows.onFocusChanged.addListener((windowId) => { + if (windowId > 0) + focus_changed = true; + }); +} + + function runOnTab(tab) { + let tabId = tab.id; + let url = tab.url; + let rc_domain = matchUrlDomain(remove_cookies, url); + let rc_domain_enabled = rc_domain && enabledSites.includes(rc_domain); + let lib_file = 'lib/empty.js'; + if (matchUrlDomain(dompurify_sites, url)) + lib_file = 'lib/purify.min.js'; + var bg2csData = {}; + if (optin_setcookie && matchUrlDomain(['###'], url)) + bg2csData.optin_setcookie = 1; + if (matchUrlDomain(amp_unhide, url)) + bg2csData.amp_unhide = 1; + let amp_redirect_domain = matchUrlDomain(Object.keys(amp_redirect), url); + if (amp_redirect_domain) + bg2csData.amp_redirect = amp_redirect[amp_redirect_domain]; + let cs_block_domain = matchUrlDomain(Object.keys(cs_block), url); + if (cs_block_domain) + bg2csData.cs_block = 1; + let cs_clear_lclstrg_domain = matchUrlDomain(cs_clear_lclstrg, url); + if (cs_clear_lclstrg_domain) + bg2csData.cs_clear_lclstrg = 1; + let cs_code_domain = matchUrlDomain(Object.keys(cs_code), url); + if (cs_code_domain) + bg2csData.cs_code = cs_code[cs_code_domain]; + let cs_param_domain = matchUrlDomain(Object.keys(cs_param), url); + if (cs_param_domain) + bg2csData.cs_param = cs_param[cs_param_domain]; + let ld_json_domain = matchUrlDomain(Object.keys(ld_json), url); + if (ld_json_domain) + bg2csData.ld_json = ld_json[ld_json_domain]; + let ld_json_next_domain = matchUrlDomain(Object.keys(ld_json_next), url); + if (ld_json_next_domain) + bg2csData.ld_json_next = ld_json_next[ld_json_next_domain]; + let ld_json_source_domain = matchUrlDomain(Object.keys(ld_json_source), url); + if (ld_json_source_domain) + bg2csData.ld_json_source = ld_json_source[ld_json_source_domain]; + let ld_json_url_domain = matchUrlDomain(Object.keys(ld_json_url), url); + if (ld_json_url_domain) + bg2csData.ld_json_url = ld_json_url[ld_json_url_domain]; + let ld_archive_is_domain = matchUrlDomain(Object.keys(ld_archive_is), url); + if (ld_archive_is_domain) + bg2csData.ld_archive_is = ld_archive_is[ld_archive_is_domain]; + let ld_och_to_unlock_domain = matchUrlDomain(Object.keys(ld_och_to_unlock), url); + if (ld_och_to_unlock_domain) + bg2csData.ld_och_to_unlock = ld_och_to_unlock[ld_och_to_unlock_domain]; + let add_ext_link_domain = matchUrlDomain(Object.keys(add_ext_link), url); + if (add_ext_link_domain) + bg2csData.add_ext_link = add_ext_link[add_ext_link_domain]; + let use_cs_all_frames = !!matchUrlDomain(cs_all_frames, url); + let tab_runs = 5; + for (let n = 0; n < tab_runs; n++) { + setTimeout(function () { + if (n < 1) { + // run contentScript.js on page + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: lib_file, + runAt: 'document_start', + allFrames: use_cs_all_frames + }, function (res) { + if (ext_api.runtime.lastError) + return; + ext_api.tabs.executeScript(tabId, { + file: 'contentScript.js', + runAt: 'document_start', + allFrames: use_cs_all_frames + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }) + }); + } else if (ext_manifest_version === 3) { + let script_world = "ISOLATED"; + if (matchUrlDomain(['businesspost.ie', 'hbr.org', 'lepoint.fr', 'thehindu.com', 'thehindubusinessline.com'], url)) + script_world = "MAIN"; + ext_api.scripting.executeScript({ + target: { + tabId: tabId, + allFrames: use_cs_all_frames + }, + files: [lib_file, "contentScript.js"], + injectImmediately: true, + world: script_world + }).catch(err => false); + } + // send bg2csData to contentScript.js + if (true) { + setTimeout(function () { + if (ext_manifest_version === 3 || typeof browser === 'object') + ext_api.tabs.sendMessage(tabId, {msg: "bg2cs", data: bg2csData}).catch(x => false); + else + ext_api.tabs.sendMessage(tabId, {msg: "bg2cs", data: bg2csData}); + }, 100); + } + } // run cs once + // remove cookies after page load + if (rc_domain_enabled && !['enotes.com', 'huffingtonpost.it', 'lastampa.it'].includes(rc_domain)) { + remove_cookies_fn(rc_domain, true); + } + }, n * 200); + } + } + + function runOnTab_once(tab) { + let tabId = tab.id; + let url = tab.url; + // load contentScript_once.js to identify custom site (flex) of group + if (!(matchUrlDomain(custom_flex_domains.concat(custom_flex_not_domains, customSites_domains, updatedSites_domains_new, excludedSites, nofix_sites), url) || matchUrlDomain(defaultSites_domains, url))) { + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: 'contentScript_once.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: { + tabId: tabId + }, + files: ["contentScript_once.js"] + }).catch(err => false); + } + } + // load toggleIcon.js (icon for dark or incognito mode in Chrome)) + if (typeof browser !== 'object') { + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: 'options/toggleIcon.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: { + tabId: tabId + }, + files: ["options/toggleIcon.js"] + }).catch(err => false); + } + } + } + + var set_var_sites = ['dagsavisen.no', 'journaldemontreal.com', 'journaldequebec.com', 'nzherald.co.nz'].concat(grouped_sites['###_de_madsack']); + function runOnTab_once_var(tab) { + let tabId = tab.id; + let url = tab.url; + let domain = matchUrlDomain(set_var_sites, url); + // load contentScript_once_var.js to set variables for site + if (domain && enabledSites.includes(domain)) { + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: 'contentScript_once_var.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: { + tabId: tabId + }, + files: ["contentScript_once_var.js"], + injectImmediately: true, + world: "MAIN" + }).catch(err => false); + } + } + } + +ext_api.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { + let tab_status = changeInfo.status; + if (/^http/.test(tab.url)) { + if ((tab_status && (tab_status === 'complete' || matchUrlDomain(['startribune.com'], tab.url))) || changeInfo.url) { + let timeout = changeInfo.url ? 500 : 0; + setTimeout(function () { + if (isSiteEnabled(tab)) { + runOnTab(tab); + } + runOnTab_once(tab); + }, timeout); + } + runOnTab_once_var(tab); + } +}); + +if (ext_manifest_version === 2) { + +var extraInfoSpec = ['blocking', 'requestHeaders']; +if (ext_api.webRequest.OnBeforeSendHeadersOptions.hasOwnProperty('EXTRA_HEADERS')) + extraInfoSpec.push('extraHeaders'); + +ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { + var requestHeaders = details.requestHeaders; + + var header_referer = ''; + if (details.originUrl) + header_referer = details.originUrl; + else { + for (let n in requestHeaders) { + if (requestHeaders[n].name.toLowerCase() == 'referer') { + header_referer = requestHeaders[n].value; + break; + } + } + var blocked_referer_domains = []; + if (!header_referer && details.initiator) { + header_referer = details.initiator; + if (!blocked_referer && matchUrlDomain(blocked_referer_domains, details.url) && ['script', 'xmlhttprequest'].includes(details.type)) { + for (let domain of blocked_referer_domains) + restrictions[domain] = new RegExp('((\\/|\\.)' + domain.replace(/\./g, '\\.') + '($|\\/$)|' + restrictions[domain].toString().replace(/(^\/|\/$)/g, '') + ')'); + blocked_referer = true; + } + } + } + + // block external javascript for custom sites (optional) + if (['script'].includes(details.type)) { + let domain_blockjs_ext = matchUrlDomain(block_js_custom_ext, header_referer); + if (domain_blockjs_ext && !matchUrlDomain(domain_blockjs_ext, details.url) && isSiteEnabled({url: header_referer})) + return { cancel: true }; + } + + // check for blocked regular expression: domain enabled, match regex, block on an internal or external regex + if (['script', 'xmlhttprequest'].includes(details.type)) { + let domain = matchUrlDomain(blockedRegexesDomains, header_referer); + if (domain && details.url.match(blockedRegexes[domain]) && isSiteEnabled({url: header_referer})) + return { cancel: true }; + } + + // block general paywall scripts + if (['script', 'xmlhttprequest'].includes(details.type)) { + for (let domain in blockedRegexesGeneral) { + if (details.url.match(blockedRegexesGeneral[domain].block_regex) && !(matchUrlDomain(excludedSites.concat(disabledSites, blockedRegexesGeneral[domain].excluded_domains), header_referer))) + return { cancel: true }; + } + } + + if (!isSiteEnabled(details)) { + return; + } + + // block javascript of (sub)domain for custom sites (optional) + var domain_blockjs = matchUrlDomain(block_js_custom, details.url); + if (domain_blockjs && details.type === 'script') { + return { cancel: true }; + } + + var useUserAgentMobile = false; + var setReferer = false; + +var ignore_types = ['font', 'image', 'stylesheet']; + +if (matchUrlDomain(change_headers, details.url) && !ignore_types.includes(details.type)) { + var mobile = details.requestHeaders.filter(x => x.name.toLowerCase() === "user-agent" && x.value.toLowerCase().includes("mobile")).length; + var googlebotEnabled = matchUrlDomain(use_google_bot, details.url) && + !(matchUrlDomain(grouped_sites['###_es_grupo_vocento'], details.url) && mobile) && + !(matchUrlDomain(['economictimes.com', 'economictimes.indiatimes.com'], details.url) && !details.url.split(/[\?#]/)[0].endsWith('.cms')) && + !(matchUrlDomain('handelsblatt.com', details.url) && !details.url.split(/[\?#]/)[0].endsWith('.html')) && + !(matchUrlDomain('nytimes.com', details.url) && details.url.includes('.nytimes.com/live/')) && + !(matchUrlDomain('uol.com.br', details.url) && !matchUrlDomain('folha.uol.com.br', details.url)); + var bingbotEnabled = matchUrlDomain(use_bing_bot, details.url); + var facebookbotEnabled = matchUrlDomain(use_facebook_bot, details.url); + var useragent_customEnabled = matchUrlDomain(use_useragent_custom, details.url); + var headers_customEnabled = matchUrlDomain(use_headers_custom, details.url); + + // if referer exists, set it + requestHeaders = requestHeaders.map(function (requestHeader) { + if (requestHeader.name === 'Referer') { + if (googlebotEnabled || matchUrlDomain(use_google_referer, details.url)) { + requestHeader.value = 'https://www.google.com/'; + } else if (matchUrlDomain(use_facebook_referer, details.url)) { + requestHeader.value = 'https://www.facebook.com/'; + } else if (matchUrlDomain(use_twitter_referer, details.url)) { + requestHeader.value = 'https://t.co/'; + } else if (domain = matchUrlDomain(use_referer_custom, details.url)) { + requestHeader.value = use_referer_custom_obj[domain]; + } + setReferer = true; + } + if (requestHeader.name === 'User-Agent') { + useUserAgentMobile = requestHeader.value.toLowerCase().includes("mobile") && !matchUrlDomain([], details.url); + } + return requestHeader; + }); + + // otherwise add it + if (!setReferer) { + if (googlebotEnabled || matchUrlDomain(use_google_referer, details.url)) { + requestHeaders.push({ + name: 'Referer', + value: 'https://www.google.com/' + }); + } else if (matchUrlDomain(use_facebook_referer, details.url)) { + requestHeaders.push({ + name: 'Referer', + value: 'https://www.facebook.com/' + }); + } else if (matchUrlDomain(use_twitter_referer, details.url)) { + requestHeaders.push({ + name: 'Referer', + value: 'https://t.co/' + }); + } else if (domain = matchUrlDomain(use_referer_custom, details.url)) { + requestHeaders.push({ + name: 'Referer', + value: use_referer_custom_obj[domain] + }); + } + } + + // override User-Agent to use Googlebot + if (googlebotEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": useUserAgentMobile ? userAgentMobileG : userAgentDesktopG + }) + requestHeaders.push({ + "name": "X-Forwarded-For", + "value": "66.249.66.1" + }) + } + + // override User-Agent to use Bingbot + else if (bingbotEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": useUserAgentMobile ? userAgentMobileB : userAgentDesktopB + }) + } + + // override User-Agent to use Facebookbot + else if (facebookbotEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": userAgentDesktopF + }) + } + + // override User-Agent/headers to custom + else { + if (domain = useragent_customEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": use_useragent_custom_obj[domain] + }); + } + if (domain = headers_customEnabled) { + for (let header in use_headers_custom_obj[domain]) { + requestHeaders.push({ + "name": header, + "value": use_headers_custom_obj[domain][header] + }) + } + } + } + + // random IP for sites in use_random_ip + let domain_random = matchUrlDomain(use_random_ip, details.url); + if (domain_random && !googlebotEnabled) { + let randomIP_val; + if (random_ip[domain_random] === 'eu') + randomIP_val = randomIP(185, 185); + else + randomIP_val = randomIP(); + requestHeaders.push({ + "name": "X-Forwarded-For", + "value": randomIP_val + }) + } +} + + // remove cookies before page load + if (!matchUrlDomain(allow_cookies, details.url)) { + requestHeaders = requestHeaders.map(function(requestHeader) { + if (requestHeader.name === 'Cookie') { + requestHeader.value = ''; + } + return requestHeader; + }); + } + return { requestHeaders: requestHeaders }; +}, { + urls: ['*://*/*'] +}, extraInfoSpec); +// extraInfoSpec is ['blocking', 'requestHeaders'] + possible 'extraHeaders' + +}// manifest v2 + +function check_sites_custom_ext() { + fetch(sites_custom_ext_json) + .then(response => { + if (response.ok) { + response.json().then(json => { + customSitesExt = Object.values(json).map(x => x.domain); + if (json['###_remove_sites'] && json['###_remove_sites'].cs_code) + customSitesExt_remove = json['###_remove_sites'].cs_code.split(/,\s?/); + }) + } + }).catch(err => false); +} + +var customSitesExt = []; +var customSitesExt_remove = []; +var sites_custom_ext_json = 'custom/sites_custom.json'; + +ext_api.tabs.onUpdated.addListener(function (tabId, info, tab) { updateBadge(tab); }); +ext_api.tabs.onActivated.addListener(function (activeInfo) { if (activeInfo.tabId) ext_api.tabs.get(activeInfo.tabId, updateBadge); }); + +var gpw_no_badge_domains = Object.values(defaultSites).filter(x => x.block_regex_general && !x.domain.startsWith('###') && x.excluded_domains && x.excluded_domains.includes(x.domain)).map(x => x.domain); +function updateBadge(activeTab) { + if (ext_api.runtime.lastError || !activeTab || !activeTab.active) + return; + let badgeText = ''; + let color = 'red'; + let currentUrl = activeTab.url; + if (currentUrl) { + if (isSiteEnabled({url: currentUrl})) { + badgeText = 'ON'; + color = 'red'; + } else if (matchUrlDomain(enabledSites, currentUrl)) { + badgeText = 'ON-'; + color = 'orange'; + } else if (matchUrlDomain(disabledSites, currentUrl)) { + badgeText = 'OFF'; + color = 'blue'; + } else if (matchUrlDomain(nofix_sites, currentUrl)) { + badgeText = 'X'; + color = 'silver'; + } + if (matchUrlDomain(gpw_no_badge_domains, currentUrl)) + badgeText = ''; + if (ext_version_new > ext_version) + badgeText = '^' + badgeText; + let isDefaultSite = matchUrlDomain(defaultSites_domains, currentUrl); + let isCustomSite = matchUrlDomain(customSites_domains, currentUrl); + let isUpdatedSite = matchUrlDomain(updatedSites_domains_new, currentUrl); + if (!isDefaultSite && (isCustomSite || isUpdatedSite)) { + ext_api.permissions.contains({ + origins: ['*://*.' + (isCustomSite || isUpdatedSite) + '/*'] + }, function (result) { + if (!result) + badgeText = enabledSites.includes(isCustomSite || isUpdatedSite) ? 'C' : ''; + if (color && badgeText) + ext_api.action.setBadgeBackgroundColor({color: color}); + ext_api.action.setBadgeText({text: badgeText}); + }); + } else { + if (!badgeText && matchUrlDomain(customSitesExt, currentUrl)) + badgeText = '+C'; + if (color && badgeText) + ext_api.action.setBadgeBackgroundColor({color: color}); + ext_api.action.setBadgeText({text: badgeText}); + } + } else + ext_api.action.setBadgeText({text: badgeText}); +} + +function setExtVersionNew(check_ext_version_new, check_ext_upd_version_new = '') { + ext_api.management.getSelf(function (result) { + var installType = result.installType; + var ext_version_len = (installType === 'development') ? 7 : 5; + ext_version_new = check_ext_version_new; + if (ext_version_len === 5 && check_ext_upd_version_new && check_ext_upd_version_new < check_ext_version_new) + ext_version_new = check_ext_upd_version_new; + if (ext_version_new && ext_version_new.substring(0, ext_version_len) <= ext_version.substring(0, ext_version_len)) + ext_version_new = '1'; + ext_api.storage.local.set({ + ext_version_new: ext_version_new + }); + }); +} + +var ext_version_new; +function check_update() { + let manifest_new = ext_path + 'manifest.json'; + fetch(manifest_new) + .then(response => { + if (response.ok) { + response.json().then(json => { + let json_ext_version_new = json['version']; + if (manifestData.browser_specific_settings && manifestData.browser_specific_settings.gecko.update_url) { + let json_upd_version_new = manifestData.browser_specific_settings.gecko.update_url; + fetch(json_upd_version_new) + .then(response => { + if (response.ok) { + response.json().then(upd_json => { + let ext_id = manifestData.browser_specific_settings.gecko.id; + let json_ext_upd_version_new = upd_json.addons[ext_id].updates[0].version; + setExtVersionNew(json_ext_version_new, json_ext_upd_version_new); + }) + } + }).catch(err => setExtVersionNew(json_ext_version_new)); + } else + setExtVersionNew(json_ext_version_new); + }) + } else + setExtVersionNew(''); + }).catch(err => setExtVersionNew('')); +} + +function site_switch() { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let currentUrl = tabs[0].url; + let isDefaultSite = matchUrlDomain(defaultSites_grouped_domains, currentUrl); + if (!isDefaultSite) { + let isDefaultSiteGroup = matchUrlDomain(defaultSites_domains, currentUrl); + if (isDefaultSiteGroup) + isDefaultSite = Object.keys(grouped_sites).find(key => grouped_sites[key].includes(isDefaultSiteGroup)); + } + if (!isDefaultSite) { + let sites_updated_domains_new = Object.values(updatedSites).filter(x => x.domain && !defaultSites_domains.includes(x.domain)).map(x => x.domain); + let isUpdatedSite = matchUrlDomain(sites_updated_domains_new, currentUrl); + if (!isUpdatedSite) { + let sites_updated_group_domains_new = Object.values(updatedSites).filter(x => x.group).map(x => x.group.filter(y => !defaultSites_domains.includes(y))).flat(); + let isUpdatedSite_group = matchUrlDomain(sites_updated_group_domains_new, currentUrl); + if (isUpdatedSite_group) + isUpdatedSite = Object.values(updatedSites).filter(x => x.group && x.group.includes(isUpdatedSite_group)).map(x => x.domain)[0]; + } + if (isUpdatedSite) + isDefaultSite = isUpdatedSite; + } + let defaultSite_title = isDefaultSite ? Object.keys(defaultSites).find(key => defaultSites[key].domain === isDefaultSite) : ''; + let isCustomSite = matchUrlDomain(customSites_domains, currentUrl); + let customSite_title = isCustomSite ? Object.keys(customSites).find(key => customSites[key].domain === isCustomSite || (customSites[key].group && customSites[key].group.split(',').includes(isCustomSite))) : ''; + if (isCustomSite && customSite_title && customSites[customSite_title].domain !== isCustomSite) + isCustomSite = customSites[customSite_title].domain; + let isCustomFlexSite = matchUrlDomain(custom_flex_domains, currentUrl); + let isCustomFlexGroupSite = isCustomFlexSite ? Object.keys(custom_flex).find(key => custom_flex[key].includes(isCustomFlexSite)) : ''; + let customFlexSite_title = isCustomFlexGroupSite ? Object.keys(defaultSites).find(key => defaultSites[key].domain === isCustomFlexGroupSite) : ''; + let site_title = defaultSite_title || customSite_title || customFlexSite_title; + let domain = isDefaultSite || isCustomSite || isCustomFlexGroupSite; + if (domain && site_title) { + let added_site = []; + let removed_site = []; + if (enabledSites.includes(domain)) + removed_site.push(site_title); + else + added_site.push(site_title); + ext_api.storage.local.get({ + sites: {} + }, function (items) { + var sites = items.sites; + for (let key of added_site) + sites[key] = domain; + for (let key of removed_site) { + key = Object.keys(sites).find(sites_key => compareKey(sites_key, key)); + delete sites[key]; + } + ext_api.storage.local.set({ + sites: sites + }, function () { + ext_api.tabs.reload({bypassCache: true}); + }); + }); + } + } + }); +} + +function remove_cookies_fn(domainVar, exclusions = false) { + ext_api.cookies.getAllCookieStores(function (cookieStores) { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (!ext_api.runtime.lastError && tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let tabId = tabs[0].id; + let storeId = '0'; + for (let store of cookieStores) { + if (store.tabIds.includes(tabId)) + storeId = store.id; + } + storeId = storeId.toString(); + if (domainVar === 'asia.nikkei.com') + domainVar = 'nikkei.com'; + var cookie_get_options = { + domain: domainVar + }; + if (storeId !== 'null') + cookie_get_options.storeId = storeId; + var cookie_remove_options = {}; + ext_api.cookies.getAll(cookie_get_options, function (cookies) { + for (let cookie of cookies) { + if (exclusions) { + var rc_domain = cookie.domain.replace(/^(\.?www\.|\.)/, ''); + // hold specific cookie(s) from remove_cookies domains + if ((rc_domain in remove_cookies_select_hold) && remove_cookies_select_hold[rc_domain].includes(cookie.name)) { + continue; // don't remove specific cookie + } + // drop only specific cookie(s) from remove_cookies domains + if ((rc_domain in remove_cookies_select_drop) && !(remove_cookies_select_drop[rc_domain].includes(cookie.name))) { + continue; // only remove specific cookie + } + // hold on to consent-cookie + if (cookie.name.match(/(consent|^optanon)/i)) { + continue; + } + } + cookie.domain = cookie.domain.replace(/^\./, ''); + cookie_remove_options = { + url: (cookie.secure ? "https://" : "http://") + cookie.domain + cookie.path, + name: cookie.name + }; + if (storeId !== 'null') + cookie_remove_options.storeId = storeId; + ext_api.cookies.remove(cookie_remove_options); + } + }); + } + }); + }) +} + +function clear_cookies() { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let tabId = tabs[0].id; + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript({ + file: 'options/clearCookies.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: { + tabId: tabId + }, + files: ['options/clearCookies.js'] + }).catch(err => false); + } + ext_api.tabs.update(tabId, { + url: tabs[0].url + }); + } + }); +} + +var chrome_scheme = 'light'; +ext_api.runtime.onMessage.addListener(function (message, sender) { + if (message.request === 'clear_cookies') { + clear_cookies(); + } + // clear cookies for domain + if (message.request === 'clear_cookies_domain' && message.data) { + remove_cookies_fn(message.data.domain, true); + } + if (message.request === 'custom_domain' && message.data && message.data.domain) { + let custom_domain = message.data.domain; + let group = message.data.group; + if (group) { + let nofix_groups = ['###_au_nomedia', '###_beehiiv', '###_fi_alma_talent', '###_fi_kaleva', '###_ghost', '###_it_citynews', '###_nl_vmnmedia', '###_se_gota_media', '###_substack_custom', '###_uk_aspermont', '###_usa_cherryroad']; + if (!custom_flex_domains.includes(custom_domain)) { + if (!nofix_groups.includes(group)) { + if (custom_flex[group]) + custom_flex[group].push(custom_domain); + else + custom_flex[group] = [custom_domain]; + custom_flex_domains.push(custom_domain); + if (enabledSites.includes(group)) { + if (!enabledSites.includes(custom_domain)) + enabledSites.push(custom_domain); + let rules = Object.values(defaultSites).filter(x => x.domain === group)[0]; + if (rules) { + if (rules.hasOwnProperty('exception')) { + let exception_rule = rules.exception.filter(x => custom_domain === x.domain || (typeof x.domain !== 'string' && x.domain.includes(custom_domain))); + if (exception_rule.length) + rules = exception_rule[0]; + } + if (group === '###_de_madsack') { + if (!set_var_sites.includes(custom_domain)) + set_var_sites.push(custom_domain); + } + } else + rules = Object.values(customSites).filter(x => x.domain === group)[0]; + if (rules) { + customFlexAddRules(custom_domain, rules); + } + } else if (disabledSites.includes(group)) { + if (!disabledSites.includes(custom_domain)) + disabledSites.push(custom_domain); + } + } else + nofix_sites.push(custom_domain); + } + } else + custom_flex_not_domains.push(custom_domain); + } + if (message.request === 'site_switch') { + site_switch(); + } + if (message.request === 'check_sites_updated') { + check_sites_updated(sites_updated_json_online); + } + if (message.request === 'clear_sites_updated') { + clear_sites_updated(); + } + if (message.request === 'check_update') { + check_update(); + } + if (message.request === 'popup_show_toggle') { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let currentUrl = tabs[0].url; + let domain; + let isExcludedSite = matchUrlDomain(excludedSites, currentUrl); + if (!isExcludedSite) { + let isDefaultSite = matchUrlDomain(defaultSites_domains, currentUrl); + let isCustomSite = matchUrlDomain(customSites_domains, currentUrl); + let isUpdatedSite = matchUrlDomain(updatedSites_domains_new, currentUrl); + let isCustomFlexSite = matchUrlDomain(custom_flex_domains, currentUrl); + domain = isDefaultSite || isCustomSite || isUpdatedSite || isCustomFlexSite; + if (domain) + ext_api.runtime.sendMessage({ + msg: "popup_show_toggle", + data: { + domain: domain, + enabled: enabledSites.includes(domain) + } + }) + } + } + }) + } + if (message.request === 'refreshCurrentTab') { + ext_api.tabs.reload(sender.tab.id, {bypassCache: true}); + } + + if (message.request === 'getExtFetch' && message.data) { + message.data.html = ''; + fetch(message.data.url, message.data.headers) + .then(response => { + if (response.ok) { + response.text().then(html => { + let json_key = message.data.json_key; + if (json_key) { + try { + let json = JSON.parse(html); + if (json) + message.data.html = getNestedKeys(json, json_key); + } catch (err) { + console.log(err); + } + } else + message.data.html = html; + ext_api.tabs.sendMessage(sender.tab.id, { + msg: "showExtFetch", + data: message.data + }); + }) + } + }) + } + + function sendArticleSrc(tab_id, message) { + if (ext_manifest_version === 3 || typeof browser === 'object') + ext_api.tabs.sendMessage(tab_id, { + msg: "showExtSrc", + data: message.data + }).catch(err => false); + else + ext_api.tabs.sendMessage(tab_id, { + msg: "showExtSrc", + data: message.data + }); + } + + // manifest v3: offscreen + let OFFSCREEN_DOCUMENT_PATH = '/options/offscreen.html'; + async function sendMessageToOffscreenDocument(request, data) { + if (!(await hasOffscreenDocument())) { + await ext_api.offscreen.createDocument({ + url: OFFSCREEN_DOCUMENT_PATH, + reasons: [ext_api.offscreen.Reason.DOM_PARSER], + justification: 'Parse DOM' + }).catch(err => false); + } + ext_api.runtime.sendMessage({request, data}).catch(err => false); + } + + if (message.request === 'getExtSrc' && message.data) { + message.data.html = ''; + function getArticleSrc(message) { + let url_src = message.data.url_src || message.data.url; + fetch(url_src, {headers: message.data.headers}) + .then(response => { + if (response.ok) { + response.text().then(html => { + let recursive; + if (message.data.url.startsWith('https://archive.')) { + if (url_src.includes('/https')) { + if (html.includes('
')[0].split('href="')[1].split('"')[0]; + getArticleSrc(message); + recursive = true; + } else + html = ''; + } + } + if (!recursive) { + if (html) { + if (message.data.base64) { + html = decode_utf8(atob(html)); + message.data.selector_source = 'body'; + } + if (ext_manifest_version === 2) { + let parser = new DOMParser(); + let doc = parser.parseFromString(html, 'text/html'); + let article_new = doc.querySelector(message.data.selector_source); + message.data.html = article_new ? article_new.outerHTML : ''; + sendArticleSrc(sender.tab.id, message); + } else if (ext_manifest_version === 3) { + message.data.html = html; + message.data.tab_id = sender.tab.id; + sendMessageToOffscreenDocument('getExtSrc_dom', message.data); // promise + } + } else { + message.data.html = ''; + sendArticleSrc(sender.tab.id, message); + } + } + }); + } else + sendArticleSrc(sender.tab.id, message); + }).catch(function (err) { + sendArticleSrc(sender.tab.id, message); + }); + } + getArticleSrc(message); + } + + // manifest v3: offscreen + async function handleOffscreenMessages(message) { + if (message.request === 'getExtSrc_dom_result') { + sendArticleSrc(message.data.tab_id, message); + closeOffscreenDocument(); + } + } + + async function closeOffscreenDocument() { + if (!(await hasOffscreenDocument())) + return; + await ext_api.offscreen.closeDocument().catch(err => false); + } + + async function hasOffscreenDocument() { + let matchedClients = await clients.matchAll(); + for (let client of matchedClients) { + if (client.url.endsWith(ext_api.runtime.id + OFFSCREEN_DOCUMENT_PATH)) + return true; + } + return false; + } + + if (message.request === 'getExtSrc_dom_result' && message.data) { + handleOffscreenMessages(message); // promise + } + + if (message.scheme && (![chrome_scheme, 'undefined'].includes(message.scheme) || focus_changed)) { + let icon_path = {path: {'128': 'bypass.png'}}; + if (message.scheme === 'dark') + icon_path = {path: {'128': 'bypass-dark.png'}}; + ext_api.action.setIcon(icon_path); + chrome_scheme = message.scheme; + focus_changed = false; + } +}); + +// show the opt-in tab on installation +ext_api.storage.local.get(["optInShown", "customShown"], function (result) { + if (!result.optInShown || !result.customShown) { + ext_api.tabs.create({ + url: "options/optin/opt-in.html" + }); + ext_api.storage.local.set({ + "optInShown": true, + "customShown": true + }); + } +}); + +function filterObject(obj, filterFn, mapFn = function (val, key) { + return [key, val]; +}) { + return Object.fromEntries(Object.entries(obj). + filter(([key, val]) => filterFn(val, key)).map(([key, val]) => mapFn(val, key))); +} + +function compareKey(firstStr, secondStr) { + return firstStr.toLowerCase().replace(/\s\(.*\)/, '') === secondStr.toLowerCase().replace(/\s\(.*\)/, ''); +} + +function isSiteEnabled(details) { + var enabledSite = matchUrlDomain(enabledSites, details.url); + if (!ext_name.startsWith('Bypass Paywalls Clean') || !(self_hosted || /0$/.test(ext_version))) + enabledSite = ''; + if (enabledSite in restrictions) { + return restrictions[enabledSite].test(details.url); + } + return !!enabledSite; +} + +function matchDomain(domains, hostname = '') { + var matched_domain = false; + if (typeof domains === 'string') + domains = [domains]; + domains.some(domain => (hostname === domain || hostname.endsWith('.' + domain)) && (matched_domain = domain)); + return matched_domain; +} + +function urlHost(url) { + if (/^http/.test(url)) { + try { + return new URL(url).hostname; + } catch (e) { + console.log(`url not valid: ${url} error: ${e}`); + } + } + return url; +} + +function matchUrlDomain(domains, url) { + return matchDomain(domains, urlHost(url)); +} + +function prepHostname(hostname) { + return hostname.replace(/^(www|m|account|amp(\d)?|edition|eu|mobil|wap)\./, ''); +} + +function getParameterByName(name, url) { + name = name.replace(/[\[\]]/g, '\\$&'); + var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'), + results = regex.exec(url); + if (!results) return null; + if (!results[2]) return ''; + return decodeURIComponent(results[2].replace(/\+/g, ' ')); +} + +function stripUrl(url) { + return url.split(/[\?#]/)[0]; +} + +function decode_utf8(str) { + return decodeURIComponent(escape(str)); +} + +function randomInt(max) { + return Math.floor(Math.random() * Math.floor(max)); +} + +function randomIP(range_low = 0, range_high = 223) { + let rndmIP = []; + for (let n = 0; n < 4; n++) { + if (n === 0) + rndmIP.push(range_low + randomInt(range_high - range_low + 1)); + else + rndmIP.push(randomInt(255) + 1); + } + return rndmIP.join('.'); +} + +function getNestedKeys(obj, key) { + if (key in obj) + return obj[key]; + let keys = key.split('.'); + let value = obj; + for (let i = 0; i < keys.length; i++) { + value = value[keys[i]]; + if (value === undefined) + break; + } + return value; +} + +// Refresh the current tab (http) +function refreshCurrentTab() { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + if (ext_api.runtime.lastError) + return; + ext_api.tabs.update(tabs[0].id, { + url: tabs[0].url + }); + } + }); +} diff --git a/bypass-dark.png b/bypass-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..54af6537f47418c903e8a32499a92c3440ca5fed GIT binary patch literal 654 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSoCO|{#S9GG!XV7ZFl&wk0|S$T zr;B4q#jUq@ZL=o_N*sUqUv`d&b!nk6*S>}ynj+@xrKOk7FSvj7tfPyFQ3nPN2F49xeZJMQ_HXSDExPY-@cMrJ zwfE<_z?#6)1v6?JT=({Y1p6ZQ}K79;=K9HXU<=DoV1tIf0xO#ji-g{zIA8LSnc_F^YnLhHy_u& zcz3q;)h!uYvvbA82HXArJ3f1URN>^emg~2?KJD7QzV!RC7q6=(nJ+$mtTI)rukNP( zkv}=%<@0?%>3K@-+xp4&J@Z1ZzFS}0(4$l_>&ZHfu)0t0L$1Deu6tW7R;hflw!L}kXWf%; zS5TH3A8Gy85}Sb4q9e0M;fDZvX%Q literal 0 HcmV?d00001 diff --git a/bypass.png b/bypass.png new file mode 100644 index 0000000000000000000000000000000000000000..6418ed9c3cb4c97656a609ce52bc072fd435d45e GIT binary patch literal 693 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7xzrV5;$SaSW-L^Y-q>ED=YB_K)xV zw2y{l=C}x4Iki0Cjm{OnH8o6*HPat3ca$ZmKJvc7(#csSl-`M*5 z|GEuV-^mrfnf|b>Oi{sek_rr&olW7LZy0|#eZ{2Aw~Q_#{VZ0ruP zYm8a;`T8qu?e4Q*c!e%&xQ5x}ug%wjpw1#>jkLwKA@tCL$`Kt@^UT!vBbLs0(J61k!_PcQ#-upegli&JRD(vMi8K#;A z)r-FFe`~zqZ~x@&|KCKHyt}>czJqr3vtN7IE8;9(STy}E2|gwEf#F8{qdm)=>%Hd| z%zFJfhv^POS>~U*u;pbecjhq7ZwQ~tzIgL@p&Qo!R_|x4VbQxH-GA-^&kj}@nf1(X znEO}$ubSLu&OVQUo#FYvTN}CmEZF__^Y;U3vo8OAQNQuUg7%VNmzUy8qN8v7KM?fZ z#q@?@znek9_PX1GA7;HPzsI?B#KiBdyZk({R378xiJYD@<);T3K0RYupC$|6q literal 0 HcmV?d00001 diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..505a930 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,3158 @@ + +Changelog Bypass Paywalls Clean - Chrome +Updates (install zip/crx-file): https://gitflic.ru/project/magnolia1234/bpc_uploads (or check X/Nitter) + +Post-release +Add Bonnier News Group (SE) +Add El Universo (EC) +Add Noz.de & Shz.de +Add Vice +Fix Etc.se (css) +Fix LaStampa.it +Fix Groupe ESH Medias (refresh) +Fix Huffingtonpost.it +Fix Jeune Afrique (today) +Fix LeMonde.fr (video & live-link) +Fix Mediahuis Noord (ld_json_nuxt) +Fix MilanoFinanza.it (regwall & json) +Fix Pirate Wires (js) +Fix Repubblica.it +Disable opt-in custom sites (Android) + +* v4.0.8.0 (2025-03-23) +Add Fr.de (Ippen.media) +Add Jeune Afrique +Add MilanoFinanza.it +Add TheScottishSun.co.uk +Remove Statista +Fix Advance Local (read more) +Fix Harvard Business Review (css) +Fix LeMonde.fr (read more) +Fix Lequipe.fr (anti-adblocker) + +* v4.0.7.0 (2025-03-09) +Fix Barron's (live coverage) +Fix Berlingske.dk (css) +Fix CNHI Group (encrypted) +Fix Follow the Money (audio & videos) +Fix L'Opinion.fr (fetch from archive.is) +Fix LeMonde.fr (english) +Fix Tempo.co (ld_json_nuxt) +Fix WSJ (live coverage) +Fix Wyborcza.biz + +* v4.0.6.0 (2025-03-02) +Add Denik.cz +Add Kathimerini.gr +Add TheSun.co.uk +Remove Agefi.fr +Remove Inc-aus.com (domain obsolete) +Fix CNN (mobile) +Fix Dnevnik.bg (xhr) +Fix Funke Mediengruppe (fetch) +Fix Inc.com (css) +Fix LeMonde.fr (cartes) +Fix Newsday (js) +Fix South China Morning Post (magazines) +Fix Statista (outlook) +Fix The Mandarin.com.au (cookie) +Fix The Spectator World (css) + +* v4.0.5.3 (2025-02-21) +Add Businesstimes.com.sg (SPH Media) +Fix Cambio Colombia (js) +Fix Follow the Money (css) +Fix WSJ (pro & cn subdomain) +Update custom sites (ld_json_url: url_rest) + +* v4.0.5.0 (2025-02-16) +Add Barron's +Add Tamedia.ch Group +Add Tg24.sky.it +Fix Harvard Business Review (data-visuals) +Fix MarketWatch (cookie) +Fix McClatchy Group (js) + +* v4.0.4.0 (2025-02-09) +Add Actu.fr +Add Oxford University Press (opt-in to custom sites) +Add Philonomist +Add The-Independent.com +Remove Augsburger-allgemeine.de +Remove Barron's +Remove Golem.de +Remove Stern.de +Fix Australian Financial Review (magazine) +Fix Heise.de (fetch from archive.is) +Fix LaVoz.com.ar (js) +Fix PhiloMag.com (bot) +Fix Sciences Humaines (bot) +Fix Sz.de (projekte/sz-magazin fetch from archive.is) +Fix The Intercept (js-inline) +Remove OchToUnlock-fetch + +* v4.0.3.0 (2025-02-02) +Add ABC Mais (BR) +Add Harzkurier.de (Funke) +Add Marianne.net (FR) +Add ShreveportBossierAdvocate (Nola) +Add The Baltimore Banner +Fix Connaissance des Arts (js) +Fix Forbes (scroll) +Fix Funke Mediengruppe (fetch) +Fix LeFigaro.fr (json) +Fix Liberation.fr (css) +Fix Scientific American (cookie) +Fix South China Morning Post (json) +Fix Sz.de (main domain; not projekte) +Fix The Quint (refresh) + +* v4.0.2.0 (2025-01-26) +Add Bhaskar (IN) +Add History Today (app only) +Add StatNews +Add Telerama.fr +Remove LaTribune.fr +Remove Law.com +Fix Aachener-zeitung.de (css) +Fix LeFigaro.fr (json) +Fix LeParisien.fr (shortlink) +Fix Lequipe.fr (video & not Les notes) +Fix Liberation.fr (json) +Fix New Scientist (appan subdomain) +Remove support for Kiwi Browser < 116 (Android) +Update block general paywall script (RCP-View Limit) +Update block general paywall script (update Evolok WordPress) + +* v4.0.1.0 (2025-01-19) +Add LeFigaro.fr +Add LeMonde.fr +Add Liberation.fr +Add New Scientist +Fix BusinessDesk.co.nz (mobile) +Fix Haaretz Group (user-agent) + +* v4.0.0.0 (2025-01-12) +Add BusinessDesk.co.nz +Add Lequipe.fr +Add Repubblica.it (GEDI.it) +Add Saechsische.de (Madsack) +Fix Bar and Bench (json: attachment) +Fix El Espectador (amp-iframe/pdf) +Fix GauchaZH (refresh) +Fix LiveLaw.in (css) +Fix Maine Trust for Local News (js) +Fix New York Magazine sites (js) +Fix S&P Global (cookie) +Maintenance contentScript (prepare parameters) +Enable opt-in custom sites (Android; not Kiwi) + +* v3.9.9.0 (2025-01-05) +Add Bild.de +Add Brill +Add Citywire +Add Diplomatique.org.br +Add ElUniversal.com.mx +Add LaGaceta.com.ar +Remove Jazziz +Remove Limburger.nl +Fix Business Insider (js) +Fix Crusoe.com.br (ld_json_url) +Fix Handelsblatt (charts) +Fix Il Sole 24 Ore (anti-adblocker) +Fix The Atlantic (xhr) + +* v3.9.8.0 (2024-12-29) +Add Bt.no +Add TheLeaflet.in +Add Welt.de +Add William Reed Group (opt-in to custom sites) +Fix Ad.nl (widgets) +Fix Fnlondon.com (referer) +Fix Welt.de (mobile css) +Update refresh (disable loop) + +* v3.9.7.0 (2024-12-22) +Add Mopo.de +Add Tempo.co (ID) +Add The San Francisco Standard +Remove Liberation.fr +Fix BizJournals (css) +Fix Groupe Infopro Digital (js) +Fix Ksta.de & Rundschau-online.de (cookie) +Fix LaVoz.com.ar (js) +Fix LesEchos.fr (json) +Fix Postmedia Network (js) +Fix Spectator.co.uk (ld_json_url) +Fix Standardmedia.co.ke (css) +Fix The New York Sun (xhr) +Fix The Verge (js) +Fix Times of India (css) + +* v3.9.6.0 (2024-12-08) +Add Autocar.co.uk +Add Diariodenavarra.es +Add Dn.pt +Add ilManifesto.it +Add Sciences Humaines (FR) +Add T3n.de +Remove Cmjornal.pt +Remove Groupe Rossel +Remove Next.ink +Remove Tamedia.ch Group +Remove Welt.de +Remove Wiwo.de +Fix PhiloMag.com (js) +Fix The Verge (xhr) +Update custom sites (ld_json: object-array) +Update layout Codebeautify.org (for GST) + +* v3.9.5.0 (2024-12-01) +Add Initium Media +Remove La Segunda +Fix Grupo Prensa Iberica (timing & amp) +Fix Next.ink (ld_json_url) +Fix Telegraaf.nl (metered) +Fix The Economist (bot) +Fix YorkshirePost.co.uk (css) + +* v3.9.4.0 (2024-11-24) +Add Manager-magazin.de +Add Nv.ua +Remove Lavoixdunord.fr, Lemessager.fr & Sudinfo.be (Groupe Rossel) +Fix Axios (login) +Fix Freitag.de (css) +Fix London Review of Books (mv3-js-inline) +Fix RugbyPass (images) +Fix Statista (outlook) +Fix The Chronicle of Higher Education (newsletter) +Fix The Diplomat (magazine) +Fix The Lawyer (ld_json_url) +Fix The (New Orleans) Advocate (js) + +* v3.9.3.0 (2024-11-17) +Add Business Insider Japan +Add Decanter +Add Next.ink (FR) +Add Revue21.fr +Add The News Lens +Remove Seeking Alpha +Fix BusinessPost.ie (timing & charts) +Fix Ringier Axel Springer Polska (css) +Fix Spiegel.de (fetch from archive.is) +Fix Star Tribune (js) +Fix Tagesspiegel.de (fetch from archive.is) +Fix The Chronicle of Higher Education (css) +Fix Tiroler Tageszeitung (timing) + +* v3.9.2.0 (2024-11-10) +Add Valnet Group (regwall; opt-in to custom sites) +Remove Bild.de +Remove Bnn.de +Remove Fd.nl +Remove Manager-magazin.de +Remove Mediahuis Nederland Regional +Remove Rhein-Zeitung.de +Fix Australian Financial Review (all live) +Fix Autonews, Pionline & Rubbernews (Crain) +Fix Dnevnik.bg (xhr) +Fix ESPN USA (fetch from archive.is) +Fix MediaNews Group (map & slideshow) +Fix Spiegel.de (fetch) +Fix The Japan Times (disable bot) +Update custom sites (amp_redirect: amp_url) +Update external fetch (mv3-fix-source) + +* v3.9.1.0 (2024-11-03) +Add Groupe Rossel +Add Merkur.de +Add Parkiet (GremiMedia.pl Group) +Add Tamedia.ch Group (opt-in to custom sites for unlisted) +Fix Australian Financial Review (markets live) +Fix Axios (css) +Fix Groupe Nice-Matin (js & amp) +Fix Nation Media Group (images) +Fix Stern.de (css) +Fix The Verge - newsletter (typo) +Fix Times Higher Education (css) +Update block general paywall script (Ippen.media) +Update block general paywall script (mv3-scdn-subdomain) + +* v3.9.0.0 (2024-10-27) +Remove Sudwest Media Network +Fix Ad.nl (no article) +Fix Australia News Corp (mv3-redirect) +Fix Business Insider (mobile) +Fix Interesting Engineering (css) +Fix McClatchy Group (identify sites) +Fix Nation Media Group (videos) +Fix South China Morning Post (json & timing) +Fix Spiegel.de (charts) +Update custom sites (ld_json_url: unhide media) +Update external fetch (mv3-dom-offscreen) + +* v3.8.9.0 (2024-10-20) +Add Linda.nl +Add NscTotal.com.br +Add Ole.com.ar (Grupo Clarin) +Fix Business Insider (bot) +Fix Faz.net (bot) +Fix InvestorsChronicle.co.uk +Fix Kompas.id (css) +Fix McClatchy Group (js & css) +Fix Nation Media Group (source) +Fix Tuttosport (ld_json_next) +Update to manifest v3 (& fix performance) + +* v3.8.8.0 (2024-10-13) +Add Handelsblatt +Add RheinPfalz.de +Add Wyborcza.pl Group +Remove Euractiv.com +Fix Mundo Deportivo (xhr) +Fix Nikkei Asian Review (ld_json_next) +Fix The Athletic (xhr) +Fix The New Statesman (js) +Update block general paywall script (update Evolok WordPress) + +* v3.8.7.0 (2024-10-06) +Add Forbes.ua +Add Vox +Remove DerAktionaer.de +Fix CNN (css) +Fix National Review (ld_json_url) + +* v3.8.6.1 (2024-09-30) +Add Benzinga +Add CNHI Group (opt-in to custom sites) +Add Rivals +Remove Autocar.co.uk +Remove Cieletespace.fr +Remove Citywire +Remove Humanite.fr +Remove Incisive Media +Remove LeMoniteur.fr +Remove Mz.de +Remove New Left Review +Remove New Scientist +Remove Schwaebische.de +Remove Sn.at +Fix Augsburger-allgemeine.de (fetch) +Fix MIT Sloan Management Review +Fix ProMedia.nl Group (bot only) +Fix The Columbian (bot) +Fix Vn.nl (timing & css) +Add forcelist for BPC extension (Edge 116+) +Update custom sites (remove ld_google_webcache) + +* v3.8.5.0 (2024-09-22) +Remove NTNews.com.au +Remove Svz.de (domain obsolete) +Fix Australia News Corp (disable bot) +Fix Dwell (amp) +Fix iNews.co.uk (liveapp) +Fix La Segunda (digital only) +Fix Seeking Alpha (xhr) +Fix Sz.de (images-projekte) +Fix WSJ (cn subdomain) +Update custom sites (ld_json_source & ld_json_url: json-key) + +* v3.8.4.0 (2024-09-15) +Add Pb.pl +Add Stern.de +Remove Nouvelobs.com +Fix Australian Financial Review (js) +Fix Humanite.fr (css) +Fix Nw.de (json) +Fix Rugbyrama.fr (css) +Fix TheStage.co.uk (reviews) +Update Archive.is sites (renew-link) +Update block general paywall script (remove Weborama.fr) +Update OchToUnlock sites (links) + +* v3.8.3.0 (2024-09-08) +Add DK Medier Group (opt-in to custom sites) +Add Dnevnik.bg +Add Manager-magazin.de (fetch from archive.is) +Add Sport.sky.it +Add Wyborcza.pl (fetch from archive.is) +Remove FreiePresse.de +Remove Medienholding Sud (Sudwest Media Network) +Fix LaNouvelleRepublique.fr (js) +Fix South China Morning Post (json) + +* v3.8.2.1 (2024-09-01) +Add ElDeber.com.bo +Add Paste Magazine +Add Standardmedia.co.ke +Fix Crain Communications (js) +Fix Haaretz Group (mobile only archive-link) +Fix Tagesspiegel.de (fetch) +Fix Vn.nl (ld_json_next) +Prepare manifest v3 + +* v3.8.1.1 (2024-08-25) +Add Aachener-zeitung.de (fetch from archive.is) +Add Saarbruecker-zeitung.de & Volksfreund.de (RP Medien) +Remove ilManifesto.it +Fix BizJournals (anti-adblocker) +Fix Faz.net (json-story) +Fix Ga.de & Rp-online.de (RP Medien) +Fix Haaretz Group (fetch from archive.is) +Fix Los Angeles Times (js) +Fix San Diego Union-Tribune (MediaNews) +Fix Seeking Alpha (css) + +* v3.8.0.0 (2024-08-18) +Add Las Vegas Review-Journal +Add Politico (regwall; not pro) +Add The Dispatch +Fix Atlantico.fr (xhr) +Fix Cmjornal.pt & Record.pt (amp-redirect) +Fix Ksta.de & Rundschau-online.de (css) +Fix Telegraaf.nl (css) +Fix The Intercept (js) +Update block general paywall script (update Piano.io) + +* v3.7.9.0 (2024-08-11) +Add Le Revenu (FR) +Add Le1Hebdo.fr +Fix Advance Local (json) +Fix El Pais (js-inline on subdomain) +Fix EUobserver (json) +Fix FreiePresse.de (css) +Fix Sz.de +Fix WSJ (jp subdomain; not cn) +Remove GitHub-links (use GitFlic) + +* v3.7.8.0 (2024-08-04) +Remove Jane's Defence Weekly +Fix Faz.net (related) +Fix Fd.nl (specials) +Fix Haaretz Group (error/videos) +Fix La Tercera (css) +Fix The Athletic (regwall) +Fix The Economist (no podcasts+) +Fix The Irish News (host permission) +Update block general paywall script (Arc XP) +Remove GitFlic-links (use GitHub) + +* v3.7.7.0 (2024-07-28) +Add Reforme.net (FR) +Add The Irish News +Remove Die Presse +Fix Foreign Policy (xhr only) +Fix Groupe La Depeche (css) +Fix Revista Oeste (css) +Fix Tech in Asia (bot) +Fix The Economist (podcasts+) +Fix The Lawyer (host permission) +Fix The Times UK (mobile scroll) +Fix Vogue Business (json) + +* v3.7.6.0 (2024-07-21) +Add Agefi.fr +Add AutoHebdo.fr +Add Daily Mail Group (UK) +Add The Lawyer (UK) +Remove DealStreetAsia +Fix Times Higher Education (js-inline) +Fix WaPo (mobile comments) + +* v3.7.5.0 (2024-07-14) +Add Capital.bg +Add CyclingNews +Add Nation Media Group (Kenya; opt-in to custom sites for unlisted) +Remove The New York Post +Remove TheLawyersDaily.ca (domain obsolete) +Fix Augsburger-allgemeine.de (Google webcache) +Fix Independent.co.uk (premium - js only) +Fix Onet.pl (json) + +* v3.7.4.0 (2024-07-08) +Add Bnn.de (fetch from archive.is) +Add Epochtimes.com.br (opt-in to custom sites) +Add Hydrogen Insight (DN Media Group) +Add Ikz-online.de (Funke) +Add Southern Weekly +Add The American Scholar +Add Wiwo.de (fetch from archive.is) +Remove Noz.de & Shz.de +Remove Saltwire Network +Remove Volksstimme.de +Fix Inc42 (xhr) +Fix Ksta.de & Rundschau-online.de (css) + +* v3.7.3.0 (2024-06-30) +Add Euractiv.com +Add Puck.news (fetch from archive.is) +Remove HinduTamil.in +Fix Mediahuis Belgie (mobile) +Fix Nikkei Asian Review (Google webcache) +Fix Project Syndicate (no article) +Fix Seeking Alpha (mobile) +Fix Sz.de (fetch from archive.is) +Fix Vogue Business (no article) +Update custom sites (ld_json_next: content array) + +* v3.7.2.0 (2024-06-23) +Add DN.no (DN Media Group) +Add Publico.es +Fix Australian Financial Review (css) +Fix Bar and Bench (css) +Fix DerAktionaer.de +Fix Fd.nl (fetch from archive.is) +Fix Malayala Manorama +Fix Mediahuis Nederland Regional (css) +Fix Nikkei Asian Review (if piano.io-block) +Fix Telegraaf.nl (xhr) +Fix The News Minute (css) +Fix The Times UK (new domain) +Update NHST to DN Media Group + +* v3.7.1.0 (2024-06-02) +Add Ga.de & Rp-online.de +Add Golem.de +Add Heise.de +Add Limburger.nl (fetch from archive.is) +Add Malayala Manorama +Add Mediahuis Belgie (fetch from archive.is) +Add ScienceNews.org +Remove Di.se +Remove LeMonde.fr +Remove Telerama.fr +Fix Courrier international (fetch from archive.is) +Fix NHST Media Group (json) +Fix Sz.de (main domain) +Fix The Economist (no podcasts+) + +* v3.7.0.0 (2024-05-26) +Add DagensMedicin.se +Add Scholastic +Remove Private Equity News +Fix Medium (add link to Read Medium) +Fix The Economist (fetch from archive.is) +Fix Times of India (json) +Update custom sites (remove legacy) + +* v3.6.9.0 (2024-05-19) +Add Mediahuis Nederland Regional (fetch from archive.is) +Add Politis.fr +Remove Limburger.nl +Remove Mediahuis Belgie +Remove StuDocu +Fix Ajc.com (css) +Fix Clarin (js) +Fix Fnlondon.com (fetch from archive.is) +Fix The Athletic (NYTimes domain) +Fix The Economist (no Google webcache) +Fix The Juggernaut (json) +Fix The Quint (timing) + +* v3.6.8.0 (2024-05-12) - manual update +Add Motor Sport Magazine (UK) +Remove Southern Weekly +Remove Wiwo.de +Fix Fast Company (json) +Fix Financial Times (fetch from archive.is) +Fix Limburger.nl +Fix Mediahuis Belgie +Fix Mid-Day (amp-redirect) +Fix Spiegel.de +Fix The Japan Times (bot) +Fix Tribune Publishing (json) +Remove BitBucket-links +Update popup/custom sites (remove 1ft.io) + +* v3.6.7.0 (2024-05-05) +Add DVV Media International (opt-in to custom sites) +Add Kompas.id +Add The New Criterion +Fix Australian Financial Review (json) +Fix eNotes (css) +Fix LiveMint (js) +Fix MarketWatch (amp-redirect) +Fix Seeking Alpha (inert links) +Fix Tagesspiegel.de +Fix The Economic Times (mobile) +Fix The Economist (podcasts) +Fix WaPo (bot) +Fix WSJ (referer; use USA IP/VPN) + +* v3.6.6.0 (2024-04-28) +Add DealStreetAsia (ld_json_next) +Add Groupe Profession Sante +Add Liberation.fr (json) +Remove Marianne.net +Fix Advance Local (json) +Fix Ajc.com (videos) +Fix Citywire +Fix El Cronista (js) +Fix Honolulu Star-Advertiser (css) +Fix McClatchy Group (js) +Fix Sz.de +Fix TheTimes.co.uk (free & intro video) +Fix Tijd.be (css) + +* v3.6.5.0 (2024-04-21) +Add DigiTimes Asia +Add NDTV Profit (former BQ Prime) +Add Pirate Wires +Remove ilSecoloXIX.it +Remove Repubblica.it +Fix El Espanol (css) +Fix Faz.net (ld_json_nuxt) +Fix Seeking Alpha (source) +Fix WSJ (inline video) +Add GitHub-links + +* v3.6.4.0 (2024-04-14) +Add OVB Media (opt-in to custom sites for unlisted) +Add Private Media AU +Fix BizJournals (css) +Fix Business Insider (js) +Fix Business-standard.com +Fix The Economist (regwall) +Fix WaPo (js) +Remove GitLab-links +Update custom sites (block_regex_ignore_default) + +* v3.6.3.0 (2024-04-07) +Add Bild.de (fetch from archive.is) +Add Capital.fr +Add Crain's Grand Rapids Business +Add Hln.be (fetch from archive.is) +Add Nordwest Zeitung +Add Spektrum.de +Fix Exame +Fix LeMonde.fr (view more) +Fix LesEchos.fr (regwall) +Fix MediaNews Group (ld_json_url) +Fix Nzz.ch (css) +Fix Reuters (videos) +Fix Seeking Alpha (xhr) +Fix Tiroler Tageszeitung (json) + +* v3.6.2.0 (2024-04-01) +Add American Purpose +Add Ringier Axel Springer Polska +Remove Hbvl.be +Remove The Banker +Fix Humanite.fr +Fix LeMonde.fr (bug) +Fix Newsweek.pl (premium video) +Fix Wiwo.de (anti-adblocker) +Fix WSJ (intro video) +Update custom sites (search) + +* v3.6.1.0 (2024-03-24) +Add Blick.ch (Ringier Gruppe) +Add CNN (regwall) +Add CodeSports.com.au (AU News Corp) +Add LeMonde.fr (fetch from archive.is) +Add Newslaundry +Remove Bild.de +Remove Hln.be +Fix Bar and Bench (json) +Fix Clarin (js) +Fix Expresso.pt (json) +Fix Haaretz Group (anti-adblocker) +Fix Newsweek.pl (css) +Fix The Athletic (scroll) +Fix The News Minute (json) +Fix The Quint (json) +Fix WSJ (disable bot/referer) + +* v3.6.0.0 (2024-03-17) +Add Courrier international +Add GB News +Add LeMoniteur.fr (Groupe Infopro Digital) +Add Observador.pt +Add Pour l'Eco +Fix Autosport (js) +Fix Fast Company (premium) +Fix Mid-Day (amp-redirect) +Fix ProMedia.nl Group (premium-backup) +Fix Tech in Asia (json) +Fix Telegraaf.nl (no article/image) +Update options (search) + +* v3.5.9.0 (2024-03-10) +Add Funke Mediengruppe (fetch from archive.is) +Add Industry Dive (opt-in to custom sites) +Add Suedkurier.de (fetch from archive.is) +Add The Salt Lake Tribune +Remove Puck.news +Fix Boersen-zeitung.de (timing) +Fix ElMundo.es (colegios - no amp-fix) +Fix Hearst newspapers (anti-adblocker) +Fix Il Sole 24 Ore (24+ only) +Fix Motor Presse Stuttgart (xhr) +Fix The Globe and Mail (js only) +Fix The Quint (css) + +* v3.5.8.0 (2024-03-03) +Add Autosport (free articles only) +Add Digiday Media +Add Il Sole 24 Ore +Add Newsquest Media Group (UK; opt-in to custom sites) +Remove BusinessTimes.com.sg +Remove Dn.se +Remove LeFigaro.fr +Fix Australia News Corp (Googlebot mobile) +Fix Haaretz Group (Outbrain bot) +Fix Medscape (js) +Fix Project Syndicate (no article) +Fix Telegraaf.nl (timing) +Fix Times of India (epaper) +Fix Upstream - NHST (json) +Maintenance updated sites (removed) +Update custom sites (block_host_perm_add) + +* v3.5.7.0 (2024-02-25) +Add Canarias7.es (Grupo Vocento) +Add Forbes.com.au +Add Polityka.pl +Add The Stage Media (UK) +Add Vogue.co.uk (Conde Nast) +Remove Arkansas Democrat-Gazette +Remove EWmagazine.nl +Remove Funke Mediengruppe +Remove Groupe Rossel +Remove Mediahuis Nederland Regional +Fix Epoch.org.il (css) +Fix Haaretz Group (disable bot) +Fix Humanite.fr (json) +Fix The Quint (json) +Fix Times of India (amp-redirect) + +* v3.5.6.0 (2024-02-18) +Add 3 more Gannett sites +Add CH Media (opt-in to custom sites for unlisted) +Add Sourcing Journal (Penske) +Fix Advance Local (json) +Fix CartaCapital.com.br (freemium) +Fix Groupe ESH Medias (iframely) +Fix Grupo Vocento (limit amp-redirect) +Fix Kurier.at (js & css) +Fix Los Angeles Times (images) +Fix Nw.de (amp-redirect) +Fix TheTimes.co.uk (mobile images) + +* v3.5.5.0 (2024-02-11) +Add DailyMail.co.uk +Add DerAktionaer.de (fetch from archive.is) +Add Dwell (json) +Add Superdeporte.es (Grupo Prensa Iberica) +Add Ynet.co.il +Fix El Espanol (Cronica Global) +Fix Grupo Prensa Iberica (css) +Fix MIT Sloan Management Review (old articles) +Fix National Geographic USA (js-regwall) +Fix Swarajyamag +Fix Telegraaf.nl (premium only) +Fix The Indian Express (js) +Fix Vogue Business (fetch from archive.is) +Update block general paywall script (Sophi.io) +Update block general paywall script (update FewCents) + +* v3.5.4.0 (2024-02-04) +Add BusinessTimes.com.sg & StraitsTimes.com (SPH Media) +Add Dagsavisen.no +Add Dn.se (fetch from archive.is) +Add Expresso.pt (json) +Add McPherson Media Group (au; opt-in to custom sites) +Add The Lamp Magazine +Fix Augsburger-allgemeine.de (Googlebot) +Fix Tribune Publishing Company (js) +Update custom sites (ld_archive_is) + +* v3.5.3.0 (2024-01-28) +Add El Nuevo Herald (McClatchy Group) +Add Newsweek.pl (fetch from archive.is) +Add Study.com (only lessons; no videos) +Remove Abendblatt.de (Funke) +Fix Groupe Capitales Medias (identify sites) +Fix Grupo Abril (js) +Fix Haaretz Group (anti-adblocker) +Fix LesEchos.fr +Fix TopAgrar (js-inline) +Fix WSJ Pro (fetch from archive.is) + +* v3.5.2.0 (2024-01-21) +Add Hln.be (fetch from archive.is) +Add Limburger.nl (fetch from archive.is) +Add Mediahuis Belgie (fetch from archive.is) +Add Mediahuis Nederland Regional (fetch from archive.is) +Add Stratfor +Add Wiwo.de (fetch from archive.is) +Remove Franc-Tireur.fr +Fix Barron's (disable bot) +Fix Grupo Abril (images) +Fix Hearst magazines (js) +Fix Independent.co.uk (premium images) +Fix The (New Orleans) Advocate (gambit) +Fix Times Higher Education (books) +Fix Zeit.de (bug) + +* v3.5.1.0 (2024-01-14) +Add Boston Herald (MediaNews Group) +Add EWmagazine.nl (fetch from archive.is) +Add Schwarzwaelder-bote.de +Add The Irish Examiner +Remove LeMonde.fr +Remove Otz.de, Thueringer-allgemeine.de & Tlz.de (Funke) +Remove Wz.de +Fix Groupe Rossel (fetch from archive.is) +Fix LeParisien.fr +Fix MediaNews Group (identify sites) + +* v3.5.0.0 (2024-01-07) +Add Forum Communications (opt-in to custom sites) +Add Motor Presse Stuttgart +Add JournaldeMillau.fr (Groupe La Depeche) +Remove Bhaskar +Remove Westfalische Mediengruppe +Fix Ad.nl (reduced only) +Fix Haaretz Group (Semrushbot) +Fix Mediahuis Noord (js & xhr only) +Fix The Atlantic (menu & footer) +Fix The Diplomat (magazine) +Fix The Indian Express (css) +Fix Times of India (epaper) +Update custom sites (custom user-agent/referer) + +* v3.4.9.0 (2023-12-31) +Add Business Insider Nederland +Add Business Insider Polska +Add Huffingtonpost.it +Fix elDiario.es (amp-redirect) +Fix Haaretz Group (fetch from archive.is) +Fix Inc42 (css) +Fix Independent.co.uk (fetch from archive.is) +Fix PEI Media (identify sites) +Fix S&P Global (js-inline) +Fix Sz.de (fetch from archive.is) +Fix The Juggernaut +Update block general paywall script (Leaky-js-cookie) + +* v3.4.8.0 (2023-12-24) +Add Bild.de (fetch from archive.is) +Add BNP Media (opt-in to custom sites) +Add BusinessAM.be +Add Fox News (regwall) +Add Rp.pl +Remove Bnn.de +Remove LeTemps.ch +Remove Money.it +Fix Automobilwoche.de (js) +Fix Foreign Policy (Insider) +Fix Groupe Centre France (identify sites) +Fix Harvard Business Review (script) +Fix LeParisien.fr (amp-redirect) +Fix London Review of Books (js-inline) +Fix Media Group Westfalen +Fix National Review (cookies) +Fix Nw.de (amp-redirect) +Fix NYmag-sites (js) +Fix The West Australian (cs-loading) +Grouping Haaretz sites +Update block general paywall script (EverCookie) +Update custom sites (ld_json_url: default url) + +* v3.4.7.0 (2023-12-14) +Add Die Presse (AT) +Add LiteraryReview.co.uk +Add Weser-Kurier.de +Remove JungeFreiheit.de +Remove Groupe EBRA +Remove Nordwest Zeitung +Remove Wissenschaft.de +Fix Australia News Corp (media on amp) +Fix Faz.net (disable Zeitung subdomain) +Update sites: fix Google webcache + +* v3.4.6.0 (2023-12-10) +Remove Morgenpost.de (Funke) +Remove The Star Malaysia +Fix Beobachter.ch (json) +Fix Bloomberg (css) +Fix Crikey.com.au (cookie) +Fix Nikkei Asian Review (cookie) +Fix The Atlantic (videos) +Fix TheTimes.co.uk (fetch from archive.is) +Remove forcelist for Edge (MS bug) +Update sites: fetch from archive.is + +* v3.4.5.0 (2023-12-03) +Add 3 more Hearst newspapers +Add Correiodopovo.com.br +Add Gazetadopovo.com.br +Add Ikz-online.de (Funke) +Remove Braunschweiger-zeitung.de (Funke) +Fix Arkansas Democrat-Gazette +Fix Defector +Fix Freitag.de (text-break) +Fix La Segunda +Fix LeParisien.fr (amp-redirect) +Fix NzHerald (xhr) +Fix The West Australian (timing) + +* v3.4.4.0 (2023-11-26) +Add Freitag.de +Add ilSecoloXIX.it (GEDI.it) +Add Jazziz +Add Jazzwise +Add Repubblica.it (GEDI.it) +Add Tagesspiegel.de (link to archive.is) +Add Tiroler Tageszeitung +Remove Madavor Media (domains obsolete) +Fix El Periodico de Catalunya (Grupo Prensa Iberica) +Fix Groupe Nice-Matin (css) +Fix The Hill Times (ld_json_url) +Fix The Japan Times (premium; link to 1ft.io) +Fix TheTimes.co.uk (mobile scroll) +Update popup (fix toggle for custom flex sites) + +* v3.4.3.0 (2023-11-19) +Add Doorbraak.be +Add InvestSmart.com.au +Add Moda.it (GEDI.it) +Add Global Polymer Group (Crain) +Add Profil.at +Add Welt.de (link to archive.is) +Remove EurekaReport.com.au (domain obsolete) +Fix FreiePresse.de +Fix South China Morning Post (css) +Fix Tech in Asia (css) + +* v3.4.2.0 (2023-11-12) +Add Haymarket Media Group (opt-in to custom sites) +Add Haymarket Medical Network (opt-in to custom sites) +Remove Observador.pt +Remove Schwarzwaelder-bote.de +Fix Belfast Telegraph & Independent.ie +Fix Bloomberg (overlay) +Fix Business-standard.com (ld_json_next) +Fix GauchaZH (refresh) +Fix Groupe Rossel (link to archive.is) +Fix Italian.tech (GEDI.it) +Fix Telegraaf.nl (images) +Fix The Diplomat +Fix The Globe and Mail (css) +Update block general paywall script (fix TownNews) +Update custom sites (delete default sites) +Update Leaky Paywall (identify more sites) +Update popup (toggle for custom flex sites) + +* v3.4.1.0 (2023-11-05) +Add Jane's Defence Weekly +Add L'Opinion.fr +Add LeFigaro.fr (link to archive.is) +Add LeMonde.fr (link to archive.is) +Add SchweizerMonat.ch +Add Sz.de (link to archive.is) +Add The Epoch Times & Epoch.org.il (+ cz|de|fr|jp|ro; opt-in to custom sites) +Add The Impression +Remove Delinian Group +Fix El Pais (mobile) +Fix Schwaebische.de +Fix TheBulletin.org (ld_json_url) +Fix WSJ (mobile & Googlebot for cn/jp subdomain) +Update custom sites (group & link to 1ft.io) + +* v3.4.0.0 (2023-10-29) +Add CartaCapital.com.br +Add Cosmopolitan.fr +Remove CodeSports.com.au +Remove Hln.be +Remove VosgesMatin.fr (EBRA) +Fix Albuquerque Journal (css) +Fix Apollo Magazine +Fix Barron's (amp-redirect) +Fix Faz.net (json) +Fix Fnlondon.com +Fix GauchaZH (timing refresh) +Fix Harvard Business Review (cookie) +Fix McClatchy Group (js) +Fix Spectator.com.au +Fix The Hindu (+ BusinessLine) epaper +Fix WSJ (hard refresh or non-pro; link to archive.is) +Update block general paywall script (Amplitude) + +* v3.3.9.0 (2023-10-22) +Add Balkan Insight +Add Groupe Quebecor +Add Inside Retail (opt-in to custom sites) +Add Maine Trust for Local News (opt-in to custom sites) +Add The Baffler +Fix Australia News Corp (amp-fix for desktop) +Fix Faz.net (json) +Fix GauchaZH (refresh) +Fix Medium (add link to freedium) +Fix WSJ (link to Google Search Tool) + +* v3.3.8.0 (2023-10-15) +Add LePoint.fr +Add Mz.de & Volksstimme.de +Add Texas Monthly +Remove Mediahuis Nederland Regional +Fix Belfast Telegraph & Independent.ie (images) +Fix BusinessPost.ie (js) +Fix Estadao.com.br (js) +Fix Harvard Business Review (subscriber-only) +Fix NyTeknik.se +Fix Tuttosport (image) +Fix Unherd (css) + +* v3.3.7.0 (2023-10-08) +Add Bhaskar (IN) +Add Granta Magazine (UK) +Add Interesting Engineering +Add JungeFreiheit.de +Add Vn.at +Fix Media Group Westfalen +Fix Mediahuis Nederland Regional (js) +Fix NHST Media Group (js) +Fix The Atlantic (images) +Update custom sites (ld_json: multi-entry array) + +* v3.3.6.0 (2023-10-01) +Add Conde Nast Traveler +Add Sn.at +Add The Columbian +Fix Groupe La Depeche (json) +Fix Mediahuis Noord (json) +Fix Mexico News Daily +Fix New Scientist (text-break) +Fix NHST Media Group +Fix The Hill Times (css) +Update amp-redirect (disable loop) +Update custom sites (import: remove obsolete) + +* v3.3.5.0 (2023-09-24) +Add Arkansas Democrat-Gazette +Add Incisive Media (opt-in to custom sites) +Add Vol.at +Remove HBR China +Remove VentureBeat (no paywall) +Fix MediaNews Group (identify sites) +Fix The Week (css) +Update block general paywall script (fix BlueConic) +Update custom sites (import: ignore obsolete) + +* v3.3.4.0 (2023-09-17) +Add Cambio Colombia +Add The News Minute (IN) +Add Vikatan (IN) +Fix LaStampa.it (video articles) +Fix Roularta Media Group (modal) +Fix South China Morning Post (mobile & amp) +Fix WSJ (disable amp-redirect for www) + +* v3.3.3.0 (2023-09-10) +Add PourLaScience.fr +Add SpringerMedizin.de +Fix Automobilwoche.de (js) +Fix Inc42 (js) +Fix MarketWatch (amp-redirect) +Fix Outside magazines (domains obsolete) +Fix Puck.news (ld_json_url) +Fix Tes Magazine (css) +Fix The Diplomat (magazine) +Fix The Wrap (ld_json_url) +Fix Tijd.be (belegger subdomain) +Update block general paywall script (fix Ippen.space) + +* v3.3.2.0 (2023-09-03) +Add Beleggersbelangen.nl (Roularta) +Add Revista Oeste (Brazil) +Add The Scientist (archive) +Add Wissenschaft.de +Fix BQ Prime (js) +Fix Clarin (js & error) +Fix Fortune (css) +Fix Forbes (menu) +Fix Groupe SynerJ Media +Fix Nikkei Asian Review (Google webcache) +Fix Scientific American (js) +Fix Star Tribune (css) +Fix WSJ (amp live coverage) +Maintenance background tab +Maintenance updated sites (cs_block, toggle, custom flex & grouped) +Fix for Kiwi Browser 116 (refresh) + +* v3.3.1.0 (2023-08-27) +Add Bridge Tower Media (opt-in to custom sites) +Add Fast Company +Add LeTemps.ch +Add Tuttosport +Remove DN.no +Fix Financial Times (refresh) +Fix Forbes (js) +Fix Media Group Westfalen (identify sites) +Fix Mediahuis Noord (json) +Fix Nikkei Asian Review (refresh) +Fix WSJ (amp 404 & restore option to disable Googlebot) +Add forcelist for BPC extension (Edge 116+) + +* v3.3.0.0 (2023-08-20) +Add Cieletespace.fr +Add Delinian Group +Add Pensions & Investments (Crain) +Add Precision Medicine Online (Crain) +Remove Initium Media +Fix Crusoe.com.br (new domain) +Fix Ksta.de & Rundschau-online.de (json) +Fix The Press-Enterprise (new domain) +Fix WSJ (mobile & remove option to disable Googlebot) +Grouping/fix GenomeWeb sites (Crain) +Update custom sites (add_ext_link: Google Search Tool) + +* v3.2.9.0 (2023-08-13) +Add 4 more Lee Enterprises Group sites +Add LaStampa.it (GEDI.it) +Add The American Conservative +Add The Week (UK & USA) +Remove The Hollywood Reporter (no paywall) +Fix Harvard Business Review (js) +Fix Stylist.co.uk (css) +Fix The Economic Times (print) +Fix The Toronto Star (homepage) +Fix Times of India (css) +Fix mobile user-agent for Google webcache (Firefox-sync) +Update custom sites (ld_json_url) + +* v3.2.8.0 (2023-08-06) +Add America's Test Kitchen +Add Autocar.co.uk +Add Bar and Bench (IN) +Add Crikey.com.au +Add Swarajyamag (IN) +Add Washington Examiner +Fix EUobserver (css) +Fix Grupo Vocento (limit amp-redirect) +Fix The Economic Times (update mobile redirect) +Fix The Economist (interactive) +Update custom sites (add_ext_link: Google webcache) +Update popup (Clearthis.page) + +* v3.2.7.0 (2023-07-30) +Add Mannheimer-Morgen.de (Haas) +Add RuhrNachrichten.de (+ Media Group Westfalen; opt-in to custom sites) +Add Stereogum +Add The Verge (newsletter) +Remove Allgaeuer-Zeitung.de +Fix Automobilwoche.de (js) +Fix BizJournals (anti-adblocker) +Fix Bloomberg (xhr; disable Dark Reader) +Fix El Diario Vasco (mobile amp-redirect) +Fix New Scientist (regwall) +Fix Star Tribune (mobile) +Fix The Japan Times (json for archive) +Fix Verlagsgruppe Rhein Main +Fix Weltkunst.de +Maintenance updated sites (clear) + +* v3.2.6.0 (2023-07-23) +Add Auto-motor-und-sport.de +Add Business-standard.com (json) +Add Medienholding Sud (opt-in to custom sites for unlisted) +Add Money.it +Add Nordwest Zeitung +Add The Times Literary Supplement (json) +Add TorStar local +Add Weltkunst.de +Fix Ad Age (js) +Fix Australian Community Media (css & identify sites) +Fix Euromoney (Google webcache) +Fix Medium (identify member-only) +Fix Puck.news (cached articles only) +Fix Star Tribune (images/comments) +Fix The Toronto Star (js) +Fix Verlagsgruppe Rhein Main (json & identify sites) +Maintenance request host permission (disabled for mobile) +Update custom/updated sites (fix ld_google_webcache) + +* v3.2.5.0 (2023-07-16) +Add El Tribuno (AR) +Add Sabado.pt +Remove TorStar local +Remove VmnMedia.nl Group +Fix Australia News Corp (amp-fix) +Fix Bloomberg (json) +Fix Cmjornal.pt & Record.pt (amp) +Fix Grupo Abril (js-inline) +Fix (custom) Medium (link to Google webcache) +Fix Telegraaf.nl (columns) +Fix WSJ (mobile) + +* v3.2.4.0 (2023-07-09) +Add Delish, Elle Decor, Harper's Bazaar & Oprah Daily (Hearst) +Add NWT Media.se (opt-in to custom sites) +Add Stuttgarter-zeitung.de +Remove Aftonbladet.se +Remove Dn.se +Remove Golem.de +Remove LeFigaro.fr +Remove Limburger.nl +Remove Quillette +Remove Tagesspiegel.de +Fix BusinessPost.ie (json) +Fix Crusoe.uol.com.br (js) +Fix Hearst Communications magazines (js) +Fix Mediahuis Noord (regional) +Fix Midi-Olympique.fr (new domain Rugbyrama.fr) + +* v3.2.3.0 (2023-07-02) +Add Groupe ESH Medias (ch) +Add Hln.be (link to archive.is) +Add MacroBusiness.com.au (ld_json_nuxt) +Add Puck.news +Add Zeit.de (link to archive.is) +Remove AerzteBlatt.de +Remove LePoint.fr +Remove Stratfor +Remove The Times Literary Supplement +Remove Time Magazine (no paywall) +Fix Beobachter.ch & Handelszeitung.ch +Fix Foreign Policy (Insider) +Fix Telegraaf.nl (images) + +* v3.2.2.0 (2023-06-25) +Add Follow the Money (Ftm.eu) +Add Groupe SynerJ Media (opt-in to custom sites) +Add HinduTamil.in +Fix Gazzetta.it (text only) +Fix LeScienze.it +Fix LeTelegramme.fr (css) +Fix The Athletic (timing) +Fix Times of India (amp-images) +Maintenance updated sites (version) + +* v3.2.1.0 (2023-06-05) +Add Boersen-zeitung.de +Fix El Mercurio (not Inversiones/Legal) +Fix ESPN USA +Fix Gazzetta.it (timing) +Fix Telegraaf.nl + +* v3.2.0.0 (2023-05-29) +Add El Cronista (AR) +Add GauchaZH +Add Golem.de (link to archive.is) +Add TechTarget Group +Add VmnMedia.nl Group (opt-in to custom sites) +Remove Mz.de & Volksstimme.de +Remove Weltkunst.de +Fix Challenges.fr & Sciences et Avenir.fr +Fix Defector (cookie) +Fix Mediahuis Noord (json) +Fix Quora (AI bot crash) +Fix The Athletic (Kiwi) +Fix TheTimes.co.uk (overlay) +Fix TownNews sites (encrypted) +Add PowerShell-script for extension allowlist +Update popup (link to Google Search Tool) + +* v3.1.9.0 (2023-05-21) +Remove (custom) Substack +Remove Sz.de +Fix Citywire +Fix DN.no +Fix Gruppo SAE.it (free articles only) +Fix LePoint.fr +Fix Schwaebische.de +Fix Tagesspiegel.de (not background/checkpoint) +Fix The Globe and Mail (title/comments) +Update custom sites/popup (remove Google Search Tool) + +* v3.1.8.0 (2023-05-14) +Add Dn.se (link to archive.is) +Add Monocle (UK) +Add Stylist.co.uk +Fix Advance Local (no amp) +Fix El Espanol (js) +Fix El Mercurio (Inversiones) + +* v3.1.7.3 (2023-05-08) +Remove Medienhaus Aachen +Fix BusinessPost.ie (link to archive.is) +Maintenance contentScript (sanitize html-input) + +* v3.1.7.0 (2023-05-07) +Add Cairns Post, Geelong Advertiser & Townsville Bulletin (Australia News Corp) +Add Arizent sites (opt-in to custom sites) +Remove Puck.news +Fix Adweek (premium) +Fix ilMessaggero.it (+ regional sites) +Fix Mediahuis Noord (json) +Fix Modern Healthcare (sponsored) +Fix Sportico (amp) +Update custom (flex) sites (no fix group) +Update custom sites (load text from json_next) + +* v3.1.6.0 (2023-04-30) +Remove Zeit.de +Fix Bloomberg (Live TV limit) +Fix Gannett Group (redirect restricted) +Fix La Vanguardia (xhr) +Fix Mediahuis Noord (refresh) +Fix Roularta Media Group (Firefox-sync) + +* v3.1.5.0 (2023-04-23) +Add Cox First Media (opt-in to custom sites) +Remove NK News +Fix ESPN USA +Fix Groupe IPM +Fix NYTimes (interactive/games) +Fix StuDocu (banner) + +* v3.1.4.1 (2023-04-17) +Add El Observador, El Pais & La Diaria (Uruguay) +Add Jacobin.de +Add ProMedia.nl Group (opt-in to custom sites) +Add Substack (link to Google Search Tool; opt-in to custom sites for custom domains) +Fix Berlingske.dk +Fix NYTimes (Googlebot) +Fix Tagesspiegel.de (background; link to Google Search Tool) +Update block general paywall script (Ippen.space) +Update popup (link to 12ft.io) + +* v3.1.3.0 (2023-04-10) +Add Haas Mediengruppe (opt-in to custom sites) +Remove Griffith Review +Fix Gannett Group (identify sites) +Fix LesEchos.fr (json) +Fix Nautil.us (cookies) +Fix The West Australian (json) + +* v3.1.2.0 (2023-04-02) +Add Epicurious (Conde Nast) +Add LeGrandContinent.eu +Add Schwaebische.de +Add TagesAnzeiger.ch (link to archive.is) +Remove Business-standard.com +Fix BusinessPost.ie (json) +Fix Citywire +Fix DHnet.be, L'Avenir & LaLibre.be (Add Groupe IPM) +Fix The Spectator World (new domain) +Fix TownNews sites (js) +Fix ZeroHedge (timing) + +* v3.1.1.0 (2023-03-26) +Add Flair.nl, Libelle.nl & Margriet.nl +Add LeFigaro.fr (link to archive.is) +Add Revue Conflits +Add Sport Life Iberica (opt-in to custom sites) +Remove Cellesche Zeitung +Fix Automobilwoche.de (js) +Fix Faz.net (json) +Fix PEI Media (identify site) +Fix The Art Newspaper (js) +Fix The New Republic (modal) +Fix The West Australian +Fix Valor Economico (amp-redirect) + +* v3.1.0.0 (2023-03-19) +Add Defector +Add Euromoney +Add The Juggernaut +Remove Iltalehti.fi +Fix ilManifesto.it (timing) +Fix iPolitics.ca (refresh) +Fix Sciences et Avenir.fr (css) +Fix The Times Literary Supplement (cookies) + +* v3.0.9.0 (2023-03-12) +Add Medienhaus Aachen +Remove Rheinische Post Mediengruppe +Remove RheinPfalz.de +Fix Haaretz English +Fix Inkl +Fix NK News (not pro) +Fix The West Australian + +* v3.0.8.0 (2023-03-05) +Add Bloomberg Adria +Add DN.no (cached articles only) +Remove CaravanMagazine.in +Remove TagesAnzeiger.ch +Remove Welt.de +Fix Berliner Zeitung +Fix Mediahuis Noord +Fix mobile user-agent for Google webcache (Firefox-sync) +Fix New Scientist +Fix SudInfo.be (text) + +* v3.0.7.0 (2023-02-26) +Add Landwirtschaftsverlag +Add LosAndes.com.ar (Grupo Clarin) +Remove Hln.be +Remove Lequipe.fr +Fix Harper's Magazine (modal) +Fix Madsack Mediengruppe (custom flex sites) +Fix Newsday (overlay) +Fix NK News (pro) +Fix Quartz (newsletter) +Fix Quotidiano.net sites +Fix Sacramento Bee (amp) +Fix Ajc.com (js) + +* v3.0.6.0 (2023-02-19) +Add DHnet.be +Add National World Publishing (UK) +Add Roularta Media Group (BE) +Add Spiegel.de (link to archive.is) +Add TagesAnzeiger.ch (link to archive.is) +Remove Asia Times +Remove Finance.si +Remove NordEclair.fr (domain obsolete) +Fix Australia News Corp (no amp-fix) +Fix El Tiempo (css) +Fix Grupo Abril (js) +Fix Lc.nl +Fix Outside (js) +Update block general paywall script (FewCents) +Update custom sites (add_ext_link) + +* v3.0.5.0 (2023-02-12) +Add L'Informe (FR) +Add LePoint.fr +Fix Ksta.de +Fix Leaky Paywall (identify site) +Fix LesEchos.fr (json) +Fix McClatchy Group (amp-redirect) +Fix The West Australian (regional; identify site) +Remove amo-support (Firefox-sync) +Update block general paywall script (limit Piano.io/TinyPass) + +* v3.0.4.0 (2023-02-05) +Add Inside Higher Ed +Add Kurier.at +Add Quillette (link to archive.is) +Add Verlagsgruppe Rhein Main +Remove DN.no +Remove L'Opinion.fr +Remove Spiegel.de +Fix Conde Nast magazines (js/cookies) +Fix DvhN.nl (json) +Fix Los Angeles Times & San Diego Union-Tribune +Fix Madsack Mediengruppe +Fix The Atlantic (images) +Fix The Australian (The Oz) +Fix The Globe and Mail (media) +Fix The Hill Times (text) + +* v3.0.3.0 (2023-01-29) +Add Saarbruecker Zeitung +Remove Handelsblatt +Remove Nordwest Zeitung +Remove Wiwo.de +Fix Belfast Telegraph +Fix Groupe LaDepeche.fr (text) +Fix LesEchos.fr (json) +Fix NzHerald (css) +Fix SOFREP (plus) +Fix StuDocu (timing) +Fix Volksfreund.de +Update block general paywall script (Steady) + +* v3.0.2.0 (2023-01-22) +Add AerzteBlatt.de +Add AerzteZeitung.de +Add Gold Coast Bulletin, The Chronicle & The Weekly Times (Australia News Corp) +Add BusinessPost.ie +Add Cellesche Zeitung +Add DvhN.nl +Fix ET Prime (mobile epaper) +Fix Fd.nl (search) +Fix Statista (outlook) +Fix StuDocu +Fix The Australian (amp) +Fix TheTimes.co.uk (overlay) + +* v3.0.1.0 (2023-01-15) +Remove Repubblica.it +Remove Republic.ru +Fix Inc42 +Fix LesEchos.fr (investir) +Fix Madsack Mediengruppe (identify site in cs) +Fix National Review (no amp) +Fix The Athletic (error) +Fix Vogue Business +Update custom sites (default block cookies) +Update popup (link to Google Search Tool) + +* v3.0.0.0 (2023-01-08) +Add Deutscher Fachverlag Mediengruppe (opt-in to custom sites) +Add LeCourrierDesStrateges.fr +Add McClatchy DC +Add Mundo Deportivo +Add PhiloMag.de +Add The Quint +Add ZeroHedge +Remove Entrepreneur +Remove Saarbruecker Zeitung +Remove (custom) Substack +Remove The-Village.ru +Fix Aftonbladet.se (link to archive.is) +Fix Boston Globe (css) +Fix BQ Prime (geo-block) +Fix Nordwest Zeitung +Fix Substack (split content - fix obsolete) +Fix Telegraaf.nl +Fix The Seattle Times (comments) +Fix TheSaturdayPaper.com.au + +* v2.9.9.0 (2022-12-27) +Add TheBulletin.org +Add Limburger.nl (link to archive.is) +Add Republic.ru +Add The-Village.ru +Add Wiwo.de +Add Wonderzine (RU) +Remove DvhN.nl & Mediahuis Belgie +Fix New York Magazine sites (timing cookies) +Update block general paywall script (Axate.io) +Update custom sites (block_js_inline) +Update custom sites (cs_code: remove/unhide in dom) +Update custom sites (fix optional permissions) + +* v2.9.8.0 (2022-12-18) +Add CaravanMagazine.in +Fix L'Express.fr +Fix MIT Sloan Management Review +Fix Noz.de (no amp) +Grouping NOZ/MHN Mediengruppe +Update block general paywall script (TownNews & fix Pigeon) +Update custom flex sites (identify main domain) +Update custom/updated sites (onMessage in contentScript) + +* v2.9.7.0 (2022-12-11) +Add Handelsblatt +Remove 6 Australia News Corp sites +Remove Law360 +Fix Business-standard.com (images) +Fix Codesports.com.au (js) +Fix DN.no (images) +Fix Noz.de (no amp) +Fix Substack (redundant text) +Fix The Athletic (regwall) +Update custom flex sites (identify on dom) +Update custom sites (set user-agent Facebookbot) + +* v2.9.6.0 (2022-12-04) +Add DN.no +Add Sz.de (link to archive.is) +Add Welt.de (link to archive.is) +Remove BusinessPost.ie +Remove Philonomist +Fix Australian Community Media (identify on url) +Fix Groupe Centre France (text) +Fix Quotidiano.net (no amp) +Fix The Atlantic (js) +Fix The Chronicle of Higher Education (css) + +* v2.9.5.0 (2022-11-27) +Add Haaretz.co.il & The Marker +Remove LaVie.fr +Remove Mediapart.fr +Fix & grouping Australia Nine Entertainment +Fix La Vanguardia (images) +Fix NzHerald (timing) +Fix Nzz.ch regional (css) + +* v2.9.4.0 (2022-11-20) +Add CNBC (Pro text) +Add Etc.se +Add Project Syndicate (link to archive.is) +Remove Haaretz.co.il & The Marker +Fix Madsack Mediengruppe +Fix Quora (plus-link) +Fix The Hill Times (text) +Fix custom sites (block_regex) + +* v2.9.3.0 (2022-11-13) +Add Ad.nl (+ regional) & Hln.be (link to archive.is) +Add Field & Stream +Add Nieuwsblad.be & Standaard.be (link to archive.is) +Add PhiloMag.com +Add Public.fr +Remove DN.no +Remove GElocal.it & Huffintonpost.it +Remove Il Secolo XIX, La Stampa & Limes Online +Fix Grupo Vocento +Fix Ksta.de & Rundschau-online.de +Fix La Croix +Fix NHST Media Group +Fix Tagesspiegel.de (link to archive.is) +Fix Spectator.co.uk (bot) + +* v2.9.2.5 (2022-11-08) +Add Record.pt +Add The New York Post +Fix Cmjornal.pt +Fix for Kiwi Browser/Android + +* v2.9.2.2 (2022-11-07) +Hotfix update rules (general paywall script) +Update block general paywall script (update Zephr-local) + +* v2.9.2.0 (2022-11-06) +Add Mediapart.fr +Add The New York Sun +Update block general paywall script (fix Zephr-local & config sites.js) +Update block inline script (config sites.js) +Update contentScript & remove cookies (fixed runs) + +* v2.9.1.0 (2022-10-30) +Add 4 more NHST Media Group sites +Add Citywire +Add Outdoor Life +Add Tagesspiegel.de (link to archive.is) +Add Tes Magazine +Fix Axios (overlay) +Fix Knack.be, LeVif.be & Kw.be (overlay) +Fix RugbyPass + +* v2.9.0.0 (2022-10-23) +Add Humanite.fr +Add Philonomist (text) +Add The Scotsman +Remove Daily Nation (no paywall) +Remove MediaNama +Fix ABC.es (Sevilla) +Fix ESPN USA (link to archive.is) +Fix The Athletic (css) + +* v2.8.9.0 (2022-10-16) +Add Albuquerque Journal +Add California Business Journals +Add iNews.co.uk +Remove Mediahuis Belgie +Fix ArcInfo.ch (refresh & no tabId) +Fix Australia News Corp (Googlebot images) +Fix Bloomberg (edition) +Fix Espresso.repubblica.it (video) +Fix The Globe and Mail (only premium) +Fix The Hindu (geoId-fix redundant) +Update block general paywall script (Omeda Olytics) + +* v2.8.8.0 (2022-10-09) +Add Evening Standard (UK) +Add Medscape +Add The Critic (UK) +Remove Alma Talent sites (hold Iltalehti.fi) +Remove Nuernberger Nachrichten +Fix Corriere dello Sport (subdomains) +Fix GEDI.it (only Googlebot) +Fix NTNews.com.au (Chrome-only) +Fix WaPo + +* v2.8.7.0 (2022-10-02) +Add ArcInfo.ch +Add Axios +Add LaVoz.com.ar +Add NK News (free articles only) +Add Rheinische Post Mediengruppe +Add 5 more Gannett sites +Fix Clarin +Fix NHST Media Group +Fix NTNews.com.au + +* v2.8.6.0 (2022-09-25) +Add Groupe Centre France (opt-in to custom sites) +Fix Aftonbladet.se +Fix Business-standard.com +Fix Estadao.com.br (amp) +Fix Hearst Communications (newspapers) +Fix The (New Orleans) Advocate +Fix The Athletic +Fix The Chronicle of Higher Education (& Philanthropy) +Update block general paywall script (Leaky Paywall/Wordpress) + +* v2.8.5.0 (2022-09-18) +Add 60 Millions de consommateurs +Add BusinessPost.ie +Add Madavor Media (opt-in to custom sites) +Add Private Equity News +Add TheNewEuropean.co.uk +Add Weltkunst.de +Fix Esprit.presse.fr +Fix Grupo El Comercio +Fix Gruppo GEDI.it (login) +Fix L'Express.fr +Fix Spectator.co.uk (no amp) +Update options: add dark mode support + +* v2.8.4.0 (2022-09-11) +Add PEI Media sites (opt-in to custom sites) +Fix Berliner Zeitung +Fix Faz.net (Zeitung timing) +Fix TownNews sites (css) +Update badge (notification: import as custom site) + +* v2.8.3.0 (2022-09-04) +Add AutoPlus.fr +Add Omaha World-Herald (Lee Enterprises Group) +Add Popular Science +Remove Dark Reading (no paywall) +Fix Australian Community Media (overlay) +Fix L'Opinion.fr +Fix The Globe and Mail (images) +Fix The Toronto Star +Fix WSJ (mobile layout) + +* v2.8.2.0 (2022-08-28) +Add New Scientist +Add The Chronicle of Philanthropy +Add The Hill +Fix Los Angeles Times & San Diego Union-Tribune +Fix Madsack Mediengruppe +Fix Mexico News Daily +Fix NYTimes (Cooking) +Fix The New York Review of Books (timing) +Fix amp: Business of Fashion, Le Parisien & Groupe SudOuest.fr + +* v2.8.1.0 (2022-08-21) +Add Nw.de +Add Substack custom domains (opt-in to custom sites) +Add UOL.com.br +Remove Sanoma Media Finland +Fix Business-standard.com (mobile) +Fix El Correo & La Voz de Cadiz +Fix LaVie.fr +Fix LiveMint (css) +Fix (custom) group-sites (identify on type) + +* v2.8.0.0 (2022-08-14) +Add Gazzetta.it +Add Valor Economico (Google webcache) +Remove Limburger.nl & Standaard.be +Remove Golem.de, Tagesspiegel.de, Welt.de & Wiwo.de +Remove World Politics Review +Fix Australia News Corp (amp-iframe) +Fix El Espanol (menu) +Fix Mediahuis Belgie (revert to old fix) +Fix Spiegel.de (link to archive.is) +Fix The New Republic (js) +Fix TheTimes.co.uk (link to archive.is & epaper-fix obsolete) +Open options on grouping of (enabled) sites +Update block general paywall script (Pico.tools) + +* v2.7.9.0 (2022-08-07) +Add Limburger.nl +Add Standaard.be +Add Substack +Add SuomenSotilas.fi +Add Tagesspiegel.de +Add Welt.de +Add Wiwo.de +Fix Australian Community Media (css) +Fix ET Prime (mobile) +Fix Groene.nl +Fix Spiegel.de (Google webcache) +Fix The Athletic (css & amp) +Fix TheTimes.co.uk (Google webcache) +Grouping DPG Media (not ADR) +Grouping GEDI.it sites +Grouping Unidad Editorial +Grouping Westfaelische Mediengruppe +Redirect Google AMP cache (opt-in to custom sites) +Update block general paywall script (limit Evolok WordPress) +Update custom sites (ld_google_webcache) + +* v2.7.8.0 (2022-07-31) +Add Crusoe.uol.com.br +Add Golem.de +Add Groupe Capitales Medias (+ regional/opt-in to custom sites) +Grouping GenomeWeb sites +Remove Kurier.at +Fix Belfast Telegraph & Independent.ie (css) +Fix Bloomberg (graphics) +Fix Law.com (cookies) +Fix LesEchos.fr (timing) +Fix McClatchy Group (identify site) +Fix TownNews sites (css) +Fix Winnipeg Free Press (xhr) + +* v2.7.7.0 (2022-07-24) +Add Saltwire Network (CA) +Add StuDocu (no downloads) +Fix Folha de S. Paulo (piaui) +Fix Foreign Affairs (js) +Fix Krautreporter.de +Fix Le Devoir (cookie) +Fix Scientific American (magazine) +Update custom sites (import from GitLab) + +* v2.7.6.0 (2022-07-17) +Add The Japan Times +Fix ilTirreno.it & LaNuovaSardegna.it +Fix Ksta.de & Rundschau-online.de +Fix Nrc.nl +Fix NYTimes (Cooking) +Update popup (archive-links) + +* v2.7.5.0 (2022-07-10) +Add Architectural Digest (Conde Nast) +Add Handelszeitung.ch +Add Kw.be +Add Outlook Business (IN) +Fix ABC.es (mobile) +Fix Knack.be & LeVif.be (subdomains-text) +Fix SOFREP (plus) +Fix WSJ (no Googlebot) +Update block general paywall script (update Evolok WordPress) + +* v2.7.4.0 (2022-07-03) +Add Beobachter.ch +Add BQ Prime (former Bloomberg Quint) +Add ilTirreno.it +Add Spiegel.de (link to archive.is) +Remove Deutsche Wirtschafts Nachrichten +Fix Automobilwoche.de +Fix Financial Times (cookie-banner) +Fix Groupe SudOuest.fr +Fix Iltalehti.fi (videos) +Fix Knack.be & LeVif.be +Fix LaNuovaSardegna.it +Fix Observador.pt +Fix The Athletic (single domain) +Fix Times of India (no amp) +Update block general paywall script (remove GoogleTagManager) + +* v2.7.3.0 (2022-06-26) +Add Artforum +Add Initium Media +Add L'Avenir (Belgium) +Add The Banker +Remove Dn.se +Remove Valor Economico +Fix Business-standard.com +Fix El Mercurio +Fix Helsingin Sanomat (dynamic-json) +Fix Ksta.de & Rundschau-online.de +Fix LesEchos.fr +Fix Nautilus +Fix Repubblica.it & LaStampa.it (videos-gtm) + +* v2.7.2.0 (2022-06-06) +Add Estado de Minas (Brazil) +Add ilManifesto.it +Add The Irish Times +Remove Handelsblatt +Remove Study.com +Fix LesEchos.fr (refresh) +Fix Quartz (newsletter) +Fix Vrij Nederland (iframe) +Update block general paywall script (Zephr-local) + +* v2.7.1.0 (2022-05-29) +Add Corriere dello Sport +Add Gazet van Antwerpen +Add Het Belang van Limburg +Add Het Nieuwsblad +Add SlideShare +Add The Financial Express (IN) +Remove Scribd +Fix El Mercurio (+ regional/opt-in to custom sites) +Fix Telegraaf.nl + +* v2.7.0.0 (2022-05-22) +Add group ARA.cat +Add LaVie.fr +Add Mallorca Zeitung +Add TheLawyersDaily.ca +Fix ESPN USA (disable for Watch) +Fix The Globe and Mail (revert to old fix) +Fix TheTimes.co.uk (link to archive.is) +Fix Times of India + +* v2.6.9.0 (2022-05-15) +Add The Star Malaysia +Add UnHerd (UK) +Remove The Japan Times +Fix Lequipe.fr (json) +Fix LiveLaw.in (amp) +Fix Telegraaf.nl +Fix The Australian (The Oz) +Fix The Dallas Morning News +Update block general paywall script (GoogleTagManager) + +* v2.6.8.0 (2022-05-08) +Add De Tijd & L'Echo +Add Finance.si +Add group Mediahuis Noord (opt-in to custom sites for unlisted) +Add The Daily Wire +Remove DealStreetAsia +Fix Australian Community Media +Fix Bloomberg (newsletters) +Fix Knack.be & LeVif.be + +* v2.6.7.0 (2022-05-01) +Add Puck.news +Add Sportico & WWD (group Penske Media Corporation) +Fix El Espectador +Fix eNotes +Fix Grupo Prensa Iberica (opt-in to custom sites for unlisted) +Fix Lequipe.fr (json) +Fix Medium custom domains +Update badge (site with no fix; X) +Update block general paywall script (Pico/Wordpress) + +* v2.6.6.0 (2022-04-24) +Add Automobilwoche.de +Add Better Nutrition, Gym Climber, Peloton, Podium Runner & Rock and Ice +Add eNotes +Add Italia Oggi +Remove ilManifesto.it +Fix Barron's (continue reading) +Fix El Pais (amp/video) +Fix Fortune (magazine) +Fix Spectator.co.uk (amp-redirect) + +* v2.6.5.0 (2022-04-18) +Add Aftonbladet.se +Add InvestorsChronicle.co.uk +Add Nzz.ch Regional (opt-in to custom sites) +Add Outlook India +Fix ABC.es (mobile) +Fix Adweek (free articles only) +Fix Quartz (newsletter) +Fix The Athletic (Ink-layout) +Fix Vogue Business (amp) +Update block general paywall script (Ensighten) +Update block general paywall script (Evolok WordPress) + +* v2.6.4.0 (2022-04-10) +Add El Periodico Extremadura +Add Nuernberger Nachrichten +Remove Algemeen Dagblad Regional +Remove NK News +Fix Berliner Zeitung (amp) +Fix The Globe and Mail (sections) +Fix The Hill Times (text) +Fix (custom) group-sites (limit identify on image) +Remove Cors Anywhere (cached articles) + +* v2.6.3.0 (2022-04-03) +Add Diario Cordoba +Add El Periodico de Aragon +Add El Periodico de Espana +Add La Opinion A Coruna +Add La Opinion de Zamora +Add RedaktionsNetzwerk Deutschland +Fix Alma Talent sites (js-ads) +Fix Australia News Corp (amp) +Fix Helsingin Sanomat (dynamic-json) +Fix Madsack Mediengruppe +Fix NzHerald + +* v2.6.2.0 (2022-03-27) +Add Bnn.de +Add iPolitics.ca +Add LeNouvelEconomiste.fr +Add Muenstersche Zeitung +Add NewcastleHerald.com.au +Add S&P Global +Add Wz.de +Remove HBR Taiwan +Fix Australian Community Media (json) + +* v2.6.1.0 (2022-03-20) +Add Franc-Tireur.fr +Add group Hearst Communications magazines +Add Mid-Day (IN) +Add Winnipeg Free Press (CA) +Fix Algemeen Dagblad (regional; refresh) +Fix Folha de S. Paulo +Fix Funke Mediengruppe (opt-in to custom sites for unlisted) +Fix Lequipe.fr (refresh) +Update layout BPC GitLab bio + +* v2.6.0.0 (2022-03-13) +Add Connaissance des Arts (FR) +Add El Tiempo (CO) +Add LaMontagne.fr +Add Volksstimme.de +Fix American Affairs (js) +Fix Bloomberg +Fix Bloomberg Quint (amp) +Fix Economist (js typo) +Fix LaNouvelleRepublique.fr (js) +Fix LesEchos.fr (investir) +Fix NHST Media Group +Update block general paywall script (Weborama.fr) + +* v2.5.9.0 (2022-03-06) +Add Causeur.fr +Add India Today (magazine) +Add La Opinion de Malaga +Add RugbyPass +Fix Iltalehti.fi (Youtube video/image no source) +Fix Inkl +Fix Internazionale.it (menu/images) + +* v2.5.8.0 (2022-02-27) +Add Cycling Tips +Add Iltalehti.fi +Add La Opinion de Murcia +Add Postmedia Network (CA) +Remove NewcastleHerald.com.au +Fix Westfalen-Blatt (gallery) +Fix update check (GitLab CORS issue or BitBucket http error 429) +Update custom sites (load text from json) + +* v2.5.7.0 (2022-02-20) +Remove RuhrNachrichten.de +Fix LiveLaw.in +Fix NewcastleHerald.com.au +Fix Lequipe.fr (json) +Fix Neue Osnabrucker Zeitung (amp) +Fix Quotidiano.net sites +Update block general paywall script (Pigeon/WordPress) + +* v2.5.6.0 (2022-02-13) +Add Conde Nast magazines & Vogue Business +Add Diario Correo (Grupo El Comercio) +Add Eastwest (it/en) +Add Groupe SudOuest.fr +Fix Australian Community Media (images) +Fix Lequipe.fr & LesEchos.fr (refresh) +Fix New York Magazine sites (cookies) +Fix NYTimes (game stats) +Fix Espresso.repubblica.it (amp) +Fix Seeking Alpha (captcha) +Fix TheTimes.co.uk (epaper & archive) +Update block general paywall script (limit NewsMemory) + +* v2.5.5.0 (2022-02-06) +Remove Iltalehti.fi +Remove The Logic +Fix Australia News Corp (video-still) +Fix La Tercera (js) +Fix MIT Technology Review (TinyPass) +Fix TheTimes.co.uk (epaper) +Fix The Times Literary Supplement (set referer Google) +Fix WaPo + +* v2.5.4.0 (2022-01-30) +Add group Outside magazines +Remove L'Orient-Le Jour +Fix Australia News Corp (amp-redirect) +Fix Faz.net (timing) +Fix Grupo Prensa Iberica (Piano) +Fix The Chronicle (amp-redirect) +Fix The Seattle Times (update) +Fix The Telegraph (modal) +Fix The West Australian (regional) +Fix block inline script (Firefox-sync) +Update popup (no more version-check) + +* v2.5.3.0 (2022-01-23) +Add Huffingtonpost.it +Add Outside +Fix Asia Times +Fix Cairns Post, Code Sports & The Advertiser +Fix Challenges.fr +Fix Clarin +Fix El Pais (menu subdomains) +Fix MediaNama (menu) +Fix MIT Sloan Management Review (refresh) +Fix The New Yorker (update) + +* v2.5.2.0 (2022-01-16) +Add Mainichi Shimbun (Japan) +Add TownNews sites (local USA; opt-in to custom sites) +Remove Aachener Nachrichten & Zeitung +Remove De Tijd & L'Echo +Fix Bloomberg (quotes) +Fix McClatchy Group (amp-redirect & disable) +Fix Prospect Magazine (timing) +Fix Star Tribune (timing) +Fix The Business of Fashion +Fix The Jerusalem Post +Update block general paywall script (Zephr) +Update popup (domain to clear cookies) + +* v2.5.1.0 (2022-01-09) +Add group Hearst Communications (local USA) +Fix Bloomberg (timing) +Fix Handelsblatt (no amp) +Fix The Indian Express (premium) +Fix amp: allow amp-consent +Fix trimmed referer (restrictions) + +* v2.5.0.0 (2022-01-02) +Add Capital Gazette (local USA) +Add Groupe Nice-Matin (FR) +Add Il Foglio (IT) +Add Science (free articles only) +Add Independent.co.uk (archive.is for premium) +Fix Tribune Publishing Company (js) +Fix The New Statesman (Evolok) +Update popup (host permission to clear cookies) + +* v2.4.9.0 (2021-12-26) +Add El Espectador (CO) +Add ESPN USA (news only) +Add Les Inrockuptibles (FR) +Remove Algemeen Dagblad (now regional only) +Fix Alma Talent sites (images & search) +Fix Helsingin Sanomat (dynamic) +Fix Lequipe.fr (json) +Fix The Diplomat (cookies) +Fix Times of India (amp) +Update custom sites (random ip/amp redirect) + +* v2.4.8.0 (2021-12-19) +Add Aachener-Nachrichten.de +Add Allgaeuer-Zeitung.de +Add Lequipe.fr +Add LaLibre.be +Add LeVif.be +Add San Antonio Express-News (local USA) +Add The Indian Express +Add Vrij Nederland +Fix Bloomberg (host permission block js) +Fix National Geographic USA (magazine) +Remove tabs-permission (Chrome 50+) + +* v2.4.7.0 (2021-12-12) +Add Ksta.de & Rundschau-online.de +Add The (New Orleans) Advocate +Remove Caixin Global +Fix Bloomberg (subscriber-only) +Fix Bloomberg Quint (bq blue) +Fix Inkl (images) +Fix Lecho.be (separate from Groupe Rossel) +Fix Repubblica sites (no amp) +Fix amp: ABC.es, elDiario.es & El Espanol +Fix amp: Artnet, Billboard, Digiday, Fortune, Lee Enterprises Group, Newsday, The Boston Globe, The Dallas Morning News & Vanity Fair +Fix amp: Los Angeles Times & San Diego Union-Tribune +Fix amp: USA Today & Gannett Group +Fix amp: Challenges.fr, Elle.fr, L'Opinion.fr & Science et Vie +Fix amp: Corriere della Sera, Il Messaggero & Quotidiano.net +Fix amp: Estadao.com.br, Grupo Abril & Folha de S. Paulo +Fix amp: ET Prime & LiveMint +Fix amp: Funke Mediengruppe + +* v2.4.6.0 (2021-12-05) +Add Artnet +Add Internazionale.it +Fix Boston Globe +Fix El Mundo & Groupe EBRA (amp-iframe) +Fix Gannett Group (host permissions for listed sites) +Fix LiveLaw.in (host permission) +Fix The Business of Fashion +Fix The New Yorker (amp) +Fix TheTimes.co.uk (only link to archive.today) +Remove Saechsische.de +Updated sites: check (options) & missing permission (badge) + +* v2.4.5.0 (2021-11-21) +Add Advance Local (local USA) +Add Code Sports (AU) +Add DealStreetAsia +Add Italian.tech +Add Spectator World +Fix Medium (faster) +Updated sites: add amp-redirect/code to contentScript +Updated (new) sites: popup-toggle + +* v2.4.4.0 (2021-11-14) +Fix Nikkei Asian Review (cookies) +Fix Quora+ (banner) +Fix Repubblica sites (re-enable Googlebot) +Add rules for new sites (post-release; opt-in to custom sites) +Check for update version on startup/options (now opt-out) +Update group rules (post-release) + +* v2.4.3.0 (2021-11-07) +Add HBR China +Add Mitteldeutsche Zeitung +Remove Liberation.fr +Fix ElMundo.es (amp) +Fix Lee Enterprises Group +Fix LesEchos.fr (json) +Fix WaPo (images) +Fix WSJ (timing) +Add allowlist for BPC extension (macOS) +Check for update rules on startup (opt-in) +Refactor (custom) site rules + +* v2.4.2.0 (2021-10-31) +Fix Barron's (timing) +Fix Il Fatto Quotidiano +Fix Westfaelische Nachrichten & Westfalen-Blatt + +* v2.4.1.3 (2021-10-28) +Fix Repubblica sites (disable Googlebot) +Fix Stratfor (forecasts) +Fix The Athletic (timing) + +* v2.4.1.0 (2021-10-24) +Add Elle.fr +Add Marianne.net +Remove Irish Times +Remove Sz.de +Fix ABC.es (Evolok) +Fix Bloomberg (charts) +Fix Business-standard.com +Fix Il Tirreno (GElocal.it) +Fix Financial Times (amp) +Fix Knack.be +Fix La Croix (timing) +Fix La Stampa (http error 403) +Fix The Globe and Mail +Fix The New Yorker (homepage) +Fix Trouw.nl (timing) +Fix Wired (amp) +Update custom sites (block regex for default sites) + +* v2.4.0.0 (2021-10-17) +Add Westfaelische Nachrichten (DE) +Remove Australian Provincial Newspapers (obsolete) +Fix GElocal.it +Fix National Review +Fix RuhrNachrichten.de (amp) +Fix Tech in Asia (visual story) +Update custom sites (block regex, amp unhide & add imported) +Update options: enable new sites by default + +* v2.3.9.0 (2021-10-10) +Add Lee Enterprises Group (local USA) +Fix Chronicle of Higher Education +Fix El Pais (amp/videos) +Fix MarketWatch (amp) +Fix Times Higher Education +Fix WSJ (Chinese) +Update block general paywall script (AzureEdge) + +* v2.3.8.0 (2021-10-03) +Add NordLittoral.fr (Groupe Rossel) +Add Westfalen-Blatt.de +Remove Gazet van Antwerpen +Remove Republic.ru +Fix Bloomberg (blur) +Fix Boston Globe +Fix El Periodico de Catalunya (amp) +Fix Foreign Affairs (timing) +Fix Medium (cookies) +Fix Telerama.fr (mobile) +Fix VeloNews + +* v2.3.7.0 (2021-09-26) +Add Aachener-Zeitung.de +Add Grupo Prensa Iberica (ES) +Add Tampa Bay Times (local USA) +Add Telerama.fr +Add TheMarket.ch +Fix Challenges.fr (blur) +Fix LesEchos.fr (json) +Fix New York Magazine sites +Fix Repubblica.it & LaStampa.it (videos on Firefox) +Fix The Australian (option to disable Googlebot; http error 403) +Fix WSJ & Barron's (amp) + +* v2.3.6.0 (2021-09-05) +Remove Wiwo.de +Fix Estadao.com.br +Fix Gestion & El Comercio (PE) +Fix Handelsblatt (only non-premium articles) +Fix Il Fatto Quotidiano +Fix Il Secolo XIX (mobile) +Fix NyTeknik.se (images) +Fix NzHerald +Fix shz.de & svz.de + +* v2.3.5.0 (2021-08-29) +Add Forbes +Add Law360 (free articles only) +Fix Bloomberg (graphics) +Fix Corriere della Sera (videos) +Fix Repubblica.it (podcasts) + +* v2.3.4.1 (2021-08-23) +Fix group Crain Communications + +* v2.3.4.0 (2021-08-22) +Add Ad Age & Automotive News (group Crain Communications) +Add MediaNews Group (local USA) +Add The Intercept +Remove Slader (obsolete) +Fix Mediahuis Nederland Regional +Fix Medium (timing) +Fix The Australian +Fix The Daily Beast (proper/images) + +* v2.3.3.0 (2021-08-15) +Add LiveLaw.in +Add Sanoma Media Finland (+ aamulehti.fi & regional/opt-in) +Fix McClatchy Group (unlisted sites) +Fix MediaNama (modal) +Fix The Athletic +Fix The Daily Beast (members-only) +Fix WaPo (graphics) + +* v2.3.2.0 (2021-08-08) +Add Inc42 (IN) +Add Study.com (no videos) +Add The Business of Fashion +Fix Bloomberg (quotes/blurred images) +Fix San Diego Union-Tribune +Fix Telegraaf.nl + +* v2.3.1.0 (2021-08-01) +Add Iltalehti.fi (Firefox-only) +Add Marca (ES) +Grouping Quotidiano.net sites (IT) +Remove Le Un +Fix Australia Nine sites +Fix Commentary Magazine (new domain) +Fix Gestion & El Comercio (PE) +Fix Grupo Vocento +Fix Fnlondon.com +Fix The Athletic (podcast) +Fix WSJ (amp homepage link) +Update remove cookies (faster) + +* v2.3.0.1 (2021-07-26) +Fix El Mercurio (timing) +Fix custom sites (no user-agent/referer on restart) + +* v2.3.0.0 (2021-07-25) +Add NHST Media Group (TradeWinds) +Add Southern Weekly (China) +Fix Alma Talent sites +Fix Bloomberg +Fix Nikkei Asian Review (cookies) +Fix Statista (set referer Google) +Fix The Daily Telegraph (au) +Fix Times of India (TOI+ region block) +Fix WaPo (magazine) + +* v2.2.9.0 (2021-07-11) +Add TradeWinds +Fix Discover Magazine +Fix Il Secolo XIX (amp-redirect) +Fix Miami Herald (McClatchy Group) +Fix New Left Review (timing) +Fix WaPo (disable Googlebot & fix amp/interactive) +Maintenance contentScript (update sanitize html-input) + +* v2.2.8.0 (2021-07-04) +Fix Le Parisien (Googlebot) +Fix WaPo + +* v2.2.7.5 (2021-06-30) +Fix Augsburger-allgemeine.de +Fix National Geographic USA (magazine/link to archive.today) +Fix Quartz (link to archive.today) +Maintenance contentScript (sanitize html-input) + +* v2.2.7.0 (2021-06-27) +Remove Finance.si +Fix blocked referer +Update custom sites (set user-agent Bingbot) + +* v2.2.6.0 (2021-06-20) +Add Mediahuis Nederland Regional +Remove The Northern Star (obsolete) +Fix Atlantico.fr +Fix Boston Globe (no opt-in) +Fix Foreign Policy +Fix Spectator.co.uk (amp) +Fix Tribune Publishing Company (overlay) +Fix The Globe and Mail + +* v2.2.5.0 (2021-06-13) +Add The Wrap +Fix Atlantico.fr +Fix Folha de S. Paulo (add blogs) +Fix La Stampa (amp) +Fix Los Angeles Times (overlay) +Fix Medium/Towards Data Science (multimedia) +Fix TheTimes.co.uk (link to archive.today) + +* v2.2.4.0 (2021-06-06) +Add group Crain's Business +Add Ajc.com (local USA) +Fix Modern Healthcare + +* v2.2.3.0 (2021-05-30) +Add Grupo Abril (Brazil) +Add Hindustan Times (IN) +Add Honolulu Star-Advertiser (local USA) +Fix Atlantico.fr +Fix Australian Financial Review (videos) +Fix Exame (domain) +Fix GElocal.it (social) +Fix WaPo (comments) + +* v2.2.2.0 (2021-05-23) +Add MediaNama (IN) +Remove Mitteldeutsche Zeitung +Fix Medium/Towards Data Science +Fix National Geographic USA +Fix Prensa Iberica +Fix Saechsische.de (amp) +Fix The Daily Telegraph (au) +Fix The Economic Times (mobile) +Fix Valor Economico (Google webcache) + +* v2.2.1.0 (2021-05-16) +Add Las Provincias (ES) +Add Times of India +Fix Barron's (option to disable Googlebot; http error 500) +Fix Crain's Chicago Business +Fix GenomeWeb sites +Fix Knack.be +Fix LeScienze.it +Fix Repubblica.it +Fix South China Morning Post (amp) + +* v2.2.0.0 (2021-05-09) +Add Asia Times +Add The Economic Times (text/India) +Add USA Today +Fix American Banker +Fix El Mercurio (CL) +Fix Reuters + +* v2.1.9.0 (2021-05-02) +Add GenomeWeb, 360Dx & Precision Oncology News +Add Levante-EMV (ES) +Add L'Oeil de la Photographie (fr/en) +Add The New Atlantis +Fix Tech in Asia (premium) +Update custom sites (optional: only permissions for added sites) +Update badge (notification: update & custom permissions) + +* v2.1.8.0 (2021-04-25) +Add Il Giorno (IT) +Add L'Express.fr +Add La Nazione (IT) +Add The Athletic +Remove Rheinische Post Mediengruppe +Fix Madsack Mediengruppe (opt-in to custom sites for unlisted) +Fix NyTeknik.se (images) +Fix Repubblica.it +Update block TinyPass (cdn only) + +* v2.1.7.0 (2021-04-18) +Add NyTeknik.se +Add Reuters +Fix Crain's Chicago Business +Fix The Diplomat (magazine) + +* v2.1.6.1 (2021-04-12) +Bugfix Le Dauphine (plus some French sites) + +* v2.1.6.0 (2021-04-11) +Add Di.se +Add La Nouvelle Republique du Centre-Ouest (FR) +Add VeloNews +Fix Business-standard.com (mobile to desktop) +Fix El Pais +Fix National Geographic USA +Fix Stratfor + +* v2.1.5.0 (2021-04-04) +Add Billboard +Add LaTribune.fr +Add LeTelegramme.fr +Fix Mexico News Daily +Update options: restore opt-in for custom sites (on reload; Chrome-only) + +* v2.1.4.0 (2021-03-28) +Add Aachener-Zeitung.de (RP-medien) +Add Apollo Magazine +Add NK News (not pro) +Add Nordwest Zeitung +Fix McClatchy Group (opt-in to custom sites for unlisted) +Fix Wired (Googlebot) +Fix WSJ (option to disable Googlebot; http error 500) + +* v2.1.3.0 (2021-03-21) +Add Berliner Zeitung +Add The Dallas Morning News (local USA) +Add Entrepreneur +Fix TheSaturdayPaper.com.au + +* v2.1.2.0 (2021-03-14) +Add El Espanol (ES) +Add Mitteldeutsche Zeitung (DE) +Add Newsday (local USA) +Add Thueringische Landeszeitung (DE) +Fix Australian Community Media (anti-adblock) +Fix Gannett Group (identify on xhr only) +Fix Gazet van Antwerpen +Fix La Stampa + +* v2.1.1.0 (2021-03-07) +Add Atlantico (FR) +Add Politica Exterior (ES) +Fix Chronicle of Higher Education (overlay) +Fix Grupo Vocento (amp) +Fix New Left Review + +* v2.1.0.0 (2021-02-28) +Add RheinPfalz.de +Add Gannett Group (local USA Today; opt-in to custom sites) +Add New York Daily News (local USA) +Add Rhein-Zeitung.de +Add The Virginian-Pilot (local USA) +Add VentureBeat +Fix El Periodico de Catalunya +Fix Irish Times (no amp) +Grouping Tribune Publishing Company +Remove The News-Gazette (local USA) +Update options (grouped domains to sites.js) + +* v2.0.9.1 (2021-02-22) +Fix cookie storeId (Kiwi browser) + +* v2.0.9.0 (2021-02-21) +Add Daily Nation (Kenya) +Add Houston Chronicle (USA) +Add Schleswig-Holsteinischer Zeitungsverlag (DE) +Add Sports Illustrated +Fix Groupe LaDepeche.fr +Fix La Croix (timing) +Grouping Repubblica.it sites (rules only) +Fix incognito window (cookies) +Update incognito window (Chrome-only split mode) + +* v2.0.8.2 (2021-02-16) +Fix contentScript (Kiwi browser) +Fix popup (update notification; GitLab CORS issue) +Update limit contentScript (add image/sub_frame) + +* v2.0.8.0 (2021-02-14) +Add Augsburger-allgemeine.de +Add McClatchy Group (USA) +Add Neue Osnabruecker Zeitung (DE) +Add Time Magazine +Fix Cors Anywhere (link to allow access) +Fix Il Secolo XIX (amp) +Fix Medium custom domains (meter) +Fix Statista (premium) +Fix TheTimes.co.uk (puzzles) +Update popup (not closing on switch/clear cookies) + +* v2.0.7.0 (2021-02-07) +Add Diario de Ibiza/Mallorca, Faro de Vigo & La Provincia (ES) +Add Finance.si (Slovenia) +Add Law.com (free articles only) +Add Le Un (FR) +Add Rheinische Post Mediengruppe (only plus if amp) +Add The Art Newspaper +Fix ilManifesto.it +Fix Madsack Mediengruppe (amp) +Fix Medium/Towards Data Science (login) +Fix Medium custom domains (login & in options) +Fix Stratfor (style; not menu) +Fix SudOuest.fr (decode text) +Update custom sites (set referer) + +* v2.0.6.0 (2021-01-31) +Add Griffith Review (AU) +Add Stratfor +Add The Hill Times (CA) +Add The Jerusalem Post (IL) +Fix Adweek (amp for premium) +Fix El Mercurio (CL) +Fix El Pais (premium/images) +Fix Funke Mediengruppe (OTZ & TA) +Update custom sites (block Javascript) + +* v2.0.5.0 (2021-01-24) +Add Ambito (AR) +Add Cmjornal.pt +Add El Confidencial (ES) +Add elDiario.es +Add La Nueva Espana +Add Observador.pt +Add Prospect Magazine (UK) +Add RuhrNachrichten.de +Add The Point Magazine +Fix El Pais (ES) +Fix Helsingin Sanomat (Finland) +Fix MarketWatch (premium) +Fix MIT Sloan Management Review +Update block TinyPass (all subdomains) +Update excluded sites (no general block paywall scripts) + +* v2.0.4.0 (2021-01-17) +Add Cicero.de +Add Il Secolo XIX (IT) +Add L'Usine Nouvelle (FR) +Add LaNuovaSardegna.it +Add Svz.de +Add SudOuest.fr +Fix Discover Magazine +Fix Faz.net (Zeitung subdomain) +Fix Funke Medien (DE) +Update block general paywall script (NewsMemory) +Update set user-agent/referer (limit) + +* v2.0.3.0 (2021-01-10) +Add Curbed (New York Magazine) +Add group TorStar (CA) +Add New Left Review (UK) +Fix Seeking Alpha (amp) +Fix Toronto Star (overlay) +Update options (excluded sites) + +* v2.0.2.0 (2021-01-03) +Add La Vanguardia (ES) +Fix Belfast Telegraph & Independent.ie (amp) +Fix Gestion & El Comercio (PE) +Fix Seeking Alpha (amp) +Fix Toronto Star (author) +Grouping Australia Nine sites (rules only) +Update hold on to consent-cookie + +* v2.0.1.0 (2020-12-27) +Add Expansion (ES) +Add FreiePresse.de +Add Nouvelobs.com (FR) +Add Paris Match (FR) +Fix El Mercurio (CL) +Fix/restore El Pais (ES) + +* v2.0.0.0 (2020-12-20) +Add Krautreporter (DE) +Add Piqd (DE) +Fix Foreign Affairs +Fix Paris-Normandie.fr (Groupe Rossel) +Fix Tech in Asia (homepage) + +* v1.9.9.0 (2020-12-13) +Add Berlingske.dk +Add EUobserver +Add Funke Mediengruppe (DE) +Add Groupe EBRA (FR) +Add Groupe LaDepeche.fr +Add Madsack Mediengruppe (DE) +Fix Australian Financial Review (images) +Fix Bloomberg (inline articles/adblocker) +Fix El Pais (ES) +Fix Funke Medien (obfuscated) +Update grouped sites (popup-toggle) + +* v1.9.8.0 (2020-12-06) +Add El Comercio, Ideal & La Voz de Cadiz (ES) +Add Esprit.presse.fr +Add Groupe Rossel (France/Belgium) +Add The Spectator USA +Remove Aftonbladet.se +Remove NK News +Fix Australia News Corp (amp/video-link) +Fix CharlieHebdo.fr (captcha) +Fix Discover Magazine +Fix El Mercurio & La Segunda (mobile) +Fix Harper's Magazine +Fix Mexico News Daily +Fix Slader +Fix Telegraph.co.uk (amp pages) +Fix The New Yorker (embed) +Limit contentScript (to html, xhr & script) +Update popup (Twitter) + +* v1.9.7.0 (2020-11-27) +Add Alma Talent sites (Finland) +Add El Periodico de Catalunya +Add Grupo Vocento (Spain, regional daily) +Add La Croix (FR) +Add The Hindu BusinessLine (IN) +Fix Corriere della Sera (redirect preview) +Fix Faz.net (error in json) +Fix LesEchos.fr (json) +Fix popup (update notification & close error) +Update block general paywall script (Pelcro) +Update grouped sites (init rules) + +* v1.9.6.0 (2020-11-20) +Add Helsingin Sanomat (hs.fi, not paivanlehti) +Fix La Tercera (CL) +Fix LesEchos.fr (timing/banners) +Fix Newsweek (Pelcro) +GitLab transfer + +* v1.9.5.0 (2020-11-15) +Add AlternativesEconomiques.fr +Add Financial Post (CA) +Add La Estrella de Valparaiso (CL) +Add Saechsische.de +Fix Folha de S. Paulo (MatherAnalytics) +Fix Gazet van Antwerpen (video/maps) +Fix ilMessaggero.it (+ regional sites) +Fix WSJ (mobile layout) +Fix error during tabs.get (no tab with id) +Update custom sites: allow_cookies + +* v1.9.4.0 (2020-11-08) +Add Gazet van Antwerpen (Belgium) +Add MarketWatch (free articles only) +Fix Australian Provincial Newspapers +Fix Deutsche Wirtschafts Nachrichten +Fix Haaretz English/TheMarker (Bingbot) +Fix LesEchos.fr (first premium article) +Fix Telegraph.co.uk (overlay) +Fix Chrome-icon for dark/incognito mode (all permitted sites) +Fix clearCookies (Chrome .domain cookies) +Fix updateBadge (grouped sites) +Update options/popup layout (+ mobile) + +* v1.9.3.0 (2020-11-01) +Add Deutsche Wirtschafts Nachrichten +Add Wiwo.de +Fix Quartz (newsletter) +Fix Sz.de (+ sz-magazin) +Fix WSJ (restore Googlebot) +Fix updateBadge (custom sites disabled) +Icon for dark/incognito mode (Chrome) +Save options to storage.local (quota exceeded) + +* v1.9.2.0 (2020-10-25) +Add Foreign Affairs +Add GElocal.it +Add Il Resto del Carlino (IT) +Add Kurier.at +Add L'Orient-Le Jour (Lebanon) +Add The Logic (CA) +Add The New York Review of Books +Fix Australian Provincial Newspapers (Googlebot) +Fix Funke Medien (TinyPass) +Fix bug in NY Times (hidden iframe-content) +Fix Australian Financial Review (images) +Fix The West Australian (timing) +Open (custom) options in new tab + +* v1.9.1.1 (2020-10-19) +Hotfix remove cookies (www) + +* v1.9.1.0 (2020-10-18) +Add NYmag-sites Grub Street, The Cut & Vulture +Add Quotidiano.net (IT) +Add The West Australian (+ regional) +Fix Australia News Corp (amp) +Fix Inkl (disable newsletter login) +Fix Toronto Star (external cookie-script) +Update block general paywall script (Amp-access) +Update opt-in tab (default settings) + +* v1.9.0.2 (2020-10-14) +Fix MIT Sloan Management Review (modal) +Default limited permissions (opt-in custom sites) +Fix Chrome-mismatch permissions .domain cookies +Option to clear cookies & local storage (of site) + +* v1.9.0.0 (2020-10-11) +Add Slate +Remove BusinessTimes.com.sg +Fix Australian Provincial Newspapers (now all) +Fix Bloomberg (overlay) +Fix Challenges.fr (timing) +Fix NzHerald +Fix Toronto Star (map-snippet/footer) +Fix WaPo (paywall-script) + +* v1.8.9.0 (2020-10-04) +Add Hannoversche Allgemeine Zeitung +Add Leipziger Volkszeitung +Add Neue Ruhr Zeitung +Add Westdeutsche Allgemeine Zeitung +Add Westfalenpost +Add Westfaelische Rundschau +Fix Australian Financial Review (images) +Fix Domani (IT) +Fix El Pais (ES) +Fix The Globe and Mail (FF for Android v68) +Fix The Hindu (menu) +Fix WSJ +Add allowlist for BPC extension (Windows) +Fix custom sites Googlebot-fix (after reload) + +* v1.8.8.0 (2020-09-27) +Add Zeit.de +Add Rolling Stone +Add StockNews.com +Add Times Higher Education +Remove Vrij Nederland +Fix National Review (amp for plus) +Minor update opt-in UI + +* v1.8.7.0 (2020-09-20) +Add Business Times (Singapore) +Add Domani (IT) +Add Variety +Fix MIT Technology Review (overlay) +Fix The Globe and Mail + +* v1.8.6.0 (2020-09-14) +Add Star Tribune +Fix FT.com (layout) +Fix contentScript in background tab + +* v1.8.5.0 (2020-09-13) +Add Commentary Magazine +Add NK News (free articles only) +Remove Switzer Report +Remove The Athletic +Fix Economist (layout) +Fix Financial Times (layout) +Fix Brisbane Times, Sydney Morning Herald, The Age & WAtoday +Fix The Hindu +Add opt-in for setCookie (for specific sites) +Update daily users counter (on page) + +* v1.8.4.0 (2020-09-06) +Add Fresno Bee (USA) +Fix Bloomberg +Fix Sacramento Bee (amp for premium) +Fix The New Yorker +Fix WSJ (remove refresh) +Add daily users counter (by counting downloads of empty json-file) +Add general paywall-script Cxense + +* v1.8.3.0 (2020-08-30) +Add Chronicle of Higher Education +Add Diario Financiero (CL) +Add El Mercurio de Valparaiso (CL) +Fix MIT Technology Review +Fix Financial Times (remove copy-notice) +Update show options on update (now optional) + +* v1.8.2.0 (2020-08-23) +Add LimesOnline (it/en) +Add South China Morning Post +Add on/off-switch (popup) +Fix Economist (menu) +Fix WaPo (Googlebot & block Javascript) +Fix custom sites (block Javascript) +Update custom sites: (edit options) & hide double (custom) domain in options +Maintenance contentScript (replace innerHTML): LesEchos.fr (plus reload), Business-standard.com & NoordhollandsDagblad.nl +Prepare subrelease notification (developer mode) + +* v1.8.1.0 (2020-08-16) +Add Australian Provincial Newspapers (daily) +Add NoordhollandsDagblad.nl +Fix elMercurio (modals) +Fix MIT Sloan Management Review (modal) +Fix TheSaturdayPaper.com.au +Fix WSJ (disable Chinese amp-redirect) +Update custom sites (auto-enable in options) +Update installation instructions + +* v1.8.0.0 (2020-07-26) +Add CharlieHebdo.fr +Add La Segunda (CL) +Add LeSoir.be +Add Sz.de (amp for plus) +Fix elMercurio Legal (CL) +Fix Fd.nl (modal/newsletter query string) +Fix Inkl (cookies) +Fix Irish Times (amp for premium) +Fix LesEchos.fr (lp-version) + +* v1.7.9.0 (2020-07-15) +Fix Clarin (block MatherAnalytics) +Fix El Mercurio (CL) +Fix Neue Zuercher Zeitung +Fix NY Times (incognito mode) +Fix The Hindu (cookies) +Fix ValeursActuelles.fr (Qiota) +Grouping Australia News Corp sites +Open options on update (or reload) +Update paywall scripts: Evolok + +* v1.7.8.0 (2020-07-06) +Add Atavist Magazine +Add Belfast Telegraph +Add Business-standard.com +Add Geelong Advertiser & Western Advocate (plus grouping Australian sites) +Add Nautilus +Add Newsweek +Fix The Globe and Mail (postfix premium links) +Update paywall scripts: MatherAnalytics + +* v1.7.7.0 (2020-06-28) +Add ABC.es +Add Il Fatto Quotidiano (IT) +Add Knack.be +Add Slader +Fix Quartz (non-premium) +Fix WSJ (pro & snippet) +Fix WSJ (close Cxense-banner) + +* v1.7.6.0 (2020-06-21) +Add Follow the Money (Ftm.nl) +Add Inkl +Add National Geographic USA +Remove KleineZeitung.at +Fix Barron's (amp for snippet) +Fix Estadao.com.br +Fix Inkl (Dive Deeper links) +Fix Lc.nl & DvhN.nl (Evolok) +Fix WSJ (amp for pro/login) + +* v1.7.5.0 (2020-06-14) +Add BBC History Extra +Add Discover Magazine +Add Independent.ie +Add Republic.ru +Fix Telegraph.co.uk (cookies) +Fix The Globe and Mail (cleanup) +Fix TheTimes.co.uk (cookies) + +* v1.7.4.0 (2020-06-04) +Add ElMundo.es (amp for premium) +Fix Boston Globe +Fix DeMorgen.be (overlay) +Fix Medium (banner) +Fix Medium custom domains +Fix Seeking Alpha (limit robot-captcha) +Fix Spectator.co.uk (amp for premium) +Fix The Globe and Mail (premium-only) +New option to block external Javascript for custom sites +Fix support Brave Browser +Add block general paywall scripts: BlueConic, OneCount, Qiota & TribDss. Remove Outbrain. + +* v1.7.3.0 (2020-05-24) +Add ilManifesto.it +Fix Gestion & El Comercio (PE) +Fix Haaretz English (anti-adblocker) +Fix LeJdD.fr +Limit contentScript on external content + +* v1.7.2.0 (2020-05-17) +Add Globes (IL) +Fix Challenges.fr (proper) +Fix Nzz.ch (banners) +Fix The Hindu (timing issue) +Fix WSJ (timing issues) +Add Limited permissions version +Simplify blocking of specific paywall-scripts + +* v1.7.1.0 (2020-05-02) +Add Le Journal du Net.fr +Add Sciences et Avenir.fr +Fix Challenges.fr +Fix Economist +Fix Faz.net (layout) +Fix LaDepeche.fr +Fix LesEchos.fr (premium) +Fix Miami Herald +Add changelog & update json links (raw) +Fix mismatch domain with url query string +Sync Chrome/Firefox scripts + +* v1.7.0.5 (2020-04-28) +BitBucket transfer + +Add Eureka Report, Intelligent Investor & Switzer Report (AU) +Add Frankfurter Allgemeine (Faz.net) +Add Philosophy Now +Fix Gestion & El Comercio (PE) +Remove LeMonde.fr +Fix ilMessaggero.it +Fix WSJ (lift restrictions) +Maintenance Ad.nl (regional) +Sort-button custom sites + +* v1.7.0.2 (2020-04-05) +Add Gestion (PE) & fix El Comercio +Add LeScienze.it +Add Science & Vie +Fix Barron's links to sign in/read more articles +Fix Fd.nl +Fix LesEchos.fr (url) +Fix Quora (search) +Fix Telegraaf.nl (FF meta-refresh) + +* v1.7.0.1 (2020-03-29) +Add El Comercio (PE) +Add L'Opinion.fr +Add LiveMint (IN) +Add Neue Zuercher Zeitung +Add The New Republic +Remove ET Prime +Fix Telegraaf.nl +Fix blocking Javascript for new (custom)sites +Maintenance contentScript.js +Sync Chrome/Firefox scripts + +* v1.6.4.5 (2020-03-22) +Add LaDepeche.fr +Fix Barron's (remove cookies) +Fix DeMorgen.be +Fix WSJ (cookie-fix) + +* v1.6.4.4 (2020-03-15) +Add The Athletic UK +Add Il Messaggero (IT) +Fix Financial Times +Update (custom)options UI +Fix Corriere della Sera +Fix custom sites (domains with capitals) +Update version-check (replace innerHTML) + +* v1.6.4.3 (2020-03-08) +Add Aftonbladet.se +Fix Australian Community Media newspapers +Fix Economist (inactive links) +Fix Corriere della Sera +Add link to releases (version check) +Show badge-notification for regional Ad.nl sites +Prepare release (limited permissions) +Update custom sites UI (export/import) +Update refresh tab after save options (Chrome-sync) + +* v1.6.4.2 (2020-03-03) +Add The Port Macquarie News (AU) +Remove NK News +Fix Lc.nl & DvhN.nl (newsletter) +Fix Repubblica.it +Show badge-notification if active on tab +Update custom sites UI (delete site) + +* v1.6.4.1 (2020-02-27) +Add Humo.be +Add Seeking Alpha +Add option for custom sites +Fix The New Yorker paywall-banner +Fix LesEchos.fr (hide ads instead of removing) +Fix Bloomberg paywall-script +Include sites from local js-file (maintenance) +Update Options - new release check + +* v1.6.3.1 (2020-02-20) +Add Australian Community Media (daily) +Add Clarin (AR) +Add WAtoday (AU) +Fix TheNation paywall-script block +Refresh tab after saved options +Fix Leeuwarder Courant +Fix Corriere della Sera + +* v1.6.2.3 (2020-02-12) +Add CommonWealth Magazine Taiwan +Add El Mercurio (CL) +Add Lc.nl & DvhN.nl + +* v1.6.2.2 (2020-02-03) +Add Fd.nl (Googlebot) +Add Spectator.com.au & TheCourier.com.au +Fix Espresso.repubblica.it +Fix TheAdvocate.com.au + +* v1.6.2.1 (2020-01-31) +Add HBR Taiwan +Add Modern Healthcare +Add National Review +Add The Christian Science Monitor +Add The Daily Beast +Add World Politics Review +Fix Boston Globe (proper) +Fix NYTimes Cooking (images) +Fix Townsville Bulletin (url) +Fix Wall Street Journal (blogs) + +* v1.6.1.6 (2020-01-26) +Add regional Ad.nl sites (ADR) +Add Australian newspapers (Firefox-sync) +Add Chemical & Engineering News +Add KleineZeitung.at +Add Le Journal du Dimanche (lejdd.fr) +Add NK News (Firefox-sync) +Add Tijd.be (Firefox-sync) +Fix Dn.se +Fix ChicagoBusiness +Fix London Review of Books (allow cookies) + +* v1.6.1.5 (2020-01-19) +Add Challenges.fr +Add Digiday +Add El Pais +Add Folha de S. Paulo, O Globo, Valor Econômico, O Estado de S. Paulo, Exame (Brazil) +Add Fortune (magazine) +Add LaStampa.it +Add Liberation.fr +Add Miami Herald +Add ValeursActuelles.fr +Fix json-bug at install/options (when not saving options) +Fix The New Statesman (version US/UK) + +* v1.6.1.3 (2020-01-12) +Add Caixin Global +Add Newcastle Herald +Add Scribd (unblur text of documents) +Add Tech in Asia +Add The Athletic +Fix Australian Financial Review (enable javascript) +Fix Dn.se +Fix Economist (Javascript/cookies) +Fix ET Prime restrictions (only articles) +Fix Handelsblatt (Googlebot) +Fix MIT Tech Review +Fix LeParisien.fr (block TinyPass paywall) +Fix LesEchos.fr (block TinyPass) +Fix The Globe and Mail +Fix Toronto Star (enable Javascript) +Remove The Athletic trial-banners +Load sites from json +Block general paywall scripts (like TinyPass/Piano) +Remove Google Analytics + +* v1.6.1.0 (2019-12-15) +Add ET Prime +Fix Foreign Policy (proper) +Fix Medium content on non-Medium sites +Fix Philidelphia Inquirer (block paywall-script) +Fix Spectator.co.uk (block paywall-script) +Fix The Globe and Mail +Fix Quartz/qz.com (gdpr) +Fix WSJ (reformatting & restrictions to only articles) +Rename thenewsrep to new domain sofrep + +* v1.6.0.0 (2019-12-08) +Add Handelsblatt +Add London Review of Books +Add National Post +Add The Diplomat +Add The Times Literary Supplement +Add Towards Data Science +Fix Boston Globe (block paywall-script) +Fix Haaretz English (anti-adblocker script) +Fix sites on Medium platform (remove cookies) + +* v1.5.9.0 (2019-11-25) +Fix Ad.nl/Ed.nl (cookie) +Fix BizJournals (enable Javascript) +Fix Bloomberg +Fix Businessinsider (new option: blocking external scripts) +Fix Economist (Javascript/cookies) +Fix SfChronicle (reload loop) +Fix Telegraaf.nl (timing issue) +Fix The Atlantic + +* v1.5.8.0 (2019-11-12) +Add LeParisien.fr +Fix NzHerald +Fix Quora (read more) + +* v1.5.6.0 (2019-10-28) +Add Le Monde +Fix Quartz/qz.com +Fix WaPo (gdpr) +Fix WSJ (Googlebot & mod=rsswn obsolete) + +* v1.5.4.0 (2019-10-01) +Add Dutch papers: ad.nl, ed.nl (cookie fix), parool.nl, trouw.nl, volkskrant.nl +Add Dutch magazines: groene.nl, vn.nl +Fix Dutch papers: parool.nl, trouw.nl, volkskrant.nl (enable) Javascript) diff --git a/contentScript.js b/contentScript.js new file mode 100644 index 0000000..c029974 --- /dev/null +++ b/contentScript.js @@ -0,0 +1,9389 @@ +//"use strict"; +var ext_api = (typeof browser === 'object') ? browser : chrome; +var mobile = window.navigator.userAgent.toLowerCase().includes('mobile'); +var page_content; +var domain; +var func_post; +var fetch_headers; +var data_ext_fetch = []; +var data_ext_fetch_id = 0; +var csDone; +var csDoneOnce; +var cs_param = {}; +var dompurify_loaded = (typeof DOMPurify === 'function'); +var dompurify_options = {ADD_TAGS: ['amp-img', 'iframe', 'list'], ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'itemprop', 'layout', 'target']}; + +var ar_grupo_clarin_domains = ['clarin.com', 'lavoz.com.ar', 'losandes.com.ar', 'ole.com.ar']; +var be_groupe_ipm_domains = ['dhnet.be', 'lalibre.be', 'lavenir.net']; +var be_mediahuis_domains = ['gva.be', 'hbvl.be', 'nieuwsblad.be', 'standaard.be']; +var be_roularta_domains = ['artsenkrant.com', 'beleggersbelangen.nl', 'femmesdaujourdhui.be', 'flair.be', 'knack.be', 'kw.be', 'levif.be', 'libelle.be']; +var ca_gcm_domains = ['lesoleil.com'].concat(['latribune.ca', 'lavoixdelest.ca', 'ledroit.com', 'ledroitfranco.com', 'lenouvelliste.ca', 'lequotidien.com']); +var ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca']; +var ch_media_domains = ['aargauerzeitung.ch', 'luzernerzeitung.ch', 'tagblatt.ch']; +var ch_tamedia_domains = ['24heures.ch', 'bazonline.ch', 'bernerzeitung.ch', 'derbund.ch', 'tagesanzeiger.ch', 'tdg.ch']; +var de_funke_medien_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'harzkurier.de', 'ikz-online.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'tlz.de', 'waz.de', 'wp.de', 'wr.de']; +var de_ippen_media_domains = ['fr.de', 'merkur.de', 'ovb-online.de']; +var de_lv_domains = ['profi.de', 'wochenblatt.com']; +var de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'maz-online.de', 'neuepresse.de', 'ostsee-zeitung.de', 'rnd.de', 'saechsische.de']; +var de_motor_presse_domains = ['aerokurier.de', 'auto-motor-und-sport.de', 'flugrevue.de', 'motorradonline.de', 'womenshealth.de']; +var de_rp_medien_domains = ['ga.de', 'rp-online.de', 'saarbruecker-zeitung.de', 'volksfreund.de']; +var de_vrm_domains = ['allgemeine-zeitung.de', 'echo-online.de', 'wiesbadener-kurier.de']; +var de_vrm_custom_domains = ['buerstaedter-zeitung.de', 'hochheimer-zeitung.de', 'lampertheimer-zeitung.de', 'lauterbacher-anzeiger.de', 'main-spitze.de', 'mittelhessen.de', 'oberhessische-zeitung.de', 'wormser-zeitung.de']; +var es_epiberica_domains = ['diariodemallorca.es', 'eldia.es', 'elperiodico.com', 'epe.es', 'farodevigo.es', 'informacion.es', 'laprovincia.es', 'levante-emv.com', 'lne.es', 'mallorcazeitung.es', 'superdeporte.es']; +var es_epiberica_custom_domains = ['diaridegirona.cat', 'diariocordoba.com', 'diariodeibiza.es', 'elcorreogallego.es', 'elcorreoweb.es', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info', 'laopinioncoruna.es', 'laopiniondemalaga.es', 'laopiniondemurcia.es', 'laopiniondezamora.es', 'regio7.cat']; +var es_grupo_vocento_domains = ['abc.es', 'canarias7.es', 'diariosur.es', 'diariovasco.com', 'elcomercio.es', 'elcorreo.com', 'eldiariomontanes.es', 'elnortedecastilla.es', 'hoy.es', 'ideal.es', 'larioja.com', 'lasprovincias.es', 'laverdad.es', 'lavozdigital.es']; +var es_unidad_domains = ['elmundo.es', 'expansion.com', 'marca.com']; +var fr_groupe_la_depeche_domains = ['centrepresseaveyron.fr', 'journaldemillau.fr', 'ladepeche.fr', 'lindependant.fr', 'midilibre.fr', 'nrpyrenees.fr', 'petitbleu.fr', 'rugbyrama.fr']; +var fr_groupe_nice_matin_domains = ['monacomatin.mc', 'nicematin.com', 'varmatin.com']; +var it_ilmessaggero_domains = ['corriereadriatico.it', 'ilgazzettino.it', 'ilmattino.it', 'ilmessaggero.it', 'quotidianodipuglia.it']; +var it_gedi_domains = ['huffingtonpost.it', 'italian.tech', 'lastampa.it', 'lescienze.it', 'moda.it', 'repubblica.it']; +var it_quotidiano_domains = ['ilgiorno.it', 'ilrestodelcarlino.it', 'iltelegrafolivorno.it', 'lanazione.it', 'quotidiano.net']; +var ke_nation_media_domains = ['businessdailyafrica.com', 'nation.africa']; +var ke_nation_media_custom_domains = ['monitor.co.ug', 'mwananchi.co.tz', 'mwanaspoti.co.tz', 'thecitizen.co.tz']; +var medium_custom_domains = ['betterprogramming.pub', 'towardsdatascience.com']; +var nl_dpg_adr_domains = ['ad.nl', 'bd.nl', 'bndestem.nl', 'destentor.nl', 'ed.nl', 'gelderlander.nl', 'pzc.nl', 'tubantia.nl']; +var nl_dpg_media_domains = ['demorgen.be', 'flair.nl', 'humo.be', 'libelle.nl', 'margriet.nl', 'parool.nl', 'trouw.nl', 'volkskrant.nl']; +var no_dn_media_domains = ['dn.no', 'europower.no', 'fiskeribladet.no', 'hydrogeninsight.com', 'intrafish.com', 'intrafish.no', 'rechargenews.com', 'tradewindsnews.com', 'upstreamonline.com']; +var pe_grupo_elcomercio_domains = ['diariocorreo.pe', 'elcomercio.pe', 'gestion.pe']; +var pl_ringier_domains = ['auto-swiat.pl', 'businessinsider.com.pl', 'forbes.pl', 'komputerswiat.pl', 'newsweek.pl', 'onet.pl']; +var sg_sph_media_domains = ['businesstimes.com.sg', 'straitstimes.com']; +var timesofindia_domains = ['epaper.indiatimes.com', 'timesofindia.indiatimes.com']; +var uk_nat_world_domains = ['scotsman.com', 'yorkshirepost.co.uk']; +var usa_adv_local_domains = ['al.com', 'cleveland.com', 'lehighvalleylive.com', 'masslive.com', 'mlive.com', 'nj.com', 'oregonlive.com', 'pennlive.com', 'silive.com', 'syracuse.com']; +var usa_arizent_custom_domains = ['accountingtoday.com', 'benefitnews.com', 'bondbuyer.com', 'dig-in.com', 'financial-planning.com', 'nationalmortgagenews.com']; +var usa_conde_nast_domains = ['architecturaldigest.com', 'bonappetit.com', 'cntraveler.com', 'epicurious.com', 'gq.com' , 'newyorker.com', 'vanityfair.com', 'vogue.co.uk', 'vogue.com', 'wired.com']; +var usa_craincomm_domains = ['360dx.com', 'adage.com', 'autonews.com', 'chicagobusiness.com', 'crainscleveland.com', 'crainsdetroit.com', 'crainsgrandrapids.com', 'crainsnewyork.com', 'european-rubber-journal.com', 'genomeweb.com', 'modernhealthcare.com', 'pionline.com', 'plasticsnews.com', 'precisionmedicineonline.com', 'rubbernews.com', 'sustainableplastics.com', 'tirebusiness.com', 'utech-polyurethane.com']; +var usa_gannett_domains = ['azcentral.com', 'cincinnati.com', 'commercialappeal.com', 'courier-journal.com', 'democratandchronicle.com', 'desmoinesregister.com', 'detroitnews.com', 'dispatch.com', 'freep.com', 'indystar.com', 'jacksonville.com', 'jsonline.com', 'knoxnews.com', 'news-press.com', 'northjersey.com', 'oklahoman.com', 'statesman.com', 'tennessean.com']; +var usa_hearst_comm_domains = ['ctpost.com', 'expressnews.com', 'houstonchronicle.com', 'nhregister.com', 'sfchronicle.com', 'timesunion.com']; +var usa_lee_ent_domains = ['buffalonews.com', 'journalnow.com', 'journalstar.com', 'madison.com', 'nwitimes.com', 'omaha.com', 'richmond.com', 'stltoday.com', 'tucson.com', 'tulsaworld.com']; +var usa_mcc_domains = ['bnd.com', 'charlotteobserver.com', 'elnuevoherald.com', 'fresnobee.com', 'kansas.com', 'kansascity.com', 'kentucky.com', 'mcclatchydc.com', 'miamiherald.com', 'newsobserver.com', 'sacbee.com', 'star-telegram.com', 'thestate.com', 'tri-cityherald.com']; +var usa_mng_domains = ['bostonherald.com', 'denverpost.com', 'eastbaytimes.com', 'mercurynews.com', 'ocregister.com', 'pressenterprise.com', 'sandiegouniontribune.com', 'twincities.com']; +var usa_nymag_domains = ['curbed.com', 'grubstreet.com', 'nymag.com', 'thecut.com', 'vulture.com']; +var usa_outside_mag_domains = ["backpacker.com", "betamtb.com", "betternutrition.com", "cleaneatingmag.com", "climbing.com", "outsideonline.com", "oxygenmag.com", "skimag.com", "trailrunnermag.com", "triathlete.com", "vegetariantimes.com", "womensrunning.com", "yogajournal.com"]; +var usa_tribune_domains = ['baltimoresun.com', 'capitalgazette.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com']; + +function clearLocalStorage(bg2csData = '') { + // clean local storage (when allow cookies) + if (matchDomain(['bloomberg.com', 'csmonitor.com', 'exame.com', 'slideshare.net'])) { + window.localStorage.clear(); + } + // clear local storage (when remove cookies) + if (bg2csData && bg2csData.cs_clear_lclstrg && !matchDomain(['britannica.com', 'nationalreview.com', 'thecritic.co.uk'].concat(usa_mcc_domains))) + window.localStorage.clear(); +} + +function run_custom(bg2csData, dompurify_loaded) { + +// custom/updated sites: load text from json (script[type="application/ld+json"]) +if (bg2csData.ld_json && dompurify_loaded) { + let data = bg2csData.ld_json; + if (data.includes('|')) { + window.setTimeout(function () { + let data_split = data.split('|'); + let paywall_sel = data_split[0]; + let article_sel = data_split[1]; + let paywall = document.querySelectorAll(paywall_sel); + let article = document.querySelector(article_sel); + // optional + let article_append = data_split[2]; + let article_hold = data_split[3]; + if (paywall.length && article) { + removeDOMElement(...paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + let json_key = findKeyJson(json, /^articlebody$/i) || findKeyJson(json, /^text$/i); + if (json_key) { + let json_text = parseHtmlEntities(json_key.replace(/[\r\n]/g, '').replace(/(\\r)?\\n/g, '
').replace(/\[[^\[]+]/g, '')); + if (!json_text.match(/\s(src|href)=/)) + json_text = breakText(json_text).replace(/\n\n/g, '

'); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + if (article_append || !article.parentNode) { + if (!article_hold) + article.innerHTML = ''; + article.appendChild(article_new); + } else if (article.parentNode) + article.parentNode.replaceChild(article_new, article); + } + } catch (err) { + console.log(err); + } + } + } + }, 1000); + } +} + +// custom/updated sites: load text from json (script#__NEXT_DATA__) +if (bg2csData.ld_json_next && dompurify_loaded) { + let data = bg2csData.ld_json_next; + if (data.includes('|')) { + window.setTimeout(function () { + let data_split = data.split('|'); + let paywall_sel = data_split[0]; + let article_sel = data_split[1]; + let paywall = document.querySelectorAll(paywall_sel); + let article = document.querySelector(article_sel); + // optional + let article_append = data_split[2]; + let article_hold = data_split[3]; + if (paywall.length && article) { + removeDOMElement(...paywall); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + let url_next = findKeyJson(json, ['slug']); + if (url_next && (typeof url_next === 'string') && !window.location.pathname.endsWith(url_next)) + refreshCurrentTab(); + let json_text = findKeyJson(json, ['blocks', 'body', 'BodyPlainText', 'content', 'contentHtml', 'description', 'html'], 500); + if (typeof json_text === 'string') + json_text = parseHtmlEntities(json_text); + else if (Array.isArray(json_text)) + json_text = '

' + json_text.map(x => (typeof x === 'string') ? x : (x.children ? x.children.map(y => y.text).join('') : x.text || x.innerHTML)).join('

') + '

'; + if (json_text) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + if (article_append || !article.parentNode) { + if (!article_hold) + article.innerHTML = ''; + article.appendChild(article_new); + } else if (article.parentNode) + article.parentNode.replaceChild(article_new, article); + } + } catch (err) { + console.log(err); + } + } + } + }, 1000); + } +} + +// custom/updated sites: load text from json (page source) +if (bg2csData.ld_json_source && dompurify_loaded) { + let data = bg2csData.ld_json_source; + if (data.includes('|')) { + window.setTimeout(function () { + let data_split = data.split('|'); + let paywall_sel = data_split[0]; + let article_sel = data_split[1]; + let paywall = document.querySelectorAll(paywall_sel); + let article = document.querySelector(article_sel); + let filter = new RegExp(data_split[2].replace(/\./g, '\\.').replace('=', '\\s?=\\s?')); + let json_key = data_split[3]; + // optional + let article_append = data_split[4]; + let article_hold = data_split[5]; + if (paywall.length && article) { + removeDOMElement(...paywall); + let json_script = getSourceJsonScript(filter, ':not([src])'); + if (json_script) { + let script_text = json_script.text.split(filter)[1]; + if (script_text.includes('};')) + script_text = script_text.split('};')[0] + '}'; + try { + let json = JSON.parse(script_text); + if (json) { + let json_text = parseHtmlEntities(getNestedKeys(json, json_key)); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + if (article_append || !article.parentNode) { + if (!article_hold) + article.innerHTML = ''; + article.appendChild(article_new); + } else if (article.parentNode) + article.parentNode.replaceChild(article_new, article); + } + } catch (err) { + console.log(err); + } + } + } + }, 1000); + } +} + +// custom/updated sites: load text from json (link[rel="alternate"][type="application/json"][href]) +if (bg2csData.ld_json_url && dompurify_loaded) { + let data = bg2csData.ld_json_url; + if (data.includes('|')) { + window.setTimeout(function () { + let data_split = data.split('|'); + let paywall_sel = data_split[0]; + let article_sel = data_split[1]; + // optional + let article_append = data_split[2]; + let article_hold = data_split[3]; + let article_id_sel = data_split[4]; + let key = data_split[5]; + let url_rest = data_split[6]; + let article_id; + if (article_id_sel) { + let article_id_sel_dom = document.querySelector(article_id_sel + '[content]'); + if (article_id_sel_dom) + article_id = article_id_sel_dom.content; + else + return; + } + function setMediaSrc(elem) { + if (elem.getAttribute('data-src')) + elem.src = elem.getAttribute('data-src'); + else { + let data_src = [...elem.attributes].find(x => x.name.endsWith('-src')); + if (data_src) + elem.src = elem.getAttribute(data_src.name); + } + } + func_post = function () { + let img_sel = 'img[src^="data:image/"]'; + let hidden_images = document.querySelectorAll('figure ' + img_sel + ', picture ' + img_sel); + for (let elem of hidden_images) + setMediaSrc(elem); + let iframes = document.querySelectorAll('iframe[src="about:blank"]'); + for (let elem of iframes) + setMediaSrc(elem); + } + getJsonUrl(paywall_sel, '', article_sel, {art_append: article_append, art_hold: article_hold, art_style: 'margin: 25px 0px;'}, article_id, key, url_rest); + }, 1000); + } +} + +// custom/updated sites: load text from archive.is +if (bg2csData.ld_archive_is && dompurify_loaded) { + let data = bg2csData.ld_archive_is; + if (data.includes('|')) { + window.setTimeout(function () { + let url = window.location.href; + let data_split = data.split('|'); + let paywall_sel = data_split[0]; + let article_sel = data_split[1]; + // optional + let article_src_sel = data_split[2] || article_sel; + let article_link_sel = data_split[3] || article_sel; + func_post = function () { + if (mobile) { + let lazy_images = document.querySelectorAll('figure img[loading="lazy"][style], picture img[loading="lazy"][style]'); + for (let elem of lazy_images) + elem.style = 'width: 95%;'; + } + } + getArchive(url, paywall_sel, '', article_sel, '', article_src_sel, article_link_sel); + }, 1000); + } +} + +// custom/updated sites: add link to article +if (bg2csData.add_ext_link) { + let data = bg2csData.add_ext_link; + if (data.css && data.css.includes('|') && data.type) { + window.setTimeout(function () { + let url = window.location.href; + let data_split = data.css.split('|'); + let paywall_sel = data_split[0]; + let article_sel = data_split[1]; + let paywall = document.querySelectorAll(paywall_sel); + if (paywall.length) { + removeDOMElement(...paywall); + let article = document.querySelector(article_sel); + if (article) { + switch (data.type) { + case 'archive.is': + article.firstChild.before(archiveLink(url)); + break; + case 'google_search_tool': + article.firstChild.before(googleSearchToolLink(url)); + break; + } + } + } + }, 1000); + } +} + +// check for opt-in confirmation (from background.js) +if (bg2csData.optin_setcookie) { + false; +} + +// custom/updated sites: try to unhide text on amp-page +if (bg2csData.amp_unhide) { + window.setTimeout(function () { + let amp_page_hide = document.querySelector('script[src*="/amp-access-"], script[src*="/amp-subscriptions-"]'); + if (amp_page_hide) { + amp_unhide_subscr_section(); + amp_unhide_access_hide(); + amp_images_replace(); + amp_iframes_replace(); + } + }, 100); +} + +// custom/updated sites: amp-redirect +if (bg2csData.amp_redirect) { + window.setTimeout(function () { + let amp_script = document.querySelector('script[src^="https://cdn.ampproject.org/"]'); + let amphtml = document.querySelector('head > link[rel="amphtml"]'); + let amp_page = amp_script && !amphtml; + if (!amp_page) { + let data = bg2csData.amp_redirect; + let data_split = data.split('|'); + let paywall_sel = data_split[0]; + // optional + let amp_url = data_split[1]; + if (amp_url) { + if (amp_url.includes('{path}')) + amp_url = amp_url.replace('{path}', window.location.pathname).replace(/\/\//g, '/'); + if (amp_url.includes('{host}')) + amp_url = 'https://' + amp_url.replace('{host}', window.location.hostname.replace('www.', '')); + } + amp_redirect(paywall_sel, '', amp_url); + } + }, 500); +} + +function cs_code_elems(elems) { + for (let elem of elems) { + let elem_dom = document.querySelectorAll(elem.cond); + for (let item of elem_dom) { + if (elem.rm_elem) + removeDOMElement(item); + if (elem.rm_class) { + let rm_class = elem.rm_class.split(/[,|]/).map(x => x.trim()); + item.classList.remove(...rm_class); + } + if (elem.rm_attrib) { + let rm_attribs = elem.rm_attrib.split('|'); + for (let rm_attrib of rm_attribs) + item.removeAttribute(rm_attrib); + } + if (elem.set_attrib && elem.set_attrib.includes('|')) { + let attrib = elem.set_attrib.split('|')[0]; + let value = elem.set_attrib.split('|')[1]; + item.setAttribute(attrib, value); + } + if (elem.elems) + cs_code_elems(elem.elems); + } + if (elem.rm_elem_wait) + waitDOMElement(elem.cond, elem.cond.match(/^\w+/)[0].toUpperCase(), removeDOMElement, true); + } +} + +// custom/updated sites: cs_code +if (bg2csData.cs_code) { + window.setTimeout(function () { + cs_code_elems(bg2csData.cs_code); + }, 1000); +} + +}// run_custom + +function run_cs_default(bg2csData = '') { + for (let n = 0; n < 5; n++) { + setTimeout(function () { + clearLocalStorage(bg2csData); + if (!bg2csData.cs_block) + cs_default(bg2csData); + }, n * 200); + } +} + +var msg_once; +var msg_once_ses; +var url_old; +if (ext_api.runtime) { + ext_api.runtime.onMessage.addListener( + function (request, sender) { + if (request.msg === 'bg2cs') { + let bg2csData = request.data; + if (!(msg_once && (url_old === window.location.href))) { + msg_once = true; + url_old = window.location.href; + if (Object.keys(bg2csData).filter(x => ![('cs_block', 'cs_clear_lclstrg')].includes(x)).length) + run_custom(bg2csData, dompurify_loaded); + } + run_cs_default(bg2csData); + } else if (request.msg === 'showExtSrc') { + if (!(msg_once_ses && url_old === window.location.href)) { + msg_once_ses = true; + url_old = window.location.href; + replaceDomElementExtSrc(request.data.url, request.data.url_src, request.data.html, true, false, request.data.selector, request.data.text_fail, request.data.selector_source, request.data.selector_archive); + } + } else if (request.msg === 'showExtFetch') { + let fetch_id = request.data.data_ext_fetch_id; + if (data_ext_fetch[fetch_id]) { + data_ext_fetch[fetch_id].func(request.data.url, request.data.html, ...data_ext_fetch[fetch_id].args); + } else + refreshCurrentTab(true, false); + } + }) +} else { + run_cs_default(); +} + +var msg_once_page; +if (domain = matchDomain(['businesspost.ie', 'lepoint.fr'])) { + window.addEventListener('message', function (event) { + if (event.data) { + if (event.data.type === 'from_page') { + let article_options = { + 'businesspost.ie': 'div.article-body-section', + 'lepoint.fr': 'div#contenu' + }; + let article_sel = article_options[domain]; + let data = event.data.data; + let article = document.querySelector(article_sel); + if (data && article && dompurify_loaded && !msg_once_page) { + msg_once_page = true; + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(data, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + if (article_new) { + if (matchDomain('businesspost.ie')) { + let iframes = article_new.querySelectorAll('div.article__iframe > iframe[height]'); + for (let elem of iframes) + elem.style = 'height: ' + (Number(elem.height) + 25) + 'px; !important'; + } + article.innerHTML = ''; + article.appendChild(article_new); + } + } + } + } + }, false); +} + +function cs_default(bg2csData = '') { + +if (bg2csData && bg2csData.cs_param) + cs_param = bg2csData.cs_param; + +var overlay = document.querySelector('body.didomi-popup-open'); +if (overlay) + overlay.classList.remove('didomi-popup-open'); +var ads = 'div.OUTBRAIN, div[id^="taboola-"], div.ad-container, div[class*="-ad-container"], div[class*="_ad-container"], div.arc_ad, div[id^="poool-"], amp-ad, amp-embed[type="mgid"], amp-embed[type="outbrain"], amp-embed[type="taboola"]'; +hideDOMStyle(ads, 10); + +if (!(csDone || csDoneOnce)) { + +if (matchDomain('medium.com') || matchDomain(medium_custom_domains) || document.querySelector('head > link[href*=".medium.com/"]')) { + let url = window.location.href; + let paywall = document.querySelector('article.meteredContent'); + if (paywall) { + paywall.removeAttribute('class'); + paywall.firstChild.before(freediumLink(url)); + paywall.firstChild.before(readMediumLink(url)); + } + window.setTimeout(function () { + let banner = pageContains('div > div > p', /author made this story available to/); + if (banner.length) + removeDOMElement(banner[0].parentNode.parentNode); + }, 1000); +} + +else if (window.location.hostname.match(/\.(au|nz)$/) || matchDomain(['afr.com'])) {//australia & new zealand + +if (matchDomain('afr.com')) { + let error = document.querySelector('div[data-testid="DefaultError"]'); + if (error) { + csDoneOnce = true; + refreshCurrentTab(); + } + let article_sel = '#endOfArticle:not(:empty)'; + let article = document.querySelector(article_sel); + if (!article) { + article_sel = 'section#body-content'; + article = document.querySelector(article_sel); + } + if (article) { + window.setTimeout(function () { + let pars = article.querySelectorAll('p:not([class]), figure:not(:empty)'); + let pagination = document.querySelector('div > span#pagination-top'); + if (((pars.length && pars.length < 5) || pagination) && dompurify_loaded) { + if (pagination) { + removeDOMElement(pagination.parentNode); + } else { + let loading = pageContains(article_sel + ' div', 'Loading...'); + removeDOMElement(...pars, ...loading); + } + let url = window.location.href.split(/[#\?]/)[0]; + fetch(url) + .then(response => { + if (response.ok) { + response.text().then(html => { + if (html.includes('__REDUX_STATE__=')) { + try { + let json = JSON.parse(html.split('__REDUX_STATE__=')[1].split('};')[0].replace(/:undefined([,}])/g, ':"undefined"$1') + '}'); + if (json) { + let placeholders; + function find_item(match, p1, offset, string) { + let placeholder_id = p1; + let result = ''; + if (placeholder_id && placeholders[placeholder_id]) { + let item = placeholders[placeholder_id]; + if (item.data) { + if (['linkArticle', 'linkExternal'].includes(item.type)) { + if (item.data.text) { + if (item.data.url) + result = '' + item.data.text + ''; + else + result = item.data.text; + } + } else if (item.type === 'image') { + if (item.data.fileName) + result = '
' + (item.data.caption ? item.data.caption : '') + (item.data.source ? ' ' + item.data.source + '' : '') + '
'; + } else if (item.type === 'youtube') { + if (item.data.url) { + if (item.data.url.includes('watch?v=')) + result = ''; + else + result = '' + item.data.url + ''; + } + } else if (['instagram', 'twitter'].includes(item.type)) { + if (item.data.url) + result = '' + item.data.url + ''; + } else if (item.type === 'iframe') { + if (item.data.url) + result = ''; + } else if (!['callout', 'quote', 'relatedStory', 'video'].includes(item.type)) { + console.log(item); + } + } + } + return result; + } + let json_text = json.page.content.asset.body; + if (json_text) { + placeholders = json.page.content.asset.bodyPlaceholders; + if (placeholders) + json_text = json_text.replace(/<\/x-placeholder>/g, find_item); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + if (article_sel.startsWith('#endOfArticle')) + article.parentNode.replaceChild(content_new, article); + else + article.firstChild.before(content_new); + addStyle(article_sel + ' p {margin: 20px 0px;}'); + } else { + let parser = new DOMParser(); + let first = true; + let posts = json.page.content.asset.posts; + for (let post of posts) { + if (first) { + first = false; + continue; + } + let asset = post.asset; + if (asset && asset.body) { + let json_text = asset.body; + placeholders = asset.bodyPlaceholders; + if (placeholders) + json_text = json_text.replace(/<\/x-placeholder>/g, find_item); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let par = doc.querySelector('section'); + let header; + if (asset.headlines && asset.headlines.headline) { + header = document.createElement('h2'); + header.innerText = asset.headlines.headline; + header.id = post.id; + } + let byline; + if (asset.byline) { + byline = document.createElement('p'); + byline.innerText = asset.byline; + byline.style = 'margin-bottom: 24px;' + } + article.append(header, byline, par); + } + } + addStyle('section:not([class]) > p {margin: 24px 0px;}'); + let key_posts = document.querySelectorAll('li > a[href*="?post="]'); + for (let elem of key_posts) + elem.href = elem.href.replace('?post=', '#'); + } + } + } catch (err) { + console.log(err); + } + } + }); + } + }).catch(function (err) { + false; + }); + } + }, 1000); + } +} + +else if (matchDomain('businessdesk.co.nz')) { + let paywall = document.querySelector('div.paywall'); + if (paywall && dompurify_loaded) { + paywall.classList.remove('paywall'); + let signup_box = document.querySelector('div.signup-box-container'); + removeDOMElement(signup_box); + let url = window.location.href.split(/[#\?]/)[0]; + fetch(url) + .then(response => { + if (response.ok) { + response.text().then(html => { + let match = html.match(/:query="'([^"]+)'"/); + if (match) { + let parser = new DOMParser(); + let src_text = breakText(parseHtmlEntities(match[1])).replace(/\n\n/g, '

').replace(/\.([^\s\d]|&)/g, ". $1"); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(src_text, dompurify_options) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + paywall.innerHTML = ''; + paywall.appendChild(content_new); + } + }) + } + }) + } +} + +else if (matchDomain(['crikey.com.au', 'smartcompany.com.au', 'themandarin.com.au'])) { + let ads = 'div.wp-block-pm-ad-placeholder-block'; + hideDOMStyle(ads); +} + +else if (matchDomain('forbes.com.au')) { + getJsonUrl('div[class*="_gate"]', '', 'div.article-page__content-body'); + let fade = document.querySelector('div[style*="background-image: linear-gradient"]'); + removeDOMElement(fade); +} + +else if (matchDomain('macrobusiness.com.au')) { + let paywall = pageContains('div > p', 'The full text of this article is available'); + if (paywall[0] && dompurify_loaded) { + let fade = document.querySelector('div.bg-gradient-to-t'); + removeDOMElement(paywall[0].parentNode, fade); + let json_script = document.querySelector('script#__NUXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + let json_text = json.filter(x => typeof x === 'string' && x.match(/(<|\\u003C)p>/))[0]; + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + let article = document.querySelector('div.content'); + if (article) { + article.innerHTML = ''; + article.appendChild(content_new); + } + } catch (err) { + console.log(err); + } + } + } +} + +else if (matchDomain('nzherald.co.nz')) { + // plus code in contentScript_once_var.js (timing) + let premium_toaster = '#premium-toaster'; + hideDOMStyle(premium_toaster); +} + +else if (matchDomain('spectator.com.au')) { + getJsonUrl('section.paywall', '', 'div.article-body', {art_append: 1}); +} + +else if (matchDomain('thesaturdaypaper.com.au')) { + let hide_end = document.querySelector('div.hide-end'); + if (hide_end) { + refreshCurrentTab_bg(); + csDoneOnce = true; + } + let paywall = document.querySelector('div.paywall-hard-always-show'); + removeDOMElement(paywall); +} + +else if (matchDomain(['brisbanetimes.com.au', 'smh.com.au', 'theage.com.au', 'watoday.com.au'])) { + if (!window.location.hostname.startsWith('amp.')) { + amp_redirect('head > meta[content^="FOR SUBSCRIBERS"], #paywall_prompt'); + } else { + amp_unhide_subscr_section(); + } +} + +else { + // Australian Community Media newspapers + let au_comm_media_domains = ['bendigoadvertiser.com.au', 'bordermail.com.au', 'canberratimes.com.au', 'centralwesterndaily.com.au', 'dailyadvertiser.com.au', 'dailyliberal.com.au', 'examiner.com.au', 'illawarramercury.com.au', 'newcastleherald.com.au', 'northerndailyleader.com.au', 'standard.net.au', 'theadvocate.com.au', 'thecourier.com.au', 'westernadvocate.com.au']; + let au_comm_media_link = document.querySelector('a[href^="https://austcommunitymedia.my.site.com/"]'); + if (matchDomain(au_comm_media_domains) || au_comm_media_link) { + let mask = document.querySelector('div[class^="gradient-mask-"]'); + if (mask) { + mask.removeAttribute('class'); + let div_hidden = document.querySelectorAll('div.flex-col div.hidden'); + for (let elem of div_hidden) + elem.classList.remove('hidden'); + } else { + let subscribe_truncate = document.querySelector('.subscribe-truncate'); + if (subscribe_truncate) + subscribe_truncate.classList.remove('subscribe-truncate'); + let subscriber_hiders = document.querySelectorAll('.subscriber-hider'); + for (let subscriber_hider of subscriber_hiders) + subscriber_hider.classList.remove('subscriber-hider'); + } + let noscroll = document.querySelectorAll('html[style], body[style]'); + for (let elem of noscroll) + elem.removeAttribute('style'); + let story_generic_iframe = '.story-generic__iframe'; + let blocker = 'div.blocker'; + let overlays = 'div.transition-all, div[id^="headlessui-dialog"]'; + let ads = '.ad-placeholder, .sticky, [id*="-container"], #hindsight-ads-iframe'; + hideDOMStyle(story_generic_iframe + ', ' + blocker + ', ' + overlays + ', ' + ads); + } else if (window.location.hostname.endsWith('.com.au')) { + // Australia News Corp + let au_news_corp_domains = ['adelaidenow.com.au', 'cairnspost.com.au', 'codesports.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'theaustralian.com.au', 'thechronicle.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au']; + if (matchDomain(au_news_corp_domains)) { + let url = window.location.href; + if (url.includes('/subscribe/')) { + if (!url.includes('/digitalprinteditions') && url.includes('dest=') && url.split('dest=')[1].split('&')[0]) { + let url_new = decodeURIComponent(url.split('dest=')[1].split('&')[0]) + '?amp'; + window.setTimeout(function () { + window.location.href = url_new; + }, 500); + } + } else if (window.location.search.match(/[&\?]amp/)) { + amp_unhide_subscr_section('[id^="ad-mrec-"]', false); + let figure_stretch = document.querySelectorAll('figure.stretch'); + for (let elem of figure_stretch) + elem.classList.remove('stretch'); + let comments = document.querySelector('#comments-load, .comments-module'); + removeDOMElement(comments); + } else { + if (window.location.pathname.includes('/video/') && document.querySelector('div.vms-premium-video')) + header_nofix('div.video-hub'); + let ads = '.header_ads-container, .ad-block'; + hideDOMStyle(ads); + } + } else { + // Australian Seven West Media + if (matchDomain('thewest.com.au') || document.querySelector('head > link[href="https://images.thewest.com.au"]')) { + function thewest_main(node) { + let filter = /^window\.PAGE_DATA\s?=\s?/; + let json_script = getSourceJsonScript(filter); + if (json_script) { + let json_text = json_script.text.split(filter)[1]; + json_text = json_text.replace(/:undefined([,}])/g, ':"undefined"$1'); + try { + let json_article = JSON.parse(json_text); + let json_pub; + for (let key in json_article) { + let json_resolution = json_article[key].data.result.resolution; + if (json_resolution && json_resolution.publication) { + json_pub = json_resolution.publication; + break; + } + } + let json_content = []; + let url_loaded; + if (json_pub) { + json_content = json_pub.content.blocks; + url_loaded = json_pub._self; + } else + refreshCurrentTab(); + //let json_video = json_pub.mainVideo; + let url = window.location.href; + if (!url_loaded || !url.includes(url_loaded.slice(-10))) + refreshCurrentTab(); + let par_elem, par_sub1, par_sub2; + let par_dom = document.createElement('div'); + let tweet_id = 1; + for (let par of json_content) { + par_elem = ''; + if (par.kind === 'text') { + par_elem = document.createElement('p'); + par_elem.innerText = par.text; + } else if (par.kind === 'subhead') { + par_elem = document.createElement('h2'); + par_elem.innerText = par.text; + } else if (par.kind === 'pull-quote') { + par_elem = document.createElement('i'); + par_elem.innerText = (par.attribution ? par.attribution + ': ' : '') + par.text; + } else if (par.kind === 'embed') { + if (par.reference.includes('https://omny.fm/') || par.reference.includes('https://docdro.id/')) { + par_elem = document.createElement('embed'); + par_elem.src = par.reference; + par_elem.style = 'height:500px; width:100%'; + par_elem.frameborder = '0'; + } else { + par_elem = document.createElement('a'); + par_elem.href = par.reference; + par_elem.innerText = par.reference.split('?')[0]; + console.log('embed: ' + par.reference); + } + } else if (par.kind === 'unordered-list') { + if (par.items) { + par_elem = document.createElement('ul'); + for (let item of par.items) + if (item.text) { + par_sub1 = document.createElement('li'); + if (item.intentions[0] && item.intentions[0].href) { + par_sub2 = document.createElement('a'); + par_sub2.href = item.intentions[0].href; + } else { + par_sub2 = document.createElement('span'); + } + par_sub2.innerText = item.text; + par_sub1.appendChild(par_sub2); + par_elem.appendChild(par_sub1); + } + } + } else if (par.kind === 'inline') { + if (par.asset.kind === 'image' && par.asset.original && par.asset.original.reference) { + par_elem = makeFigure(par.asset.original.reference, par.asset.captionText, {style: 'width:100%'}); + } + } else if (par.kind === 'inline-related') { + par_elem = document.createElement('p'); + if (par.publications) { + for (let elem of par.publications) { + let par_link = document.createElement('a'); + par_link.href = elem._self; + par_link.innerText = elem.heading; + par_elem.appendChild(par_link); + par_elem.appendChild(document.createElement('br')); + } + } + } else { + par_elem = document.createElement('p'); + par_elem.innerText = par.text; + console.log(par.kind); + } + if (par_elem) + par_dom.appendChild(par_elem); + } + let content = document.querySelector('div[class*="StyledArticleContent"]'); + if (content) { + content.innerHTML = ''; + content.appendChild(par_dom); + } else { + par_dom.setAttribute('style', 'margin: 20px;'); + node.before(par_dom); + } + } catch (err) { + console.log(err); + } + } + removeDOMElement(node); + } + let paywall_sel = 'div.paywall div[data-testid*="BreachScreen"], div[class*="StyledBreachWallContent"]'; + let paywall = document.querySelector(paywall_sel); + if (paywall) + thewest_main(paywall); + else { + csDoneOnce = true; + waitDOMElement(paywall_sel, 'DIV', thewest_main, true); + } + let ads = 'div.headerAdvertisement'; + hideDOMStyle(ads); + } else if (document.querySelector('head > link[rel="dns-prefetch"][href="//static.ew.mmg.navigacloud.com"]')) { // McPherson Media Group + let paywall = document.querySelector('div#content-Load-message'); + if (paywall) { + removeDOMElement(paywall); + let lockable = document.querySelectorAll('div[id^="lockable-"]'); + for (let elem of lockable) { + elem.removeAttribute('style'); + elem.removeAttribute('id'); + } + let gradient = document.querySelector('div.gradienttext'); + if (gradient) + gradient.removeAttribute('class'); + } + } else + csDone = true; + } + } else + csDone = true; +} + +} else if (window.location.hostname.match(/\.(de|at|ch)$/) || matchDomain(['faz.net', 'handelsblatt.com', 'tt.com', 'wochenblatt.com'])) {//germany/austria/switzerland - ch + +if (matchDomain('aachener-zeitung.de')) { + let url = window.location.href; + getArchive(url, 'div[data-testid="paywall-position-popover"]', '', 'article'); + let shade = document.querySelector('div.paywalled-article'); + if (shade) + shade.classList.remove('paywalled-article'); + let noscroll = document.querySelectorAll('html[class], body[class]'); + for (let elem of noscroll) + elem.removeAttribute('class'); +} + +else if (matchDomain('aerztezeitung.de')) { + let paywall = document.querySelector('div.AZLoginModule'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let content = document.querySelector('p.intro'); + if (json_text && content) { + let article_new = document.createElement('p'); + article_new.innerText = json_text; + content.after(article_new); + } + } + } + } +} + +else if (matchDomain(['arcinfo.ch', 'lacote.ch', 'lenouvelliste.ch'])) {// Groupe ESH Médias + let paywall = document.querySelector('section#paywall-articles'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let url_id = window.location.pathname.match(/\d+$/).pop(); + let html = document.documentElement.outerHTML; + let json; + if (html.includes('window.__NUXT__=')) { + json = html.split('window.__NUXT__=')[1].split('')[0].trim().replace(/blocs:\[\{.*?\}\],/g, ''); + if (url_id && !json.includes('{"' + url_id + '":')) + refreshCurrentTab(); + } + let article = document.querySelector('div.html-content'); + let no_intro = false; + if (!article) { + article = document.querySelector('div.container-mobile-full'); + no_intro = true; + } + if (article && json) { + let content = ''; + if (json.includes('text_1="')) + content = json.split('text_1="').pop().split('";')[0]; + else { + let parts = json.split('html:"'); + parts.splice(0, 1); + for (let part of parts) + content += part.split('",has_pre_content')[0]; + } + if (content) { + content = content.replace(/\\u003C/g, '<').replace(/\\u003E/g, '>').replace(/\\u002F/g, '/').replace(/\\"/g, '"').replace(/\\r\\n/g, ''); + let parser = new DOMParser(); + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(content, dompurify_options) + '
', 'text/html'); + let iframely = content_new.querySelectorAll('div > div.fr-iframely'); + for (let elem of iframely) { + let url_dom = elem.querySelector('[data-iframely-url]'); + if (url_dom) { + let iframe = document.createElement('iframe'); + iframe.src = url_dom.getAttribute('data-iframely-url'); + iframe.style = 'width: 100%; height: 400px;'; + elem.parentNode.replaceChild(iframe, elem); + } + } + let article_top; + if (!no_intro) { + article_top = article.parentNode.parentNode; + removeDOMElement(article.parentNode); + } else + article_top = article; + article_top.appendChild(content_new.querySelector('div')); + } else { + refreshCurrentTab(); + } + } + } + let ads = 'div[class*="ads_type_"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('automobilwoche.de')) { + let body_hidden = document.querySelector('body[class]'); + if (body_hidden) + body_hidden.removeAttribute('class'); + let lazy_images = document.querySelectorAll('img.lazy[data-src]'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-src'); + elem.removeAttribute('class'); + } + let lazy_sources = document.querySelectorAll('source[srcset^="data:image"]'); + removeDOMElement(...lazy_sources); +} + +else if (matchDomain(['beobachter.ch', 'handelszeitung.ch'])) { + let paywall = document.querySelector('div#piano-inlined'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = document.querySelector('script#hydrationdata'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json) { + let url_id = json_script.text.includes('"gcid":"') ? json_script.text.split('"gcid":"')[1].split('"')[0] : ''; + if (url_id && !window.location.pathname.endsWith(url_id)) + refreshCurrentTab(); + let pars = json.state; + let paragraphs = document.querySelectorAll('div.paragraph'); + let article = paragraphs[0]; + if (article) { + article.setAttribute('class', 'paragraph text-paragraph'); + for (let paragraph of paragraphs) + paragraph.innerHTML = ''; + let parser = new DOMParser(); + for (let par in pars) { + let par_elem = pars[par]; + let elem = document.createElement('div'); + elem.style = 'font-size: 1.7rem; margin: 25px;'; + let sub_elem = ''; + if (par_elem.__typename === 'TextParagraph' && par_elem.text) { + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(par_elem.text) + '
', 'text/html'); + sub_elem = content_new.querySelector('div'); + } else if (par_elem.__typename === 'EmbedParagraph' && par_elem.embedCode) { + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(par_elem.embedCode, dompurify_options) + '
', 'text/html'); + sub_elem = content_new.querySelector('div'); + let iframe = sub_elem.querySelector('iframe[width]'); + if (iframe) { + let ratio = iframe.width / (mobile ? 320 : 640); + iframe.width = iframe.width / ratio; + iframe.height = iframe.height / ratio; + } + } else if (par_elem.__typename === 'ImageFile') { + if (par_elem.origin) { + sub_elem = document.createElement('img'); + sub_elem.src = par_elem.origin; + sub_elem.alt = par_elem.alt; + if (par_elem.width) { + let ratio = par_elem.width / (mobile ? 320 : 640); + sub_elem.width = par_elem.width / ratio; + sub_elem.height = par_elem.height / ratio; + } + } + } else if (par_elem.__typename === 'Image') { + if (par_elem.credit) { + sub_elem = document.createElement('p'); + sub_elem.appendChild(document.createTextNode(par_elem.credit)); + } + } else if (par_elem.__typename === 'ImageParagraph') { + if (par_elem.caption) { + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(par_elem.caption) + '
', 'text/html'); + sub_elem = content_new.querySelector('div'); + } + } else if (!['Article', 'Author', 'Channel', 'LandingPage', 'Query'].includes(par_elem.__typename)) { + console.log(par_elem); + } + if (sub_elem) { + elem.appendChild(sub_elem); + article.appendChild(elem); + } + } + } + } + } catch (err) { + console.log(err); + } + } + } + let ads = 'div.ad-wrapper, div[id^="apn-ad-slot-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('berliner-zeitung.de')) { + let ads = 'div[class^="traffective_"], div[class^="article_billboard-"], div[class*="_ad_"], div[class^="outbrain_"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('bild.de')) { + func_post = function () { + if (mobile) { + let lazy_images = document.querySelectorAll('figure img[loading="lazy"][style]'); + for (let elem of lazy_images) { + elem.style = 'width: 95%; margin: 10px;'; + elem.parentNode.removeAttribute('style'); + } + let header = document.querySelector('article > h2 > span:last-child'); + if (header) + header.style = 'margin: 10px;'; + let content = document.querySelector('article time ~ div'); + if (content) + content.style = 'margin: 10px;'; + } + let div_empty = document.querySelectorAll('div[style]'); + for (let elem of div_empty) + if (!elem.innerText.length) + removeDOMElement(elem); + let article = document.querySelector('main > article'); + if (article && article.innerText.length < 1000) + header_nofix('h2', '', 'BPC > no archive-fix'); + } + let url = window.location.href; + getArchive(url, 'div.offer-module', '', 'article'); +} + +else if (matchDomain('boersen-zeitung.de')) { + window.setTimeout(function () { + let paywall = document.querySelector('storefront-section#paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let url = window.location.href; + replaceDomElementExt(url, false, false, 'article'); + } + }, 1000); +} + +else if (matchDomain('cicero.de')) { + let url = window.location.href; + if (!window.location.search.match(/(\?|&)amp/)) { + let paywall = document.querySelector('.plenigo-paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + func_post = function () { + let related_images = document.querySelectorAll('amp-carousel a > amp-img[src]'); + for (let elem of related_images) { + let img = document.createElement('img'); + Object.assign(img, { + src: elem.getAttribute('src'), + height: elem.getAttribute('height'), + width: elem.getAttribute('width'), + alt: elem.getAttribute('alt') + }); + elem.parentNode.replaceChild(img, elem); + } + let img_captions = document.querySelectorAll('div.carousel-caption:empty'); + removeDOMElement(...img_captions); + } + let url_amp = url.split('?')[0] + '?amp'; + replaceDomElementExt(url_amp, false, false, '.field-name-field-cc-body'); + } + } else { + let teasered_content = document.querySelector('.teasered-content'); + if (teasered_content) + teasered_content.classList.remove('teasered-content'); + let teasered_content_fader = document.querySelector('.teasered-content-fader'); + let btn_read_more = document.querySelector('.btn--read-more'); + removeDOMElement(teasered_content_fader, btn_read_more); + let ads = 'amp-ad'; + hideDOMStyle(ads); + } + let urban_ad_sign = document.querySelectorAll('.urban-ad-sign'); + removeDOMElement(...urban_ad_sign); +} + +else if (matchDomain('faz.net')) { + if (matchDomain('zeitung.faz.net')) { // legacy + let paywall_z = document.querySelector('div.c-red-carpet'); + if (paywall_z) { + removeDOMElement(paywall_z); + let og_url = document.querySelector('head > meta[property="og:url"][content]'); + if (og_url) + window.location.href = og_url.content; + else + header_nofix('div.article__text'); + } + let sticky_advt = document.querySelector('div.sticky-advt'); + removeDOMElement(sticky_advt); + } else { + let ads = 'div.lay-PaySocial, div.iqadtile_wrapper, div.iqdcontainer'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('freitag.de')) { + let paywall = document.querySelector('aside.qa-paywall'); + if (paywall) { + removeDOMElement(paywall); + let related = document.querySelector('div.c-teaser-plus-related--paywall'); + if (related) + related.classList.remove('c-teaser-plus-related--paywall'); + let article = document.querySelector('div.bo-article-text'); + if (article) { + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = breakText_headers(json.articleBody); + let pars = json_text.split(/\n\n/g); + if (json_text) { + article.innerHTML = ''; + for (let par of pars) { + if (!par.startsWith('Placeholder ')) { + let par_new = document.createElement('p'); + par_new.innerText = par; + article.appendChild(par_new); + } + } + } + } + } else { + let hidden_article = document.querySelector('div.o-paywall'); + if (hidden_article) { + let par_first = true; + let pars = breakText_headers(hidden_article.innerText).split(/\n\n/g); + for (let par of pars) { + let par_new = document.createElement('p'); + let overlap = ''; + if (par_first) { + let intro = article.querySelectorAll('p'); + let intro_last = intro[intro.length - 1]; + par = par.trim(); + overlap = findOverlap(intro_last.innerText, par); + if (overlap) + intro_last.innerText = intro_last.innerText.replace(new RegExp(overlap + '$'), '') + par; + par_first = false; + } + if (!overlap && !par.startsWith('Placeholder ')) { + par_new.innerText = par; + article.appendChild(par_new); + } + } + } + } + } + } +} + +else if (matchDomain('handelsblatt.com')) { + let paywall = document.querySelector('app-paywall'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('article'); + if (article) { + let url = window.location.href; + article.after(googleSearchToolLink(url)); + header_nofix('article', '', 'BPC > refresh page'); + } + } + window.localStorage.removeItem('HB.METERING'); + let related_topics = document.querySelector('app-storyline-related-topics'); + let overlay = document.querySelector('div[id^="sp_message_container_"]'); + removeDOMElement(overlay, related_topics); + let noscroll = document.querySelector('html[class]'); + if (noscroll) + noscroll.removeAttribute('class'); + let charts = document.querySelectorAll('iframe[name^="iframe-"][loading][src*="grafik.handelsblatt.com"]'); + for (let elem of charts) { + elem.style = 'height: 1000px;'; + elem.removeAttribute('loading'); + elem.scrolling = 'yes'; + } +} + +else if (matchDomain('heise.de')) { + func_post = function () { + header_nofix('article', paywall_sel, 'BPC > no archive-fix'); + } + let paywall_sel = 'a-gift:not([has-access])'; + let url = window.location.href; + getArchive(url, paywall_sel, '', 'article'); + let ads = 'div.ad-ldb-container, div.inread-cls-reduc'; + hideDOMStyle(ads); +} + +else if (matchDomain('jacobin.de')) { + let paywall = pageContains('h3.m-auto', 'Dieser Artikel ist nur mit Abo zugänglich.'); + if (paywall.length) { + let slash = document.querySelector('div.slash'); + removeDOMElement(paywall[0].parentNode, slash); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.sections && json.props.pageProps.sections[1].content) { + let url_next = json.query.slug; + if (url_next && !window.location.pathname.includes(url_next)) + refreshCurrentTab(); + let pars = json.props.pageProps.sections[1].content; + let first_par = document.querySelector('body > div#__next p.bodyText'); + if (first_par) { + let par_class = first_par.getAttribute('class'); + let article = first_par.parentNode; + if (article) { + let add_par = false; + for (let par of pars) { + if (!add_par) { + if (par.type === 'paywall') + add_par = true; + } else { + if (par.text) { + let elem_type = 'p'; + let elem_class = par_class; + let elem_style; + if (['paragraph', 'quote'].includes(par.type)) { + if (par.type === 'quote') + elem_style = 'font-size: 36px; font-weight: bold;'; + } else if (par.type === 'header') { + elem_type = 'h2'; + elem_class = 'content-element font-headline h2 my-1em'; + } + let content = par.text.replace(/ /g, ''); + let parser = new DOMParser(); + let content_new = parser.parseFromString('<' + elem_type + ' class="' + elem_class + (elem_style ? '" style="' + elem_style : '') + '">' + DOMPurify.sanitize(content) + '', 'text/html'); + article.appendChild(content_new.querySelector(elem_type)); + } else + console.log(par); + } + } + } + } + } + } catch (err) { + console.log(err); + } + } + } +} + +else if (matchDomain('krautreporter.de')) { + let paywall = document.querySelector('.js-article-paywall'); + if (paywall) { + removeDOMElement(paywall); + window.setTimeout(function () { + let paywall_divider = document.querySelector('.js-paywall-divider'); + let steady_checkout = document.querySelector('#steady-checkout'); + removeDOMElement(paywall_divider, steady_checkout); + let blurred = document.querySelectorAll('.blurred'); + for (let elem of blurred) + elem.classList.remove('blurred', 'json-ld-paywall-marker', 'hidden@print'); + }, 500); + } +} + +else if (matchDomain(['ksta.de', 'rundschau-online.de'])) { + function unhide_article(node) { + removeDOMElement(node); + let article = document.querySelector('div[data-article-content][style]'); + if (article) + article.removeAttribute('style'); + } + waitDOMElement('div[data-type="paywall"]', 'DIV', unhide_article, true); + csDoneOnce = true; + let banners = 'div.dm-slot, div.dm-zephr-banner'; + hideDOMStyle(banners); +} + +else if (matchDomain('kurier.at')) { + let paywall = document.querySelector('div#cfs-paywall-container'); + if (paywall) { + removeDOMElement(paywall); + let div_hidden = document.querySelector('div.paywall'); + if (div_hidden) { + div_hidden.classList.remove('paywall'); + div_hidden.removeAttribute('style'); + } + } + let ads = 'div[data-ad], div[data-outbrain]'; + hideDOMStyle(ads); +} + +else if (matchDomain('mopo.de')) { + getJsonUrl('div#paywall', '', 'div.paywall-fade'); +} + +else if (matchDomain('motorradonline.de')) { + if (window.location.pathname.endsWith('/amp/')) + ampToHtml(); +} + +else if (matchDomain(['noz.de', 'shz.de'])) { + let url = window.location.href; + getArchive(url, 'div.paywall', '', 'article'); + let ads = 'div.ad_label'; + hideDOMStyle(ads); +} + +else if (matchDomain('nw.de')) { + let paywall = document.querySelector('div#paywall'); + if (paywall) { + paywall.removeAttribute('id'); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = parseHtmlEntities(json.articleBody.replace(/\n/g, '\n\n').replace(/\.responsive[-@%{}()\.:;\w\s]+}\s?}/g, '')); + let article = paywall.querySelector('div[class*="paywall-overlay"]'); + if (json_text && article) + article.innerText = json_text; + } + } + } +} + +else if (matchDomain('nwzonline.de')) { + let ads = 'div.adslot'; + hideDOMStyle(ads); +} + +else if (matchDomain(['nzz.ch', 'themarket.ch'])) { + let fade = document.querySelectorAll('.nzzinteraction'); + for (let elem of fade) + elem.classList.remove('nzzinteraction'); + let ads = 'div.resor'; + hideDOMStyle(ads); +} + +else if (matchDomain('philomag.de')) { + let paywall = document.querySelector('div[id^="block-paywall"]'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articlebody.replace(/%paywall%/g, '').replace(/(\\r)?\\n/g, '

'); + let content = document.querySelector('div.content-center > div.description'); + if (json_text && content) { + content.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + content.appendChild(article_new); + } + } + } + } +} + +else if (matchDomain('profil.at')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + paywall.removeAttribute('class'); + paywall.removeAttribute('style'); + let fade = 'div#cfs-paywall-container'; + hideDOMStyle(fade); + } + let overlay = 'div.consentOverlay'; + hideDOMStyle(overlay, 2); +} + +else if (matchDomain('rheinpfalz.de')) { + let ads = 'div.nfy-banner'; + hideDOMStyle(ads); +} + +else if (matchDomain('schweizermonat.ch')) { + getJsonUrl('div.entry-paywall-login', '', 'div.entry-main > div.entry__post-content'); +} + +else if (matchDomain('spektrum.de')) { + let paywall = document.querySelector('article.pw-premium'); + if (paywall) + paywall.classList.remove('pw-premium'); +} + +else if (matchDomain(['spiegel.de', 'manager-magazin.de'])) { + let url = window.location.href; + func_post = function () { + let failed_iframes = document.querySelectorAll('div > div[x-show="!iframeIsLoaded"]'); + for (let elem of failed_iframes) + hideDOMElement(elem.parentNode); + let body_dark = document.querySelector('body[class*="dark:"]'); + if (body_dark) + removeClassesByPrefix(body_dark, 'dark:'); + let charts = document.querySelectorAll('section div[x-data*="{isLoaded:"]'); + for (let elem of charts) + elem.style.height = elem.offsetHeight + 'px'; + if (mobile) { + let lazy_images = document.querySelectorAll('picture img[loading="lazy"][style]'); + for (let elem of lazy_images) + elem.style = 'width: 95%;'; + } + header_nofix('article', 'svg[id*="-plus-paywall-"]', 'BPC > no archive-fix'); + } + getArchive(url, 'div[data-area="paywall"]', '', 'article'); +} + +else if (matchDomain('springermedizin.de')) { + let paywall = document.querySelector('div#pay-wall'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let article = document.querySelector('div > p.intro--paragraph'); + if (json_text && article) { + let article_new = document.createElement('p'); + article_new.innerText = json_text; + article.parentNode.replaceChild(article_new, article); + } + } + } + } +} + +else if (matchDomain('sueddeutsche.de')) { + let url = window.location.href; + if (matchDomain('sz-magazin.sueddeutsche.de')) { + func_post = function () { + header_nofix('main', 'div#sz-paywall', 'BPC > no archive-fix'); + } + getArchive(url, 'div.articlemain__inner--reduced', {rm_class: 'articlemain__inner--reduced'}, 'main'); + } else if (window.location.pathname.startsWith('/projekte/artikel/')) { + func_post = function () { + let lazy_images = document.querySelectorAll('img[loading="lazy"][style*="min-width:"]'); + for (let elem of lazy_images) + elem.style = 'width: 80%; margin: auto;'; + let sticky = document.querySelectorAll('div > div > div[old-position="sticky"]'); + for (let elem of sticky) { + let div_hidden = elem.parentNode.parentNode.querySelector('div[style^="display:none;"]'); + if (div_hidden) + div_hidden.removeAttribute('style'); + removeDOMElement(elem.parentNode); + } + if (intro) { + let intro_old = document.querySelector(intro_sel); + if (intro_old && intro_old.parentNode) + intro_old.parentNode.replaceChild(intro, intro_old); + } + header_nofix('main', 'div#sz-paywall', 'BPC > no archive-fix'); + } + let intro_sel = 'section#module-0'; + let intro = document.querySelector(intro_sel); + getArchive(url, 'div.offer-page', '', 'main'); + } else { + let paywall = document.querySelector('head > meta[content="locked"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article_sel = 'div[itemprop="articleBody"]'; + let article = document.querySelector(article_sel); + if (article) { + let json_script = document.querySelector('script[data-hydration-props-component-name="ArticleBodyDDRum"]'); + if (json_script) { + try { + let json = JSON.parse(decodeURIComponent(json_script.text)); + if (json) { + let pars = json.uiArticleContent; + if (pars.length) { + article.innerHTML = ''; + addStyle(article_sel + ' p {margin-bottom: 32px;}'); + } + let parser = new DOMParser(); + for (let par of pars) { + let elem = document.createElement('p'); + if (['paragraph', 'datawrapper', 'youtube'].includes(par.component)) { + if (par.content && par.content.html) { + let elem_type = par.content.html.startsWith('
') ? 'div' : 'p'; + let content_new = parser.parseFromString('<' + elem_type + '>' + DOMPurify.sanitize(parseHtmlEntities(par.content.html), dompurify_options) + '', 'text/html'); + let iframe = content_new.querySelector('iframe'); + if (iframe) + iframe.style = 'width: 100%; height: 400px; margin-bottom: 32px;'; + elem = content_new.querySelector(elem_type); + } + } else if (par.component === 'subheading') { + if (par.content && par.content.text) { + elem.innerText = par.content.text; + elem.style = 'font-weight: bold;'; + } + } else if (par.component === 'image') { + if (par.content && par.content.image) { + let caption = par.content.caption ? par.content.caption.html + ' (Foto: ' + par.content.imageSource + ')' : ''; + let sub_elem = makeFigure(par.content.image.url, caption); + elem.appendChild(sub_elem); + } + } else if (!(['articleHeader', 'articleTeaserM', 'newsletterEmbed'].includes(par.component) || par.component.startsWith('iqadtile'))) + console.log(par); + if (elem.hasChildNodes()) + article.appendChild(elem); + } + } + } catch (err) { + console.log(err); + } + } + } + } + } + let ads = 'er-ad-slot, div.iqdcontainer'; + hideDOMStyle(ads); +} + +else if (matchDomain('suedkurier.de')) { + let url = window.location.href; + getArchive(url, 'aside.article-paywall', '', 'main > article'); +} + +else if (matchDomain('t3n.de')) { + let paywall = document.querySelector('div.c-paywall__wrapper'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + if (json_text.includes('[embed]')) + json_text = json_text.replace(/\[embed\]([^\[]+)\[\/embed\]/g, '$1\n'); + json_text = json_text.replace(/\[[^\]]+\]/g, ''); + let article = document.querySelector('div.paywall-blur > p'); + if (json_text && article) { + article.innerText = parseHtmlEntities(json_text); + article.parentNode.removeAttribute('class'); + } + } + } + } +} + +else if (matchDomain('tagesspiegel.de')) { + let paywall_sel = 'div#paywall'; + let url = window.location.href; + if (matchDomain('www.tagesspiegel.de')) { + func_post = function () { + let opinionary = document.querySelector('div > div#opinary-automation-placeholder'); + if (opinionary) + hideDOMElement(opinionary.parentNode); + if (mobile) { + let lazy_images = document.querySelectorAll('figure img[loading="lazy"][style]'); + for (let elem of lazy_images) + elem.style = 'width: 95%;'; + } + } + getArchive(url, paywall_sel, '', 'div#story-elements'); + } else if (matchDomain('interaktiv.tagesspiegel.de')) { + let paywall = document.querySelector(paywall_sel); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div.tslr-article > p'); + if (article) + article.firstChild.before(archiveLink(url)); + } + } + let ads = 'div.iqdcontainer'; + hideDOMStyle(ads); +} + +else if (matchDomain('tt.com')) { + window.setTimeout(function () { + let paywall = document.querySelector('div#piano-logwall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div[data-io-article-url]'); + if (article) { + let json_script = document.querySelector('script#tt-com-www-state'); + if (json_script) { + try { + let json_articles = JSON.parse(json_script.text).TT_COM_WWW_GLOBAL_STATE.articles; + let json_article_id = json_articles.ids[0]; + if (!json_article_id || (json_article_id && !window.location.pathname.includes(json_article_id))) + refreshCurrentTab(); + let parser = new DOMParser(); + let pars = json_articles.entities[json_article_id].articleData.article.elements; + for (let par of pars) { + let elem; + if (['body', 'subheadline1'].includes(par.type)) { + if (par.content) { + let doc = parser.parseFromString('

' + DOMPurify.sanitize(par.content, dompurify_options) + '

', 'text/html'); + elem = doc.querySelector('p'); + if (par.type === 'subheadline1') + elem.style = 'font-weight: bold;'; + } + } else if (par.type = 'x-im/content-part') { + if (par.elements) { + elem = document.createElement('p'); + for (let item of par.elements) { + if (item.content) { + let doc = parser.parseFromString('

' + DOMPurify.sanitize(item.content, dompurify_options) + '

', 'text/html'); + sub_elem = doc.querySelector('p'); + elem.appendChild(sub_elem); + } + } + } + } else if (par.type.match(/^x-im\//)) { + if (par.url) { + if (par.url.startsWith('https://twitter.com/')) { + elem = document.createElement('p'); + let sub_elem = document.createElement('a'); + sub_elem.href = elem.innerText = par.url; + sub_elem.target = '_blank'; + elem.appendChild(sub_elem); + } else { + elem = document.createElement('iframe'); + elem.src = par.url; + elem.style = 'height: ' + article.offsetWidth + 'px; width: ' + article.offsetWidth + 'px;'; + } + } + } + if (elem) + article.appendChild(elem); + } + } catch (err) { + console.log(err); + } + } + } + } + }, 1000); + let ads = 'div[class*="ads-container"], div.adblock-warning'; + hideDOMStyle(ads); +} + +else if (matchDomain('vn.at')) { + if (window.location.href.match(/\.vn\.at\/.+\/\d{4}\//)) { + let paywall = document.querySelector('div.paywalled-content'); + if (paywall) { + csDoneOnce = true; + let par = paywall.querySelector('p'); + if (!par) { + refreshCurrentTab_bg(); + } else { + let lazy_images = document.querySelectorAll('img[src^="data:image/"][lazy-src]'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('lazy-src'); + } + } + } else + refreshCurrentTab_bg(); + } +} + +else if (matchDomain('vol.at')) { + if (!window.location.pathname.match(/\/amp\/?$/)) { + window.setTimeout(function () { + let paywall = document.querySelector('div.vodl-region-article__premium-content'); + if (paywall && dompurify_loaded) { + paywall.removeAttribute('class'); + if (!paywall.hasChildNodes()) { + let json_script = document.querySelector('script#externalPostDataNode'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + let json_text = json.content.data.post.content; + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + let hidden_images = article_new.querySelectorAll('img[src^="/"][srcset]'); + let json_domain = json.content.data.post.thumbnail.src.match(/https:\/\/(www\.)?\w+\.at/)[0]; + for (let elem of hidden_images) { + elem.src = elem.src.replace('https://www.vol.at', json_domain); + elem.removeAttribute('srcset'); + } + let hidden_comments = document.querySelector('div[class*="backdrop-blur"]'); + if (hidden_comments) + hidden_comments.removeAttribute('class'); + let article = document.querySelector('div.article-body'); + if (article) { + article.innerHTML = ''; + article.appendChild(article_new); + } + } catch (err) { + console.log(err); + } + } + } + } + }, 500); + let ads = 'div[id^="rm-adslot-"], div[id^="piano_rec"]'; + hideDOMStyle(ads); + } else + ampToHtml(); +} + +else if (matchDomain('welt.de')) { + func_post = function () { + if (mobile) { + let headers = document.querySelectorAll('main header, main header ~ div'); + for (let elem of headers) + elem.removeAttribute('style'); + let main_divs = document.querySelectorAll('main div[style] > div > div[id]'); + for (let elem of main_divs) { + if (elem.querySelector('img')) + elem.parentNode.parentNode.removeAttribute('style'); + } + let lazy_images = document.querySelectorAll('main img[loading="lazy"][style]'); + for (let elem of lazy_images) + elem.style = 'width: 95%;'; + } + header_nofix('main header', 'img[alt="WELTplus"][loading]', 'BPC > no archive-fix'); + let ads = pageContains('span', 'Anzeige'); + removeDOMElement(...ads); + } + let url = window.location.href; + getArchive(url, 'div.contains_walled_content, div.c-article-paywall', '', 'main header + div'); + let ads = 'div[data-component="Outbrain"], div[class*="c-ad"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('weser-kurier.de')) { + let ads = 'div.ad-wrapper, div.anyad'; + hideDOMStyle(ads); +} + +else if (matchDomain('zeit.de')) { + func_post = function () { + if (mobile) { + let lazy_images = document.querySelectorAll('figure img[loading="lazy"][style]'); + for (let elem of lazy_images) + elem.style = 'width: 95%;'; + let span_empty = document.querySelectorAll('span:empty'); + removeDOMElement(...span_empty); + } + let ads = document.querySelectorAll('div[style*=";min-height:"] > div[id^="iqadtile"]'); + for (let ad of ads) + hideDOMElement(ad.parentNode); + } + let url = window.location.href.split(/[#\?]/)[0]; + if (document.querySelector('head > link[rel="next"]')) + url += '/komplettansicht'; + getArchive(url, 'aside#paywall', '', 'article', '', 'article', 'article > div'); + let ads = 'div[id^="iqadtile"], .iqdcontainer'; + hideDOMStyle(ads); +} + +else if (matchDomain(ch_tamedia_domains) || document.querySelector('div#__next > div.page-section li > a[href^="https://jobs.tamedia.ch/"]')) { + let paywall = document.querySelector('div#piano-premium > div'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('article p'); + if (article) { + let url = window.location.href; + article.after(googleSearchToolLink(url)); + } + } + let ads = 'div[class^="TopAds_"]'; + hideDOMStyle(ads); +} + +else if (matchDomain(de_funke_medien_domains)) { + func_post = function () { + document.querySelectorAll('div[data-carousel-id-slider]').forEach(x => x.removeAttribute('class')); + } + let paywall = document.querySelector('div#paywall-container'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let spark_script = document.querySelector('script#__SPARK__'); + if (spark_script) { + let match = spark_script.text.match(/PUBLICATION:\s?'([\w-]+)',/); + if (match) { + let spark_domain = match[1]; + let url_src = 'https://app-webview.sparknews.funkemedien.de/' + spark_domain + window.location.pathname; + fetch_headers = {"Authorization": cs_param['authorization'] || "Basic YXBpOkNTeGxxRG1YM2xCTmRsS1l6allRcWZqTnFZMkhQVUVm"}; + replaceDomElementExt(url_src, true, false, 'div.article-body', 'BPC > no fix (source file)'); + } + } + } + let ads = 'aside.ad-slot-wrapper'; + hideDOMStyle(ads); +} + +else if (matchDomain(de_lv_domains)) { + let paywall = document.querySelector('div[id^="paymentprocess-"]'); + if (paywall) { + let intro = document.querySelector('div.m-paywall__textFadeOut'); + removeDOMElement(paywall, intro); + let div_hidden = document.querySelector('div.paywall-full-content[style]'); + if (div_hidden) { + div_hidden.removeAttribute('class'); + div_hidden.removeAttribute('style'); + } + } + let ads = 'div.adZone'; + hideDOMStyle(ads); +} + +else if (matchDomain(de_motor_presse_domains)) { + let ads = 'div#ads-container, div.va-sponsored, div.mps_markAd'; + hideDOMStyle(ads); +} + +else if (matchDomain(de_rp_medien_domains)) { + func_post = function () { + header_nofix('article', 'div#park-paywall', 'BPC > no archive-fix'); + let videos = 'glomex-player'; + hideDOMStyle(videos, 5); + } + let url = window.location.href; + getArchive(url, 'div.park-paywall-content', '', 'article'); + let ads = 'div.portal-slot'; + hideDOMStyle(ads); +} + +else if (matchDomain(de_madsack_domains) || document.querySelector('head > link[href*=".rndtech.de/"]')) { + // plus code in contentScript_once_var.js (timing) + if (!window.location.search.includes('outputType=valid_amp')) { + let ads = 'div[class^="Adstyled__AdWrapper"]'; + hideDOMStyle(ads); + } else { + ampToHtml(); + } +} + +else if (matchDomain(de_ippen_media_domains) || matchDomain(['schwaebische-post.de']) || document.querySelector('header a[href^="https://www.ippen.media"]')) { + let ads = 'div[class^="id-TBeepSlot-"], div[data-id-advertdfpconf]'; + hideDOMStyle(ads); +} + +else if (matchDomain('ruhrnachrichten.de') || document.querySelector('a.mgw-logo[href^="https://mgw.de"]')) { + let pathname = window.location.pathname; + let article_id; + if (pathname.includes('-p-')) + article_id = pathname.split('-p-')[1].split('/')[0]; + getJsonUrl('body.is_plus_article', {rm_class: 'is_plus_article'}, 'article', {art_append: 1, art_hold: 1, art_class: 'article__content'}, article_id); + if (!matchDomain('ruhrnachrichten.de')) { + window.setTimeout(function () { + let push = document.querySelector('div.cleverpush-bell'); + removeDOMElement(push); + }, 1000); + } +} + +else if (matchDomain(de_vrm_domains) || matchDomain(de_vrm_custom_domains)) { + let ads = 'div.adSlot, div.loadingBanner'; + hideDOMStyle(ads); +} + +else if (matchDomain(ch_media_domains) || document.querySelector('head > link[href*="/assets.static-chmedia.ch/"]')) { + let infobox_body = document.querySelector('div.infobox__body'); + if (infobox_body) + infobox_body.removeAttribute('class'); + let paywall = document.querySelector('div.dynamic-regwall'); + removeDOMElement(paywall); +} + +else + csDone = true; + +} else if (window.location.hostname.match(/\.(dk|fi|se)$/)) {//denmark/finland/sweden + +if (matchDomain('berlingske.dk')) { + let paywall = document.querySelector('div#paywall'); + removeDOMElement(paywall); + let ads = 'div.advert-unit'; + hideDOMStyle(ads); +} + +else if (matchDomain('dn.se')) { + let url = window.location.href; + getArchive(url, 'div.paywall-wrapper', '', 'article'); + let ads = 'div.bad'; + hideDOMStyle(ads); +} + +else if (matchDomain('etc.se')) { + let paywall = document.querySelector('section.prose-feature > section.teaser-section'); + if (paywall) { + paywall.classList.remove('teaser-section'); + paywall.parentNode.querySelectorAll('.hidden').forEach(e => e.classList.remove('hidden')); + } + let ads = 'div[class$="-ad"], article section.font-sans'; + hideDOMStyle(ads); + let video_iframes = document.querySelectorAll('div.embed-block > iframe[width][height]'); + for (let elem of video_iframes) { + if (elem.width > 1000) { + let ratio = elem.width / (mobile ? 320 : 640); + elem.width = elem.width / ratio; + elem.height = elem.height / ratio; + } + } +} + +else if (matchDomain('suomensotilas.fi')) { + let obscured = document.querySelector('div.epfl-pw-obscured'); + if (obscured) + obscured.classList.remove('epfl-pw-obscured'); +} + +else + csDone = true; + +} else if (window.location.hostname.match(/\.(es|pt|cat)$/) || matchDomain(['diariocordoba.com', 'diariovasco.com', 'elconfidencial.com', 'elcorreo.com', 'elespanol.com', 'elpais.com', 'elperiodico.com', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info', 'expansion.com', 'larioja.com', 'lavanguardia.com', 'levante-emv.com', 'marca.com', 'mundodeportivo.com', 'politicaexterior.com'])) {//spain/portugal + +if (matchDomain(['ara.cat', 'arabalears.cat'])) { + if (!window.location.pathname.endsWith('.amp.html')) { + amp_redirect('div.paywall'); + let ads = 'div.advertising'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('diariodenavarra.es')) { + let paywall = document.querySelector('div#paywall_message'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let article = document.querySelector('div.free-html'); + if (json_text && article) + article.innerText = parseHtmlEntities(json_text); + } + } + } +} + +else if (matchDomain('dn.pt')) { + if (window.location.pathname.endsWith('/amp/')) { + let amp_list = 'amp-list'; + hideDOMStyle(amp_list); + } else { + let ads = document.querySelectorAll('div.sk-pub'); + removeDOMElement(...ads); + } +} + +else if (matchDomain('elconfidencial.com')) { + let premium = document.querySelector('div.newsType__content--closed'); + if (premium) + premium.classList.remove('newsType__content--closed'); + let ads = 'div[id^="mega_"], div[id^="roba_"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('eldiario.es')) { + if (window.location.pathname.endsWith('.amp.html')) { + amp_unhide_access_hide('^="access"', '="NOT access"'); + } else { + amp_redirect('aside.paywall'); + let ads = 'div.edi-advertising, div.header-ad, aside.news-sponsored-content, div.report__wrapper'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('elespanol.com')) { + if (window.location.pathname.endsWith('.amp.html')) { + amp_unhide_subscr_section(); + } else { + let paywall = document.querySelector('div.full-suscriptor-container'); + if (paywall) { + removeDOMElement(paywall); + let content_hidden = document.querySelector('div.content-not-granted-paywall'); + if (content_hidden) + content_hidden.classList.remove('content-not-granted-paywall'); + } + let ads = '[id*="superior"], [class*="adv"]'; + hideDOMStyle(ads); + } +} + +else if (matchDomain(es_unidad_domains)) { + if (!window.location.hostname.match(/^amp(-[a-z]{2})?\./)) { + let url = window.location.href; + if (!window.location.pathname.startsWith('/mejores-colegios')) { + amp_redirect('div.ue-c-article__premium', '', url.replace('/www.', '/amp.')); + } else if (matchDomain('elmundo.es')) { + header_nofix('main p', 'div.ue-c-article__premium'); + header_nofix('table', 'div.ue-c-paywall'); + } + } else { + amp_unhide_access_hide('="authorized=true"', '="authorized!=true"'); + amp_unhide_subscr_section('.advertising, div.ue-c-ad'); + } +} + +else if (matchDomain('elpais.com')) { + if (window.location.pathname.endsWith('.amp.html') || window.location.search.match(/(\?|&)outputType=amp/)) { + amp_unhide_access_hide('="vip"], [amp-access="success"', '="NOT vip"], [amp-access="NOT success"'); + } else { + let paywall = document.querySelector('div#ctn_freemium_article, div#ctn_premium_article'); + removeDOMElement(paywall); + } +} + +else if (matchDomain(es_grupo_vocento_domains)) { + let paywall_sel = 'div.voc-paywall, div.container-wall-exclusive__content-login'; + let paywall = document.querySelector(paywall_sel); + if (!window.location.pathname.endsWith('_amp.html')) { + if (!matchDomain(['eldiariomontanes.es'])) { + amp_redirect(paywall_sel, '', window.location.pathname.replace('.html', '_amp.html')); + } else { + if (paywall) { + let url = window.location.href; + paywall.before(archiveLink(url)); + removeDOMElement(paywall); + } + } + let banners = 'div.voc-advertising, div.voc-ob-wrapper, div.voc-discounts, div.ev-em-modal, span.mega-superior, div.v-adv'; + hideDOMStyle(banners); + } else { + amp_unhide_access_hide('="result=\'ALLOW_ACCESS\'"', '="result!=\'ALLOW_ACCESS\'"', 'div.v-adv'); + let body_top = document.querySelector('body#top'); + if (body_top) + body_top.removeAttribute('id'); + } +} + +else if (matchDomain(es_epiberica_domains) || matchDomain(es_epiberica_custom_domains)) { + let paywall = document.querySelector('div.ft-helper-closenews'); + if (paywall) { + paywall.removeAttribute('class'); + let hidden_pars = paywall.querySelectorAll('.closeContentEnd'); + for (let elem of hidden_pars) + elem.classList.remove('closeContentEnd'); + } + if (window.location.pathname.endsWith('.amp.html') || ['amp.elperiodico.com', 'amp.epe.es'].includes(window.location.hostname)) { + let amp_images = document.querySelectorAll('figure > amp-img[src]'); + for (let amp_image of amp_images) { + let elem = document.createElement('img'); + elem.src = amp_image.getAttribute('src'); + elem.style = 'width: 75%; margin: 0px 50px;'; + amp_image.parentNode.replaceChild(elem, amp_image); + } + document.querySelectorAll('div#the-most').forEach(e => e.removeAttribute('style')); + let ads = 'amp-next-page, span.ad-signature, div.wrap'; + hideDOMStyle(ads); + } else { + let ads = 'div.commercial-up-full__wrapper, aside.ft-ad, div[class^="_mo_recs"]'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('expresso.pt')) { + if (!window.location.hostname.startsWith('amp.')) { + let article_sel = 'div.article-content'; + let paywall = document.querySelector(article_sel + ' > div.g-premium-blocker'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector(article_sel); + if (article) { + let url = window.location.href.split(/[#\?]/)[0]; + fetch(url) + .then(response => { + if (response.ok) { + response.text().then(html => { + if (html.match(/window\.__INITIAL_DATA__\s?=\s?/)) { + try { + article.innerHTML = ''; + let json = JSON.parse(html.split(/window\.__INITIAL_DATA__\s?=\s?/)[1].split(';window.')[0].replace(/":undefined([,}])/g, "\":\"undefined\"$1")).nodes; + let pars = []; + for (let elem in json) { + let item = json[elem]; + if (item.type === 'Layout') { + for (let elem of item.nodes) { + if (elem.type === 'MainBody') + pars = elem.nodes[0].data.content.contents; + } + break; + } + } + let parser = new DOMParser(); + for (let par of pars) { + let par_new; + if (par.html) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.html, dompurify_options) + '
', 'text/html'); + par_new = doc.querySelector('div'); + } else if (par.type === 'PICTURE') { + if (par.urlOriginal) { + par_new = makeFigure(par.urlOriginal, par.caption, {style: 'width:100%'}); + } + } else if (par.link && par.title) { + if (par.contents) { + par_new = document.createElement('div'); + for (let elem of par.contents) { + let elem_new; + if (elem.html) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(elem.html, dompurify_options) + '
', 'text/html'); + elem_new = doc.querySelector('div'); + } else if (elem.urlOriginal) { + elem_new = makeFigure(elem.urlOriginal, elem.caption, {style: 'width:100%'}); + } + if (elem_new) + par_new.appendChild(elem_new); + } + } else { + par_new = document.createElement('p'); + let art_link = document.createElement('a'); + art_link.innerText = par.title; + art_link.href = par.link; + par_new.appendChild(art_link); + } + } + if (par_new) + article.appendChild(par_new); + else + console.log(par); + } + } catch (err) { + console.log(err); + } + } + }); + } + }).catch(function (err) { + false; + }); + } + } + } else + ampToHtml(); +} + +else if (matchDomain(['lavanguardia.com', 'mundodeportivo.com'])) { + let ads = 'span.content-ad, span.hidden-ad, span.ad-unit, div.ad-div'; + hideDOMStyle(ads); +} + +else if (matchDomain('observador.pt')) { + let ads = 'div.obs-ad-placeholder'; + hideDOMStyle(ads); +} + +else if (matchDomain('politicaexterior.com')) { + let paywall = document.querySelector('div[class^="paywall-"]'); + if (paywall) { + let article = document.querySelector('div.entry-content-text'); + let json = document.querySelector('script[type="application/ld+json"]:not([class])'); + if (json) { + let json_text = JSON.parse(json.text).description.replace(/&nbsp;/g, ''); + let article_new = document.createElement('div'); + article_new.setAttribute('class', 'entry-content-text'); + article_new.innerText = '\r\n' + json_text; + article.parentNode.replaceChild(article_new, article); + } + removeDOMElement(paywall); + } +} + +else if (matchDomain('publico.es')) { + let ads = 'div.pb-ads'; + hideDOMStyle(ads); +} + +else if (matchDomain(['record.pt', 'sabado.pt'])) { + if (!window.location.pathname.includes('/amp/')) + amp_redirect('.bloqueio_exclusivos, .container_assinatura, .bloco_bloqueio', '', window.location.href.replace('/detalhe/', '/amp/')); + else + amp_unhide_access_hide('="subscriber"', '="NOT subscriber"', 'div.adbox, amp-consent, .detalheAds, .exclusivos_bar'); +} + +else + csDone = true; + +} else if ((window.location.hostname.endsWith('.fr') && !matchDomain(['lemagit.fr'])) || matchDomain(['connaissancedesarts.com', 'courrierinternational.com', 'jeuneafrique.com', 'journaldunet.com', 'la-croix.com', 'legrandcontinent.eu', 'lerevenu.com', 'lesinrocks.com', 'loeildelaphotographie.com', 'marianne.net', 'parismatch.com', 'philonomist.com', 'pourleco.com', 'reforme.net', 'science-et-vie.com', 'scienceshumaines.com'].concat(fr_groupe_nice_matin_domains))) {//france + +if (matchDomain('alternatives-economiques.fr')) { + window.setTimeout(function () { + let paywall = document.querySelector('#temp-paywall'); + removeDOMElement(paywall); + let data_ae_poool = document.querySelector('div[data-ae-poool]'); + if (data_ae_poool) + data_ae_poool.removeAttribute('style'); + }, 500); +} + +else if (matchDomain('atlantico.fr')) { + let ads = 'div#pv_atf, div#infeed'; + hideDOMStyle(ads); +} + +else if (matchDomain('autohebdo.fr')) { + if (window.location.pathname.endsWith('.html')) + getJsonUrl('div.box-info.yellow', '', 'div.editor', {art_append: 1}); +} + +else if (matchDomain('autoplus.fr')) { + let ads = 'div.placeholder-pub_dfp'; + hideDOMStyle(ads); +} + +else if (matchDomain('capital.fr')) { + let videos = document.querySelectorAll('div > div#prisma-player-leader[data-ads-core*="Dailymotion"]'); + for (let video of videos) { + try { + let json = JSON.parse(video.getAttribute('data-ads-core')); + if (json && json.playerVideoId) { + let iframe = document.createElement('iframe'); + iframe.src = 'https://www.dailymotion.com/embed/video/' + json.playerVideoId; + iframe.style = 'height: ' + video.offsetHeight + 'px; width: ' + video.offsetWidth + 'px;'; + video.parentNode.replaceChild(iframe, video); + } + } catch (err) { + console.log(err); + } + } + let ads = 'div.containerAds, div.ads-introText, div.outbrain-ads'; + hideDOMStyle(ads); +} + +else if (matchDomain(['challenges.fr', 'sciencesetavenir.fr'])) { + if (window.location.pathname.endsWith('.amp')) { + amp_unhide_access_hide('="paywall.access OR cha.access"', '="NOT (paywall.access OR cha.access)"'); + } else { + let content = document.querySelectorAll('.user-paying-content'); + for (let elem of content) { + elem.classList.remove('user-paying-content'); + elem.removeAttribute('hidden'); + } + let paywall = document.querySelector('.temp-paywall'); + removeDOMElement(paywall); + let amorce = 'div.amorce.manual'; + let ads = 'div[class^="pub-container"], div[id^="moneytag-"]'; + hideDOMStyle(amorce + ', ' + ads); + } +} + +else if (matchDomain('charliehebdo.fr')) { + window.setTimeout(function () { + let paywalled_content = document.querySelector('div.ch-paywalled-content'); + if (paywalled_content) + paywalled_content.removeAttribute('style'); + }, 500); +} + +else if (matchDomain('connaissancedesarts.com')) { + let ads = 'div[class*="banniere"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('courrierinternational.com')) { + let url = window.location.href; + getArchive(url, 'div#bloc_paywall', '', 'article'); +} + +else if (matchDomain('elle.fr')) { + if (window.location.hostname.startsWith('amp.')) { + amp_unhide_access_hide('="poool.access OR cmi_premium.access"'); + } else { + let hidden_images = document.querySelectorAll('img[src^="data:image/"][data-src]'); + for (let hidden_image of hidden_images) + hidden_image.setAttribute('src', hidden_image.getAttribute('data-src')); + let subscription_bar = document.querySelector('.tc-subscription-bar'); + removeDOMElement(subscription_bar); + } + let ads = 'div[class*="--placeholder"]'; + hideDOMStyle(ads); +} + +else if (matchDomain(fr_groupe_la_depeche_domains)) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div.article-full__body-content'); + if (article) { + article.removeAttribute('style'); + article.removeAttribute('data-state'); + } + } + let ads = 'div.ad'; + hideDOMStyle(ads); +} + +else if (matchDomain(fr_groupe_nice_matin_domains)) { + if (window.location.pathname.startsWith('/amp/')) { + amp_iframes_replace(); + let qiota_script = document.querySelector('amp-script.i-amphtml-layout-size-defined[src$="/qiota-amp.js"]'); + if (qiota_script) { + qiota_script.classList.remove('i-amphtml-layout-size-defined'); + let amp_images = document.querySelectorAll('amp-img > img.i-amphtml-fill-content'); + for (let elem of amp_images) + elem.removeAttribute('class'); + let sizers = document.querySelectorAll('i-amphtml-sizer'); + removeDOMElement(...sizers); + } + } + let ads = 'div[class^="ad-slot-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('jeuneafrique.com')) { + let paywall = document.querySelector('div#poool-widget'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div.article__content > div[data-mrf-recirculation]'); + let article_id = window.location.pathname.split('/')[1]; + if (article && article_id) { + let limit_low = 50; + let limit_high = 600; + function show_data(article, body) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(body, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + article.innerHTML = ''; + article.parentNode.replaceChild(article_new, article); + } + function fetch_data(limit, offset = 0) { + let url_src = 'https://www.jeuneafrique.com/api/mobile/v6.0/featured/?limit=' + limit + '&offset=' + offset; + fetch(url_src, {headers: {"x-exp": cs_param["x-exp"] || "1741079242710", "x-sig": cs_param["x-sig"] || "b431724e94023a6969c5427133e1614db2cbe90e"}}) + .then(response => { + if (response.ok) { + response.json().then(json => { + try { + let src_articles = json.articles; + if (src_articles) { + let src_article = src_articles.filter(x => x.id == article_id)[0]; + let ls_update = true; + if (src_article) + show_data(article, src_article.content_full); + else if (limit === limit_low) { + ls_update = false; + fetch_data(limit_high); + } else + header_nofix(article, '', 'BPC > no fix (source file)'); + if (ls_update) { + let now_date = (new Date()).toISOString().split('T')[0]; + if (!ls_date || limit > limit_low || now_date > ls_date) + ls_json_articles = {}; + for (let art of src_articles) + ls_json_articles[art.id] = art.content_full; + localStorage.setItem('###_json_date', now_date); + localStorage.setItem('###_json', JSON.stringify(ls_json_articles)); + } + } + } catch (err) { + console.log(err); + } + }) + } + }).catch(x => header_nofix(article, '', 'BPC > no fix (source file)')) + } + let json_date; + let json_script = document.querySelector('script[type="application/ld+json"]'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json['@graph']) { + let date_arr = json['@graph'].filter(x => x.datePublished); + if (date_arr.length) + json_date = date_arr[0].datePublished; + } + } catch (err) { + console.log(err); + } + } + let art_date = ''; + if (json_date) + art_date = json_date.split('T')[0]; + let ls_date = localStorage.getItem('###_json_date') || ''; + let ls_json_articles = {}; + if (ls_date) { + let ls_articles = localStorage.getItem('###_json'); + ls_json_articles = JSON.parse(ls_articles); + if (ls_date < art_date) + fetch_data(limit_low); + else { + let art_data = ls_json_articles[article_id]; + if (art_data) + show_data(article, art_data); + else if (Object.keys(ls_json_articles).length <= limit_low) + fetch_data(limit_high); + else + header_nofix(article, '', 'BPC > no fix (source file)') + } + } else { + fetch_data(limit_low); + } + } + } + let ads = 'div.banner-ad, div.box-ad-brand'; + hideDOMStyle(ads); +} + +else if (matchDomain('journaldunet.com')) { + let reg_wall = document.querySelector('div.reg_wall'); + removeDOMElement(reg_wall); + let entry_reg_wall = document.querySelector('div.entry_reg_wall[style]'); + if (entry_reg_wall) + entry_reg_wall.removeAttribute('style'); +} + +else if (matchDomain('la-croix.com')) { + if (!window.location.hostname.startsWith('amp')) { + let ads = 'div[class^="ads-wrapper-"]'; + hideDOMStyle(ads); + } else { + let paywall_block = '#paywall_block'; + hideDOMStyle(paywall_block); + } +} + +else if (matchDomain('lanouvellerepublique.fr')) { + let ads = 'aside.dfp'; + hideDOMStyle(ads); +} + +else if (matchDomain('lecourrierdesstrateges.fr')) { + window.setTimeout(function () { + let paywall = document.querySelector('div.jpw-truncate-btn'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let content = document.querySelector('div.content-inner'); + if (json_text && content) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + content.parentNode.replaceChild(content_new, content); + let hidden_images = document.querySelectorAll('img[src][srcset]'); + for (let elem of hidden_images) + elem.removeAttribute('srcset'); + let entry_content = document.querySelector('div.entry-content[style]'); + if (entry_content) + entry_content.removeAttribute('style'); + } + } + } + } + }, 500); +} + +else if (matchDomain('lefigaro.fr')) { + let paywall = document.querySelector('div#fig-premium-paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div[data-component="fig-content-body"]'); + if (article) { + let resource_key = cs_param.resource_key || '34e68a3419a876e36729503e2107dfa556e1a105892e27010130a30018ccbe60'; + let url = window.location.href.split([/\?#/])[0]; + let url_src = 'https://api-graphql.lefigaro.fr/graphql?id=FigaroCoreMobile_resourceByUrl_persistent_' + resource_key + '&variables={%22url%22:%20%22' + url + '%22}'; + fetch(url_src) + .then(response => { + if (response.ok) { + response.json().then(json => { + try { + let pars = json.data.resource.body.structured; + if (pars.length) + article.innerHTML = ''; + let parser = new DOMParser(); + for (let par of pars) { + let elem; + let sub_elem; + let par_type = par.__typename; + if (['Heading', 'Paragraph', 'ParagraphWithPaywall'].includes(par_type)) { + if (par.paywall) + par = par.paywall; + if (par.text.replace(/ /g, '')) { + let doc = parser.parseFromString('

' + DOMPurify.sanitize(par.text, dompurify_options) + '

', 'text/html'); + elem = doc.querySelector('p'); + if (par_type === 'Heading') + elem.style = 'font-weight: bold; font-size: 1.85rem;'; + } + } else if (['Photo', 'VideoFigaro'].includes(par_type)) { + if (par.thumbnail) + par = par.thumbnail; + if (par.image) { + elem = document.createElement('p'); + elem.className = 'fig-paragraph'; + let img = makeFigure(par.image.url, par.caption.replace(/<[^<]*>/g, '') + ' ' + par.credit, '', {class: 'fig-media__legend'}); + elem.append(img, document.createElement('br')); + } + } else if (par_type === 'Frame') { + if (par.text) { + elem = document.createElement('p'); + elem.className = 'fig-paragraph'; + let title = document.createElement('p'); + title.innerText = par.title; + title.className = 'fig-paragraph'; + title.style = 'font-weight: bold;'; + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.text, dompurify_options) + '
', 'text/html'); + let text = doc.querySelector('div'); + elem.append(title, text); + } + } else if (par_type.endsWith('Link')) { + if (par.link) + par = par.link; + if (par.title && par.url) { + elem = document.createElement('p'); + if (par.prefix) { + let prefix = document.createElement('span'); + prefix.innerText = par.prefix + ' '; + elem.append(prefix); + } + let link_elem = document.createElement('a'); + link_elem.href = par.url; + link_elem.innerText = par.title.replace(/<[^<]*>/g, ''); + link_elem.target = '_blank'; + elem.append(link_elem); + } + } else if (['FreeHtml', 'Tweet'].includes(par_type)) { + if (par.sourceCode) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.sourceCode, dompurify_options) + '
', 'text/html'); + elem = doc.querySelector('div'); + let tweet_link = elem.querySelector('a[href^="https://twitter.com/"], a[href^="https://x.com/"]'); + if (tweet_link) { + tweet_link.innerText = tweet_link.href; + tweet_link.target = '_blank'; + } + } + } else if (par_type === 'Youtube') { + if (par.id) { + elem = document.createElement('iframe'); + elem.src = 'https://www.youtube.com/embed/' + par.id; + elem.style = 'width: 100%; height: 400px;'; + } + } else if (par_type === 'List') { + if (par.list) { + elem = document.createElement('ul'); + elem.style = 'list-style: inside;'; + for (let item of par.list) { + let li = document.createElement('li'); + li.style = 'margin: 10px 0px;'; + let doc = parser.parseFromString('' + DOMPurify.sanitize(item) + '', 'text/html'); + let span = doc.querySelector('span'); + li.appendChild(span); + elem.appendChild(li); + } + } + } else if (par_type === 'HorizontalRule') { + elem = document.createElement('hr'); + } else if (par_type === 'Quote') { + elem = document.createElement('blockquote'); + elem.style = 'margin: 30px;'; + let qtext = document.createElement('p'); + qtext.innerText = parseHtmlEntities(par.text); + qtext.style = 'font-weight: bold; font-size: 28px; margin: 15px 0px;'; + let qcredit = document.createElement('p'); + qcredit.innerText = par.credit ? parseHtmlEntities(par.credit) : ''; + elem.append(qtext, qcredit); + } else if (!['Brightcove'].includes(par_type)) { + console.log(par); + } + if (elem) + article.appendChild(elem); + } + } catch (err) { + console.log(err); + } + }) + } + }).catch(x => header_nofix(article, '', 'BPC > no fix (source file)')) + } + } +} + +else if (matchDomain('legrandcontinent.eu')) { + let paywall = document.querySelector('body.paywall, body.pw, body.softwall'); + if (paywall) + paywall.classList.remove('paywall', 'pw', 'softwall'); + let banners = document.querySelectorAll('div#fix-pw, div.disposableBanner'); + removeDOMElement(...banners); +} + +else if (matchDomain(['lejdd.fr', 'parismatch.com', 'public.fr'])) { + let banners = '.forbidden'; + let ads = 'div[class^="lmn-"], div.premium-hidden, div.p-aside--placeholder, section.outbrain-container'; + hideDOMStyle(banners + ', ' + ads); + let bottom_hide = document.querySelector('.cnt[data-poool-mode="hide"]'); + if (bottom_hide) { + bottom_hide.removeAttribute('data-poool-mode'); + bottom_hide.removeAttribute('style'); + } +} + +else if (matchDomain('lemonde.fr')) { + let url = window.location.href.split(/[\?#]/)[0]; + let paywall = document.querySelector('section.lmd-paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('.article__content'); + if (article) { + let match = url.match(/article.*_(\d+)_/); + if (match) { + let id = match[1]; + let url_base = 'https://apps.lemonde.fr/aec/v1/' + (window.location.pathname.startsWith('/en/') ? 'en/' : '') + 'premium-android-phone/article/'; + let url_src = url_base + id; + let json_key = 'template_vars.content'; + getExtFetch(url_src, json_key, {}, main_lemonde); + function main_lemonde(url, data) { + try { + if (data) { + let parser = new DOMParser(); + let doc = parser.parseFromString(DOMPurify.sanitize(data, dompurify_options), 'text/html'); + let article_new = doc.querySelector('.article_content'); + if (article_new) { + article_new.className = 'article__content'; + article_new.querySelectorAll('p').forEach(e => e.className = 'article__paragraph'); + article_new.querySelectorAll('h2').forEach(e => e.className = 'article__sub-title'); + article_new.querySelectorAll('h3.question').forEach(e => e.className = 'article__question'); + article_new.querySelectorAll('figure').forEach(e => e.style = 'margin: 0px 10px;'); + article_new.querySelectorAll('div.see-also-container, div.reference').forEach(e => e.style = 'margin: 20px 0px;'); + let image_divs = article_new.querySelectorAll('div.image'); + for (let elem of image_divs) { + elem.style = 'margin: 20px 0px;'; + let img = elem.querySelector('a > img[data-src]'); + if (img) { + if (img.src.startsWith('data:image/')) + img.src = img.getAttribute('data-src'); + img.parentNode.before(img); + } + } + let videos = article_new.querySelectorAll('div.video-container'); + for (let video of videos) { + let video_id_dom = video.querySelector('div[data-provider="dailymotion"][data-id]'); + if (video_id_dom) { + let iframe = document.createElement('iframe'); + iframe.src = 'https://www.dailymotion.com/embed/video/' + video_id_dom.getAttribute('data-id'); + iframe.style = 'height: 400px; width: 100%; margin: 20px 0px;'; + video.parentNode.replaceChild(iframe, video); + } + } + let cartes = article_new.querySelectorAll('div.cartes > div.carte > img[src_700][src_350]'); + for (let elem of cartes) { + elem.parentNode.parentNode.removeAttribute('class'); + elem.src = mobile ? elem.getAttribute('src_350') : elem.getAttribute('src_700'); + elem.style = 'width: 90%; margin: auto;'; + } + let inread = article_new.querySelectorAll('div.inread-container'); + removeDOMElement(...inread); + let links = article_new.querySelectorAll('div.link-container > a[href^="lmfr://"]'); + function link_lemonde(url, data, elem) { + if (data) + elem.href = data; + } + for (let elem of links) { + let url_link = elem.href; + let url_match = url_link.split(/[\?#]/)[0].match(/^lmfr:\/\/.*element\/article\/(\d+)/); + if (url_match) { + let id = url_match[1]; + let url_src = url_base + id; + let json_key = 'element.url'; + getExtFetch(url_src, json_key, {}, link_lemonde, data_ext_fetch_id++, [elem]); + } else if (url_link.match(/^lmfr:\/.*\/live\/\d+\?/) && url_link.includes('www.lemonde.fr')) { + url_link = decodeURIComponent('https://www.lemonde.fr' + url_link.replace(/%25/g, '%').split('www.lemonde.fr')[1].split('.html')[0] + '.html'); + link_lemonde(url, url_link, elem); + } + } + article.innerHTML = ''; + article.parentNode.replaceChild(article_new, article); + } + } + } catch (err) { + console.log(err); + } + } + } + } + } + let ads = 'div.dfp-slot, div.dfp__container'; + hideDOMStyle(ads); +} + +else if (matchDomain('leparisien.fr')) { + if (window.location.pathname.startsWith('/amp/')) + ampToHtml(); +} + +else if (matchDomain('lepoint.fr')) { + function lepoint_main() { + function decryptVariable(a) { + var t = ["point", "les", "payants", "top"], + n = ["le", "avec", "articles", "c"], + o = (function () { + var o = []; + for (var e = 0; e < 4; e++) + o.push(n[e]), o.push(t[e]); + return o + })(), + e = { + stringify: function (o) { + var e = { + ct: o.ciphertext.toString(CryptoJS.enc.Base64) + }; + return o.iv && (e.iv = o.iv.toString()), + o.salt && (e.s = o.salt.toString()), + JSON.stringify(e) + }, + parse: function (o) { + var e = JSON.parse(o), + t = CryptoJS.lib.CipherParams.create({ + ciphertext: CryptoJS.enc.Base64.parse(e.ct) + }); + return e.iv && (t.iv = CryptoJS.enc.Hex.parse(e.iv)), + e.s && (t.salt = CryptoJS.enc.Hex.parse(e.s)), + t + } + }; + return JSON.parse(CryptoJS.AES.decrypt(JSON.stringify(a), o.join(" "), { + format: e + }).toString(CryptoJS.enc.Utf8)) + } + let article = document.querySelector('div#contenu'); + if (article && window.variable_article_poool) + window.postMessage({type: 'from_page', data: decryptVariable(window.variable_article_poool)}); + } + if (!matchDomain(['journal.lepoint.fr'])) { + let paywall = document.querySelectorAll('aside.paywall'); + if (paywall.length) { + removeDOMElement(...paywall); + insert_script(lepoint_main); + } + let ads = 'div[id*="WRAP_"], div#StickyPaywall, div#paywall-sticky, #article-body div.slotpub, div.sticky-block'; + hideDOMStyle(ads); + } else { + let url = window.location.href; + getArchive(url, 'div.accnt-cmp', '', 'article'); + } +} + +else if (matchDomain('lequipe.fr')) { + let paywall = document.querySelector('div.Article__paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article_id = window.location.pathname.match(/\d+$/)[0]; + let article = document.querySelector('div.article__body'); + let notes = window.location.pathname.includes('Article/Les-notes-'); + if (notes) + header_nofix(article, '', 'BPC > no fix'); + else if (article_id && article) { + let url_src = 'https://dwh.lequipe.fr/api/v4/efr/news/' + article_id; + fetch(url_src) + .then(response => { + if (response.ok) { + response.json().then(json => { + try { + let pars = json.items.filter(x => x.layout === 'article_body')[0].objet.paragraphs; + pars.shift(); + article.innerHTML = ''; + article.className += ' Article__paragraph'; + article.appendChild(document.createElement('br')); + addStyle('div.article__body > p.Paragraph {font-family: "DINNextLTPro-Regular", sans-serif; font-size: 18px; font-weight: 400; line-height: 26px;}'); + let parser = new DOMParser(); + for (let par of pars) { + let elem; + if (par.content) { + if ((par.content.match(/(^$)/g) || []).length !== 1) { + let elem_type = par.content.includes('div>') ? 'div' : 'p'; + let doc = parser.parseFromString('<' + elem_type + ' class="Paragraph">' + DOMPurify.sanitize(par.content, dompurify_options) + '', 'text/html'); + elem = doc.querySelector(elem_type); + } + } else if (par.title) { + elem = document.createElement('h2'); + elem.innerText = par.title; + } else if (par.media) { + if (par.media.url && par.media.ratio) { + let ratio = par.media.ratio; + if (!parseInt(ratio)) + ratio = 1.5; + let url = par.media.url.replace(/\\u002F/g, '/').replace('{width}', '400').replace('{height}', parseInt(400 / ratio)).replace('{quality}', '75'); + let caption = par.media.legende && par.media.legende.length > 2 ? par.media.legende : ''; + elem = makeFigure(url, caption, {}, {'style': 'font-weight: bold;'}); + } else if (par.media.__type === 'video' && par.media.id) { + let url = par.media.image.url.replace('{width}', '400').replace('{height}', 400).replace('{quality}', '75'); + elem = makeFigure(url, par.media.legend); + let video_link = document.createElement('a'); + video_link.href = video_link.innerText = 'https://geo.dailymotion.com/player.html?video=' + par.media.id; + video_link.style = 'text-decoration: underline;'; + video_link.target = '_blank'; + elem.appendChild(video_link); + } + } else if (!['article_paragraph_pub'].includes(par.__type)) + console.log(par); + if (elem) + article.appendChild(elem); + } + } catch (err) { + console.log(err); + } + }) + } + }).catch(x => header_nofix(article, '', 'BPC > no fix (source file)')) + } + } + let ads = 'div.AmPlaceholder, div.Modal[data-modal="amsBlock"]'; + hideDOMStyle(ads); + let noscroll = document.querySelector('html.no-scroll'); + if (noscroll) + noscroll.classList.remove('no-scroll'); +} + +else if (matchDomain('lerevenu.com')) { + let ads = 'div.wrapperAd'; + hideDOMStyle(ads); +} + +else if (matchDomain('lesechos.fr')) { + if (window.location.pathname.startsWith('/amp/')) { + ampToHtml(); + } else { + window.setTimeout(function () { + let paywall = document.querySelector('div#paywall, div#registerWall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let filter = /window\.__REACT_QUERY_STATE__\s?=\s?/; + let json_script = getSourceJsonScript(filter); + if (json_script) { + try { + let json = JSON.parse(json_script.text.split(filter)[1].split('};')[0] + '}'); + let data_article = json.queries.filter(x => x.state.data.stripes)[0].state; + let url = window.location.href; + let url_loaded = data_article.data.path; + if (url_loaded && (!url_loaded.slice(-7).match(/\d+/) || !url.includes(url_loaded.slice(-7)))) + refreshCurrentTab(); + else { + let json_text = data_article.data.stripes[0].mainContent[0].data.description; + let article = document.querySelector('div.post-paywall'); + if (article) { + let contentNode = document.createElement('div'); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + let error_iframes = article_new.querySelectorAll('iframe[allow*="fullscreen"][allowfullscreen]'); + for (let iframe of error_iframes) + iframe.removeAttribute('allowfullscreen'); + if (article.parentNode && article_new) { + article.parentNode.replaceChild(article_new, article); + let article_lastnode = document.querySelector('.post-paywall > :last-child'); + if (article_lastnode) { + article_lastnode.setAttribute('style', 'height: auto !important; overflow: hidden !important; max-height: none !important;'); + } + } + } + let styleElem = document.head.appendChild(document.createElement('style')); + styleElem.innerText = ".post-paywall::after {height: auto !important;}"; + } + } catch (err) { + console.log(err); + } + } + } + let ads = 'div.sc-1u9r8h-0'; + hideDOMStyle(ads); + }, 500); + } +} + +else if (matchDomain('lesinrocks.com')) { + if (window.location.search.match(/(\?|&)amp/)) { + let size_defined = document.querySelector('amp-script.i-amphtml-layout-size-defined'); + if (size_defined) + size_defined.style = 'overflow:visible !important;'; + let overlays = document.querySelectorAll('section.learn_more, div.sidebar, div.menu-footer, div.tooltip_bib, footer.content-info'); + removeDOMElement(...overlays); + } +} + +else if (matchDomain('letelegramme.fr')) { + let paywall = document.querySelectorAll('div.tlg-paywalled'); + for (let elem of paywall) + elem.classList.remove('tlg-paywalled'); + let ads = 'div[id^="pub_"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('lexpress.fr')) { + let ads = 'div[class^="block_pub"], div[class^="bottom-bar"], div.teads__block, div.ban-bottom, div[class^="placeholder--ban-atf"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('liberation.fr')) { + let paywall_sel = cs_param.paywall_sel || 'div.article-body-paywall'; + let paywall = document.querySelector(paywall_sel); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article_sel = 'main > div > article'; + let article = cs_param.article_sel || document.querySelector(article_sel); + if (article) { + let url_src = 'https://arc.api.liberation.fr/content/v4/?website=liberation&website_url=' + encodeURIComponent(window.location.pathname); + let x_api_key = cs_param['x-api-key'] || 'ejeePeingeitaegho3weengeeyohpu'; + fetch(url_src, {headers: {"x-api-key": x_api_key}}) + .then(response => { + if (response.ok) { + response.json().then(json => { + if (json && json.content_elements) { + let pars = json.content_elements; + if (pars.length) + article.innerHTML = ''; + let parser = new DOMParser(); + for (let par of pars) { + let elem = document.createElement('p'); + let sub_elem; + if (['header', 'raw_html', 'text'].includes(par.type)) { + if (par.content) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.content, dompurify_options) + '
', 'text/html'); + sub_elem = doc.querySelector('div'); + if (par.type === 'header') + sub_elem.style = 'font-weight: bold; font-size: 1.85rem;'; + } + } else if (par.type === 'correction') { + if (par.text) { + sub_elem = document.createElement('span'); + elem.innerText = par.text; + } + } else if (par.type === 'image') { + if (par.url) { + sub_elem = document.createElement('img'); + sub_elem.src = par.url; + } + } else if (par.type === 'custom_embed') { + if (par.embed && par.embed.config) { + let config = par.embed.config; + sub_elem = document.createElement('div'); + sub_elem.style = 'border: 1px solid black;'; + if (config.title) { + let sub_item = document.createElement('p'); + sub_item.innerText = config.title; + sub_item.style = 'font-weight: bold; margin: 20px;'; + sub_elem.appendChild(sub_item); + } + if (config.content) { + let sub_item = document.createElement('p'); + sub_item.innerText = config.content; + sub_item.style = 'margin: 20px;'; + sub_elem.appendChild(sub_item); + } + } else + console.log(par); + } else if (par.type === 'oembed_response') { + if (par.raw_oembed && par.raw_oembed.html) { + if (!par.subtype === 'twitter') { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.raw_oembed.html, dompurify_options) + '
', 'text/html'); + sub_elem = doc.querySelector('div'); + } else if (par.raw_oembed.url) { + sub_elem = document.createElement('a'); + sub_elem.href = sub_elem.innerText = par.raw_oembed.url; + sub_elem.target = '_blank'; + } + } + } else if (par.type === 'link_list') { + if (par.items) { + sub_elem = document.createElement('p'); + sub_elem.appendChild(document.createElement('hr')); + sub_elem.appendChild(document.createTextNode('Lire aussi')); + sub_elem.appendChild(document.createElement('br')); + for (let item of par.items) { + if (item.content && item.url) { + let item_link = document.createElement('a'); + item_link.href = item.url; + item_link.innerText = item.content; + sub_elem.appendChild(item_link); + sub_elem.appendChild(document.createElement('br')); + } + } + sub_elem.appendChild(document.createElement('hr')); + } + } else if (!['quote'].includes(par.type)) { + console.log(par); + } + if (sub_elem) { + elem.appendChild(sub_elem); + article.appendChild(elem); + } + } + } + }) + } + }).catch(x => header_nofix(article, '', 'BPC > no fix (source file)')) + } + } + let ads = 'div[class^="StickyAd"], div[class^="default__OutbrainWrapper"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('loeildelaphotographie.com')) { + let paywall = document.querySelector('.paywall'); + if (paywall) { + paywall.removeAttribute('class'); + } + let premium_pic_boxes = document.querySelectorAll('.premium-pic-box'); + let banners = document.querySelectorAll('.membership-promo-container, .login_form_litle'); + removeDOMElement(...premium_pic_boxes, ...banners); + let blurred_images = document.querySelectorAll('img[style*="blur"]'); + for (let blurred_image of blurred_images) + blurred_image.removeAttribute('style'); +} + +else if (matchDomain('lopinion.fr')) { + let url = window.location.href; + getArchive(url, 'div.paywall-premium', '', 'div.mainBody', '', cs_param['article_src_sel'] || 'div[style*=";line-height:1.8;"] div[style*=";line-height:1.8;"]'); +} + +else if (matchDomain('marianne.net')) { + let paywall = document.querySelector('div.paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div > div.js-poool-wrapper'); + if (article) { + let limit_low = 50; + let limit_high = 400; + function show_data(article, body) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(body, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + let lazy_images = article_new.querySelectorAll('img.lazyload[data-src]:not([src])'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-src'); + elem.classList.remove('lazyload'); + } + article.innerHTML = ''; + article.parentNode.replaceChild(article_new, article); + } + function fetch_data(limit, offset = 0) { + let url_src = 'https://mobile.marianne.net/premium?limit=' + limit + '&offset=' + offset; + fetch(url_src) + .then(response => { + if (response.ok) { + response.json().then(json => { + try { + let src_articles = json.feed_auto; + if (src_articles) { + let src_article = src_articles.filter(x => x.urlWeb === url)[0]; + let ls_update = true; + if (src_article) + show_data(article, src_article.body); + else if (limit === limit_low) { + ls_update = false; + fetch_data(limit_high); + } else + header_nofix(article, '', 'BPC > no fix (source file)'); + if (ls_update) { + let now_date = (new Date()).toISOString().split('T')[0]; + if (!ls_date || limit > limit_low || now_date > ls_date) + ls_json_articles = {}; + for (let art of src_articles) + ls_json_articles[art.urlWeb] = art.body; + localStorage.setItem('###_json_date', now_date); + localStorage.setItem('###_json', JSON.stringify(ls_json_articles)); + } + } + } catch (err) { + console.log(err); + } + }) + } + }).catch(x => header_nofix(article, '', 'BPC > no fix (source file)')) + } + let url = window.location.href.split(/[#\?]/)[0]; + let meta_date = document.querySelector('head > meta[property="article:published_time"][content]'); + let art_date = ''; + if (meta_date) + art_date = meta_date.content.split('T')[0]; + let ls_date = localStorage.getItem('###_json_date') || ''; + let ls_json_articles = {}; + if (ls_date) { + let ls_articles = localStorage.getItem('###_json'); + ls_json_articles = JSON.parse(ls_articles); + if (ls_date <= art_date) + fetch_data(limit_low); + else { + let art_data = ls_json_articles[url]; + if (art_data) + show_data(article, art_data); + else if (Object.keys(ls_json_articles).length <= limit_low) + fetch_data(limit_high); + else + header_nofix(article, '', 'BPC > no fix (source file)') + } + } else { + fetch_data(limit_low); + } + } + } + let ads = 'div[class*="--placeholder"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('philonomist.com')) { + let paywall = document.querySelector('div.content-bandeau'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = parseHtmlEntities(findKeyJson(json, ['articleBody'])).replace(/\s{2,}/g, '\r\n\r\n'); + let article = document.querySelector('div.main-body'); + if (json_text && article) { + let par_last = article.querySelector('div > p:last-child'); + if (par_last) { + let par_last_str = par_last.innerText.substring(0, 50); + if (json_text.replace(/<[^<]*>/g, '').includes(par_last_str)) { + par_last.innerText = json_text.substring(json_text.indexOf(par_last_str)); + } else { + article.innerHTML = ' '; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + article.appendChild(article_new); + } + } + } + } + } + } +} + +else if (matchDomain('pourleco.com')) { + let paywall = document.querySelector('div[data-pleco-poool^="paywall"]'); + if (paywall) { + let intro = document.querySelector('div[data-pleco-transition="fade"]'); + removeDOMElement(paywall, intro); + let article = document.querySelector('div[class*="article-"][style]'); + if (article) + article.removeAttribute('style'); + } +} + +else if (matchDomain('reforme.net')) { + let article_sel = 'div.elementor-widget-theme-post-content'; + getJsonUrl(article_sel + ' section', '', article_sel); + let banner = 'div.free-access-banner'; + hideDOMStyle(banner); +} + +else if (matchDomain('science-et-vie.com')) { + if (window.location.hostname.startsWith('amp.')) { + let pars = document.querySelectorAll('.qiota_reserve > p, .qiota_reserve > h2'); + let pars_text = []; + for (let par of pars) { + if (pars_text.includes(par.innerText)) + removeDOMElement(par); + else + pars_text.push(par.innerText); + } + let sizer = document.querySelector('div.article-content > amp-script > i-amphtml-sizer'); + removeDOMElement(sizer); + let replaced_content = document.querySelector('div.i-amphtml-replaced-content'); + if (replaced_content) + replaced_content.removeAttribute('class'); + } +} + +else if (matchDomain('scienceshumaines.com')) { + let ads = 'div.banner-ad-section, div[class^="add-block-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain(['sudouest.fr', 'charentelibre.fr', 'larepubliquedespyrenees.fr'])) { + let paywall = document.querySelectorAll('.visible-not-premium'); + if (paywall.length) { + removeDOMElement(...paywall); + let visible_premium = document.querySelectorAll('div.visible-premium'); + for (let elem of visible_premium) + elem.classList.remove('visible-premium'); + } + let footer_premium = '.footer-premium'; + let ads = 'div.pub, div.ph-easy-subscription'; + hideDOMStyle(footer_premium + ', ' + ads); +} + +else if (matchDomain('telerama.fr')) { + let paywall = document.querySelector('section.paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article_sel = 'article.article__page-content'; + let article = document.querySelector(article_sel); + if (article) { + let url_src = 'https://apps.telerama.fr/tlr/v1/premium-android-tablet/element?id=' + encodeURIComponent(window.location.pathname); + let json_key = 'templates.raw_content.content'; + getExtFetch(url_src, json_key, {}, main_telerama); + function main_telerama(url, data) { + try { + if (data) { + let parser = new DOMParser(); + let doc = parser.parseFromString(DOMPurify.sanitize(data, dompurify_options), 'text/html'); + let article_new = doc.querySelector(article_sel); + if (article_new && article.parentNode) { + article_new.querySelectorAll('a[href^="tlrm://element?id="]').forEach(e => e.href = decodeURIComponent(e.href.split('tlrm://element?id=')[1])); + article_new.querySelectorAll('figure > img[data-src]:not([src])').forEach(e => e.src = e.getAttribute('data-src')); + article.parentNode.replaceChild(article_new, article); + } + } + } catch (err) { + console.log(err); + } + } + } + } + let ads = 'div.dfp-slot'; + hideDOMStyle(ads); +} + +else if (matchDomain('lamontagne.fr') || document.querySelector('head > meta[name="google-play-app"][content^="app-id=com.centrefrance"]')) {// Groupe Centre France + let paywall = document.querySelector('div#poool-widget'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let content = document.querySelector('div.entry-content'); + if (json_text && content) { + content.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + content.appendChild(article_new); + } + } + } + } +} + +else + csDone = true; + +} else if (window.location.hostname.endsWith('.it') || matchDomain(['eastwest.eu', 'ilsole24ore.com', 'italian.tech', 'limesonline.com', 'quotidiano.net', 'tuttosport.com'])) {//italy + +if (matchDomain('corriere.it')) { + if (window.location.pathname.endsWith('_amp.html')) { + amp_unhide_subscr_section(''); + } else { + if (window.location.pathname.includes('_preview.shtml') && !window.location.pathname.startsWith('/podcast/')) { + window.setTimeout(function () { + window.location.href = window.location.pathname.replace('_preview.shtml', '.shtml'); + }, 500); + } + } +} + +else if (matchDomain('corrieredellosport.it')) { + if (!window.location.pathname.startsWith('/amp/')) { + amp_redirect('div[class^="MainTextTruncated_paragraph__"]'); + let ads = 'div[class^="AdUnit_placeholder"]'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('eastwest.eu')) { + let paywall = document.querySelector('.paywall'); + if (paywall) { + paywall.removeAttribute('style'); + paywall.classList.remove('paywall'); + let intro = document.querySelectorAll('div#testo_articolo > p, div#testo_articolo > h3'); + let offerta = document.querySelectorAll('div.offerta_abbonamenti'); + removeDOMElement(...intro, ...offerta); + } +} + +else if (matchDomain('editorialedomani.it')) { + if (window.location.search.startsWith('?amp=1')) + ampToHtml(); +} + +else if (matchDomain('gazzetta.it')) { + if (window.location.pathname.endsWith('_preview.shtml')) { + let paywall = document.querySelector('section.bck-freemium__wall'); + if (paywall) { + removeDOMElement(paywall); + if (!window.location.search.startsWith('?reason=unauthenticated')) { + window.location.href = window.location.pathname.replace('_preview', '') + '?gaa_at=g'; + } else { + let json_script = getArticleJsonScript(); + let header = 'div.content > h2'; + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody.replace(/(\s{3}| )/g, '\r\n\r\n'); + let content = document.querySelector('div.content > p.has-first-letter'); + if (json_text && content) { + let content_new = document.createElement('p'); + content_new.innerText = json_text; + content.parentNode.replaceChild(content_new, content); + let article_body = document.querySelector('section.body-article'); + if (article_body) + article_body.style = 'height: auto;'; + } else + header_nofix(header); + } + } else + header_nofix(header); + } + } + } else if (window.location.pathname.endsWith('_amp.shtml')) + ampToHtml(); +} + +else if (matchDomain('ilfattoquotidiano.it')) { + if (window.location.pathname.endsWith('/amp/')) { + amp_unhide_subscr_section('div#_4sVideoContainer, div#post-consent-ui'); + let comments = document.querySelector('div.content.comments'); + removeDOMElement(comments); + let logo = document.querySelector('a > amp-img[src$="/logo-tablet.svg"]'); + if (logo) { + let logo_new = document.createElement('img'); + logo_new.src = logo.getAttribute('src').replace('logo-tablet.svg', 'logo-desktop.svg'); + logo_new.height = logo.getAttribute('height'); + logo_new.width = logo.getAttribute('width'); + logo.parentNode.replaceChild(logo_new, logo); + } + } else if (window.location.pathname.match(/\/\d{4}\/\d{2}\/\d{2}\//)) { + amp_redirect('div.read-more', '', window.location.pathname + 'amp'); + } +} + +else if (matchDomain('ilfoglio.it')) { + if (window.location.pathname.endsWith('/amp/')) { + amp_unhide_subscr_section('amp-ad, [class^="adv-"], div#gmpVideoContainer'); + } else { + amp_redirect('div.paywall'); + let ads = '.advertisement'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('ilmanifesto.it')) { + let paywall = document.querySelector('div[class*="before:bg-gradient-to-t"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('article div.prose'); + if (article) { + let filter = /^self\.__next_f\.push\(\[1,"/; + let scripts = document.querySelectorAll('script:not([src], [type])'); + for (let script of scripts) { + if (script.text.match(filter) && script.text.includes('canonical_url')) { + if (!script.text.includes(window.location.href)) + refreshCurrentTab(); + break; + } + } + let source_script = getSourceJsonScript(/^self\.__next_f\.push\(\[1,"\\u003c/); + if (source_script) { + let source_text = source_script.text.split(filter)[1].split('"])')[0].replace(/\\u003c/g, '<').replace(/\\u003e/g, '>').replace(/\\"/g, '"').replace(/\\n/g, ''); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(source_text) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + let figures = article_new.querySelectorAll('figure[style]'); + for (let elem of figures) + elem.removeAttribute('style'); + article.innerHTML = ''; + article.appendChild(article_new); + } + } + } +} + +else if (matchDomain('ilsole24ore.com')) { + header_nofix('div.paywalltext', 'div.lock'); + waitDOMAttribute('body', 'BODY', 'style', node => node.removeAttribute('style'), true); + csDoneOnce = true; + let ads = 'div.background-adv, div.abox, div.ob-smartfeed-wrapper, div.s24_adb'; + hideDOMStyle(ads); +} + +else if (matchDomain(['iltirreno.it', 'lanuovasardegna.it']) || matchDomain(['gazzettadimodena.it', 'gazzettadireggio.it', 'lanuovaferrara.it'])) { + if (window.location.pathname.includes('/news/')) { + let paywall = document.querySelector('span > img[alt*="Paywall"]'); + if (paywall) { + let header = paywall.parentNode.parentNode; + header_nofix(header); + removeDOMElement(paywall.parentNode); + } + window.setTimeout(function () { + let banners = document.querySelectorAll('div.MuiSnackbar-root, div.css-16cchgy'); + removeDOMElement(...banners); + }, 1000); + } +} + +else if (matchDomain(it_ilmessaggero_domains)) { + if (window.location.pathname.toLowerCase().includes('/amp/')) { + amp_unhide_subscr_section(); + } else { + let noscroll = document.querySelector('html[style]'); + if (noscroll) + noscroll.removeAttribute('style'); + let ads = 'div.adv_banner, div.inread_adv, div#outbrain'; + hideDOMStyle(ads); + } +} + +else if (matchDomain(it_quotidiano_domains)) { + if (window.location.pathname.endsWith('/amp') || window.location.search.startsWith('?amp')) { + amp_unhide_access_hide('="c.customGranted"', '="NOT c.customGranted"', 'amp-fx-flying-carpet, .watermark-adv, .amp__watermark'); + } else { + amp_redirect('div[data-testid="paywall-container"], div[class^="Paywall_paywall_"]', '', window.location.pathname + '/amp'); + let ads = 'div[id^="div-gpt-ad"]'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('italiaoggi.it')) { + let paywall = document.querySelector('div.boxAbb'); + if (paywall && dompurify_loaded) { + let overlay = document.querySelector('div.article-locked-overlay'); + removeDOMElement(paywall, overlay); + let article_locked = document.querySelector('div.article-locked'); + if (article_locked) { + article_locked.classList.remove('article-locked'); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let content = article_locked.querySelector('section'); + if (json_text && content) { + let parser = new DOMParser(); + json_text = json_text.replace(/&apos;/g, "'").replace(/;/g, ''); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + content.parentNode.replaceChild(content_new, content); + } + } + } + } + } +} + +else if (domain = matchDomain(it_gedi_domains)) { + let amp = window.location.pathname.match(/\/amp(\/)?$/); + if (matchDomain(['huffingtonpost.it', 'lastampa.it'])) { + if (window.location.pathname.includes('/news/')) { + if (!amp) { + csDoneOnce = true; + let paywall = document.querySelector('iframe[id^="__limio_frame"]'); + if (paywall) { + ext_api.runtime.sendMessage({request: 'clear_cookies_domain', data: {domain: domain}}); + refreshCurrentTab(false); + } + let modal = document.querySelector('aside#widgetDP'); + removeDOMElement(modal); + } else + ampToHtml(); + } + } else if (matchDomain('repubblica.it')) { + if (!amp) + amp_redirect('iframe[id^="__limio_frame"]', '', window.location.pathname + 'amp/'); + else { + amp_unhide_subscr_section(); + if (!mobile) + addStyle('img.i-amphtml-fill-content {min-height: 50% !important; min-width: 50% !important;}'); + let paywall = document.querySelector('div.not_granted__content'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div.story__wrapper'); + if (article) { + let url = window.location.href.split(/[#\?]/)[0].replace(/\/amp\/$/, ''); + article.before(googleSearchToolLink(url)); + } + } + } + } else { + if (!amp) { + let paywall = document.querySelector('div#ph-paywall'); + removeDOMElement(paywall); + } else + ampToHtml(); + } + let ads = 'div[id^="adv"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('milanofinanza.it')) { + let paywall = document.querySelector('div.paywall-content, section.payment'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + try { + let json = JSON.parse(json_script.text.replace(/!=/g, '').replace(/!function\(\){[^!]+(\(\);|0;[a-z])/g, '')); + if (json) { + let json_text = parseHtmlEntities(json.articleBody); + let article = document.querySelector('div.article-locked'); + if (json_text && article) { + article.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + article.appendChild(article_new); + } + } + } catch (err) { + console.log(err); + header_nofix('div.article-locked', '', 'BPC > no fix (json-error)'); + } + } + } +} + +else if (matchDomain('sky.it')) { + let paywall = document.querySelector('div.c-paywall'); + if (paywall && window.location.hostname.match(/^(sport|tg24)\./)) { + removeDOMElement(paywall); + let article = document.querySelector('div > div.c-article-abstract'); + let json_script = getArticleJsonScript(); + if (article && json_script) { + try { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json[0].articleBody; + if (json_text) { + let par_new = document.createElement('p'); + par_new.innerText = json_text; + article.parentNode.appendChild(par_new); + } + } + } catch (err) { + console.log(err); + } + } + } + let ads = 'div.c-adv'; + hideDOMStyle(ads); +} + +else if (matchDomain('tuttosport.com')) { + if (!window.location.pathname.startsWith('/amp/')) { + let paywall = document.querySelector('div[class^="MainTextTruncated_premium"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div > div[class^="MainTextTruncated_truncatedContent"]'); + if (article) { + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.news && json.props.pageProps.news.content) { + let url_next = json.props.pageProps.news.href; + if (url_next && !window.location.pathname.includes(url_next)) + window.location.href = window.location.pathname; + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json.props.pageProps.news.content, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + article.parentNode.replaceChild(article_new, article); + } else + refreshCurrentTab(); + } catch (err) { + console.log(err); + } + } + } + } + let ads = 'div[class^="AdUnit_"]'; + hideDOMStyle(ads); + } +} + +else + csDone = true; + +} else if (window.location.hostname.match(/\.(be|nl)$/) || matchDomain(['artsenkrant.com', 'lavenir.net', 'projectcargojournal.com', 'railfreight.cn', 'railfreight.com', 'railtech.com'])) {//belgium/netherlands + +if (matchDomain(be_groupe_ipm_domains)) { + let paywall = document.querySelector('div.is-preview'); + if (paywall) { + paywall.classList.remove('is-preview'); + window.setTimeout(function () { + let div_hidden = document.querySelector('div.is-hidden'); + if (div_hidden) + div_hidden.classList.remove('is-hidden'); + }, 1000); + } + let ads = 'div.ap-AdContainer, div.ap-Outbrain'; + hideDOMStyle(ads); +} + +else if (matchDomain(be_mediahuis_domains)) { + window.setTimeout(function () { + let video = document.querySelector('div.video'); + func_post = function () { + if (video) { + let video_new = document.querySelector('div[id$="-streamone"], div[id^="video-player-"]') || document.querySelector('article div[style^="background-color"]'); + if (!video_new) { + let empty_div = document.querySelector('div > div[aria-hidden="true"]:empty:not([class])'); + if (empty_div) + video_new = empty_div.parentNode; + } + if (video_new && video_new.parentNode) + video_new.parentNode.replaceChild(video, video_new); + } + if (mobile) { + let lazy_images = document.querySelectorAll('figure img[loading="lazy"][style]'); + for (let elem of lazy_images) + elem.style = 'width: 95%;'; + let figures = document.querySelectorAll('figure div'); + for (let elem of figures) { + elem.removeAttribute('style'); + let svg = elem.querySelector('svg'); + removeDOMElement(svg); + } + } + let article = document.querySelector(article_sel); + if (article && !matchDomain(['gva.be', 'hbvl.be'])) { + let pars = article.querySelectorAll('div[style*="font-size"]'); + if (pars.length < 5) + article.before(googleSearchToolLink(url)); + } + } + let url = window.location.href; + let paywall_sel = 'head > meta[name$="article_ispaidcontent"][content="true"]'; + let paywall = document.querySelector(paywall_sel); + let art_div_sel = 'div[id]:not([id^="warning"]):not([id^="ad_"]):not([id^="webshop-"])'; + let article_sel = 'article ' + art_div_sel + ', section ' + art_div_sel + ', main ' + art_div_sel + ', div[class^="article-body_"]'; + if (paywall) { + getArchive(url, paywall_sel, '', article_sel); + if (matchDomain(['gva.be', 'hbvl.be'])) { + let article = document.querySelector(article_sel); + if (article) + article.before(googleSearchToolLink(url)); + } + } + let popup = document.querySelector('div[data-testid="close-popup-button"]'); + if (popup) + popup.click(); + }, 1500); +} + +else if (matchDomain('businessam.be')) { + let paywall = document.querySelector('div.paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div.text-gradient'); + if (article) { + let filter = /window\.fullcontent64\s?=\s?"/; + let content_script = getSourceJsonScript(filter); + if (content_script) { + try { + let content = decode_utf8(atob(content_script.text.split(filter)[1].split('";')[0])); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(content, dompurify_options) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + article.parentNode.replaceChild(content_new, article); + } catch (err) { + console.log(err); + } + } + } + } +} + +else if (matchDomain('businessinsider.nl')) { + getJsonUrl('div.piano-article__paywall', '', 'div.piano-article__content'); +} + +else if (matchDomain('doorbraak.be')) { + let paywall_sel = 'div.paywall'; + let paywall = document.querySelector(paywall_sel); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + waitDOMElement(paywall_sel, 'DIV', removeDOMElement, false); + let json_script = document.querySelector('script#__NUXT_DATA__'); + if (json_script) { + try { + if (!json_script.text.substr(0, 500).includes(window.location.pathname)) + refreshCurrentTab(); + let json = JSON.parse(json_script.text); + json = json.filter(x => typeof x === 'string' && x.startsWith('

')); + let json_text = json[0]; + if (json_text) { + let parser = new DOMParser(); + let doc = parser.parseFromString('

' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + let article = document.querySelector('div > div.prose'); + if (article) { + article.appendChild(content_new); + } + } + } catch (err) { + console.log(err); + } + } + } +} + +else if (matchDomain('ftm.nl')) { + let videos = document.querySelectorAll('div.body > div.video-pp'); + for (let video of videos) { + let video_id_dom = video.querySelector('a.video[data-youtube-id]'); + if (video_id_dom) { + video_new = document.createElement('iframe'); + video_new.src = 'https://www.youtube.com/embed/' + video_id_dom.getAttribute('data-youtube-id'); + video_new.style = 'width: 95%; height: 400px; margin: 0px 20px;'; + video.parentNode.replaceChild(video_new, video); + } + } + let audio_controls = document.querySelectorAll('audio[controls][style]'); + for (let elem of audio_controls) + elem.removeAttribute('style'); + document.querySelectorAll('div.foldable').forEach(e => e.classList.remove('foldable')); + let banners = 'div.banner-pp'; + hideDOMStyle(banners); +} + +else if (matchDomain(be_roularta_domains)) { + if (matchDomain('beleggersbelangen.nl')) { + let paywall = document.querySelector('div.unlimited-access'); + if (paywall) { + removeDOMElement(paywall); + let no_account = document.querySelector('div.no-account'); + if (no_account) + no_account.classList.remove('no-account'); + let content_inner = document.querySelector('div.content-inner[style]'); + if (content_inner) + content_inner.removeAttribute('style'); + } + } else { + let paywall = document.querySelector('div[id*="wall-modal"]'); + if (paywall) { + removeDOMElement(paywall); + let html = document.querySelector('html[class]'); + if (html) + html.removeAttribute('class'); + function roularta_noscroll(node) { + node.removeAttribute('style'); + node.removeAttribute('class'); + } + waitDOMAttribute('html', 'html', 'class', roularta_noscroll, true); + let intro = document.querySelectorAll('div.article-body > p, div.article-body > style'); + removeDOMElement(...intro); + let locked = document.querySelector('body.locked'); + if (locked) + locked.classList.remove('locked'); + } + if (!window.navigator.userAgent.toLowerCase().includes('chrome') && !matchDomain(['artsenkrant.com', 'kw.be']) && window.location.href.match(/\/(\w+-){2,}/)) { + let lazy_images = document.querySelectorAll('img[src^="data:image/"][data-lazy-src]'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-lazy-src'); + } + } + } + let ads = 'div.rmgAd, div.c-header__ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('groene.nl')) { + let more = pageContains('div.wrapper > h2', 'Verder lezen?'); + if (more.length) { + let link_text = 'https://www.groene.nl/populair'; + let a_link = document.createElement('a'); + a_link.href = link_text; + a_link.innerText = 'BPC > ' + link_text.split('www.')[1]; + more[0].parentNode.append(document.createElement('br'), a_link); + csDoneOnce = true; + } +} + +else if (matchDomain(['lc.nl', 'dvhn.nl']) || document.querySelector('head > link[href*=".ndcmediagroep.nl/"]')) { + let paywall = document.querySelector('div.signupPlus, div.pw-wrapper'); + if (paywall && dompurify_loaded) { + let intro = document.querySelector('div.startPayWall'); + let html = document.documentElement.outerHTML; + if (html.includes('window.__NUXT__=')) { + removeDOMElement(paywall, intro); + try { + let json = html.split('window.__NUXT__=')[1].split('')[0].trim(); + let json_match = json.includes('type:"article",'); + if (json_match) { + let path_match = window.location.pathname.match(/-(\d+)\./); + if (path_match) { + let article_id = path_match[1]; + json_match = json.includes(',id:"' + article_id + '",'); + if (!json_match && json.match(/[(,]null,/)) { + let art_match = json.split(/[(,]null,/)[1].match(new RegExp('-' + article_id + '\\.', 'g')); + json_match = art_match && art_match.length > 1; + } + } + } + if (!json_match) + refreshCurrentTab(); + else if (json.includes(',body:')) { + let intro; + let intro_match = json.match(/,leadtext_raw:"([^"]+)",/); + if (intro_match) { + intro = document.createElement('p'); + intro.innerText = intro_match[1]; + intro.style = 'font-weight: bold;'; + } + let json_text = json.split(',body:')[1].split(/,(leadText|brand_key|tts|pianoKeywords):/)[0].replace(/([{,])(\w+)(?=:(["\{\[]|[\w$]{1,2}[,\}]))/g, "$1\"$2\"").replace(/(Image\\":)(\d)([,}])/g, '$1\\"$2\\"$3').replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3"); + let article = document.querySelector('div.content'); + if (article) { + article.innerHTML = ''; + if (intro) + article.appendChild(intro); + let pars = JSON.parse(json_text); + function addParText(elem, par_text, add_br = false) { + if (par_text) { + if (par_text.length <= 2) + par_text = ' ... '; + let span = document.createElement('span'); + span.innerText = par_text; + elem.appendChild(span); + if (add_br) + elem.appendChild(document.createElement('br')); + } + } + function addLink(elem, link_text, href, add_br = false) { + let par_link = document.createElement('a'); + par_link.href = href; + par_link.innerText = link_text; + elem.appendChild(par_link); + if (add_br) + elem.appendChild(document.createElement('br')); + } + function addImage(elem, child) { + let figure = document.createElement('figure'); + let img = document.createElement('img'); + img.src = child.relation.href; + figure.appendChild(img); + if (child.relation.caption && child.relation.caption.length > 2) { + let caption = document.createElement('figcaption'); + caption.innerText = child.relation.caption; + figure.appendChild(caption); + } + elem.appendChild(figure); + } + function addChildren(elem, children, add_br = false) { + for (let child of children) { + if (child.text) { + addParText(elem, child.text, add_br); + } else if (child.relation && (child.type === 'img' || child.relation.caption) && child.relation.href) { + let img_par = document.createElement('p'); + addImage(img_par, child); + elem.appendChild(img_par); + } else if (child.relation && child.relation.link && child.relation.link.length > 2) { + addLink(elem, decodeURIComponent(child.relation.title.length > 2 ? child.relation.title : child.relation.link), child.relation.link); + } else if (child.children && child.children[0]) { + if (child.children[0].text) { + if ((child.href && child.href.length > 2) || (child.relation && child.relation.follow && child.relation.follow.url)) { + if (child.children[0].text.length > 2) + addLink(elem, child.children[0].text, child.href || child.relation.follow.url, add_br); + } else + addParText(elem, child.children[0].text); + } else + addChildren(elem, child.children); + } + } + } + for (let par of pars) { + let elem = document.createElement('p'); + if (par.code) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.code, dompurify_options) + '
', 'text/html'); + elem = doc.querySelector('div'); + } else if (par.insertbox_head || par.insertbox_text) { + if (par.insertbox_head && par.insertbox_head.length > 2) + addParText(elem, par.insertbox_head, true); + if (par.insertbox_text) { + for (let item of par.insertbox_text) { + if (item.children) + addChildren(elem, item.children, true); + } + } + } else if (par.text) { + addParText(elem, par.text); + } else if (par.children) { + addChildren(elem, par.children); + } else if (par.typename.length > 2) + console.log(par); + if (elem.hasChildNodes()) { + article.appendChild(elem); + } + } + } + } + } catch (err) { + console.log(err); + } + } + } + let ads = 'div.top__ad, div.marketingblock-article'; + hideDOMStyle(ads); +} + +else if (matchDomain('linda.nl')) { + window.setTimeout(function () { + let paywall = document.querySelector('div.premium-login-box_login-box'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('article'); + if (article) { + let filter = /^window\.__INITIAL_PROPS__\s?=\s?/; + let json_script = getSourceJsonScript(filter); + if (json_script) { + try { + let json = JSON.parse(json_script.text.split(filter)[1]); + if (json) { + let slug = json.slug; + if ((slug && !window.location.pathname.includes(slug)) || !json.viewData) + refreshCurrentTab(); + if (json && json.viewData.article && json.viewData.article.modules) { + let modules = json.viewData.article.modules; + for (let elem of modules) { + let type = elem.acf_fc_layout; + if (type) { + let item = document.createElement('div'); + if (['body_text', 'intro', 'quote'].includes(type)) { + if (elem.text) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize((elem.title ? elem.title : '') + elem.text.replace(/\r\n/g, '
'), dompurify_options) + '
', 'text/html'); + item = doc.querySelector('div'); + if (type === 'intro') { + let intro = item.querySelector('p'); + if (intro) + intro.style = 'font-weight: bold; '; + } else if (type === 'quote') + item.style['text-align'] = 'center'; + article.append(item); + } + } else if (type === 'image') { + let elem_images = elem.images_portrait || elem.images_landscape; + if (elem_images && elem_images.length) { + for (let img of elem_images) { + let url = img.image.sizes.large; + let caption_text = img.credits ? img.credits.replace(/(\n|<[^<]*>)/g, '') : ''; + item = makeFigure(url, caption_text, {style: 'width: 100%;'}); + article.append(item); + } + } + } else + console.log(elem); + } + } + } else + header_nofix('div.article-content_base'); + } + } catch (err) { + console.log(err); + } + } + } + } + }, 1000); +} + +else if (matchDomain(nl_dpg_adr_domains.concat(['hln.be']))) { + let sub_sel = 'article[id^="PURCHASE"]'; + let sub = document.querySelector(sub_sel + ' > button'); + if (sub) + sub.click(); + func_post = function () { + let shades = document.querySelectorAll('div[style*="background-color"][style*=";width"]'); + for (let elem of shades) + elem.style.width = '85%'; + let lazy_images = document.querySelectorAll('picture img[loading="lazy"][style]'); + for (let elem of lazy_images) + elem.style = 'width: 95%;'; + let widgets = document.querySelectorAll('div[old-src^="https://valley.ad.nl/widgets/"]:not([src])'); + for (let elem of widgets) { + let iframe = document.createElement('iframe'); + iframe.src = elem.getAttribute('old-src'); + iframe.style = 'height: 400px; border: none;'; + elem.parentNode.replaceChild(iframe, elem); + } + header_nofix('footer', sub_sel, 'BPC > no archive-fix'); + } + let article_sel = 'div#remaining-paid-content'; + let url = window.location.href; + getArchive(url, article_sel + '[data-reduced="true"]', {rm_attrib: 'data-reduced'}, article_sel); +} + +else if (matchDomain(nl_dpg_media_domains)) { + let banners = 'aside[data-temptation-position^="ARTICLE_"], div[data-temptation-position^="PAGE_"], div[class^="ad--"], div[id^="article_paragraph_"]'; + hideDOMStyle(banners); +} + +else if (matchDomain('nrc.nl')) { + let banners = document.querySelectorAll('div[id$="modal__overlay"], div.header__subscribe-bar, div.banner'); + removeDOMElement(...banners); +} + +else if (matchDomain('telegraaf.nl')) { + let premium = document.querySelector('div[class^="Article__premium"] > label, div.PopupWrapper__paywall'); + let paywall = document.querySelector('data-hydrate[data-name="PaywallHandler"]'); + let article = document.querySelector('section > div.DetailArticleImage') || document.querySelector('section > p.Article__intro'); + if (paywall && window.location.pathname.startsWith('/video/')) + removeDOMElement(paywall); + if (premium && paywall && article && dompurify_loaded) { + let div_main = document.createElement('div'); + div_main.style = 'margin: 20px 0px;'; + let div_elem = document.createElement('div'); + let par_style = 'font-weight: normal; font-size: 16px; line-height: 1.5;'; + function show_text(window_text, div_main) { + window_text = window_text.split('window.telegraaf.')[0].replace(/(^\s?=\s?"|";$|\\")/gm, '').replace(/\\\\u003c/gm, '<'); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(window_text, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + let pars = article_new.querySelectorAll('p'); + for (let par of pars) + par.style = 'margin: 10px 0px;'; + let placeholders = article_new.querySelectorAll('div.TeaserImage__placeholder'); + for (let elem of placeholders) + elem.removeAttribute('class'); + let media = article_new.querySelectorAll('div.NewsletterForm, div.DetailArticleVideo'); + removeDOMElement(...media); + let twitter_quotes = article_new.querySelectorAll('blockquote.twitter-tweet > a[href]'); + for (let elem of twitter_quotes) { + if (!elem.innerText) { + elem.innerText = elem.href; + elem.target = '_blank'; + } + } + if (mobile) { + let art_images = article_new.querySelectorAll('div.DetailArticleImage > div > img'); + for (let elem of art_images) + elem.style.width = '95%'; + } + let error_iframes = article_new.querySelectorAll('iframe[allow*="fullscreen"][allowfullscreen]'); + for (let iframe of error_iframes) + iframe.removeAttribute('allowfullscreen'); + div_main.appendChild(article_new); + } + let window_script = document.querySelector('script#scr-tlg-body'); + if (window_script && window_script.text.includes('window.telegraaf.articleBodyBlocks')) { + removeDOMElement(paywall); + let window_text = window_script.text.split('window.telegraaf.articleBodyBlocks')[1]; + if (window_text) + show_text(window_text, div_main); + } else { + removeDOMElement(paywall); + let url = window.location.href.split(/[#\?]/)[0]; + fetch(url) + .then(response => { + if (response.ok) { + response.text().then(html => { + if (html.includes('window.telegraaf.articleBodyBlocks')) { + let window_text = html.split('window.telegraaf.articleBodyBlocks')[1].split('')[0]; + if (window_text) + show_text(window_text, div_main); + } + }) + } + }) + } + article.after(div_main); + } + let ads = 'div.WebpushOptin, div[data-ad-position]'; + hideDOMStyle(ads); +} + +else if (matchDomain('tijd.be')) { + if (matchDomain('belegger.tijd.be')) { + let noscroll = document.querySelector('body.js-overflow-hidden'); + if (noscroll) + noscroll.classList.remove('js-overflow-hidden'); + let inert = document.querySelectorAll('[inert]'); + for (let elem of inert) + elem.removeAttribute('inert'); + let banners = document.querySelectorAll('div[class^="paywall-banner__"]'); + removeDOMElement(...banners); + } else { + let paywall = document.querySelector('html.paywall-active'); + if (paywall) { + paywall.classList.remove('paywall-active'); + let popup = document.querySelector('div[data-id="react-paywall-auth0"]'); + removeDOMElement(popup); + } + let overlay = document.querySelector('body[style]'); + if (overlay) + overlay.removeAttribute('style'); + } +} + +else if (matchDomain('vn.nl')) { + window.setTimeout(function () { + let paywall = document.querySelectorAll('section[class^="c-paywall"]'); + if (paywall.length && dompurify_loaded) { + removeDOMElement(...paywall); + let article = document.querySelector('div.c-article-content__container'); + if (article) { + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.article && json.props.pageProps.article.content) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json.props.pageProps.article.content, dompurify_options) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + article.innerHTML = ''; + article.appendChild(content_new); + } else + refreshCurrentTab(); + } catch (err) { + console.log(err); + } + } + } + } + let noscroll = document.querySelector('html[class]'); + if (noscroll) + noscroll.removeAttribute('class'); + }, 1000); +} + +else if (document.querySelector('head > link[href="//ppt.promedia.nl"]') || document.querySelector('head > script[src*="/pmgnews/scripts/promedia.js"]')) { + let paywall = document.querySelector('div.pmgsub'); + if (paywall) { + if (paywall.className.includes('pmgsub-nag-2')) { + let article = document.querySelector('div.post-body, div.text'); + if (article) { + let url = window.location.href; + article.firstChild.before(archiveLink(url)); + } + } + removeDOMElement(paywall); + } +} + +else + csDone = true; + +} else if (window.location.hostname.match(/\.pl$/) || matchDomain(['parkiet.com', 'wyborcza.biz'])) {//poland + +if (matchDomain('pb.pl')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + paywall.classList.remove('paywall'); + let article_hidden = paywall.querySelector('section.o-article-content'); + if (article_hidden) + article_hidden.removeAttribute('class'); + let loader = document.querySelector('div.o-piano-template-loader-box'); + removeDOMElement(loader); + } +} + +else if (matchDomain(pl_ringier_domains)) { + if (matchDomain('businessinsider.com.pl')) { + let paywall = document.querySelector('div#content-premium-offer'); + removeDOMElement(paywall); + } + let premium = document.querySelector('div.contentPremium[style]'); + if (premium) { + premium.removeAttribute('class'); + premium.removeAttribute('style'); + } + let ads = 'div.adPlaceholder , div[class^="Ad"][class*="Placeholder_"], div[data-placeholder-caption], div[data-run-module$=".floatingAd"], aside[data-ad-container], aside.adsContainer, [class^="pwAds"], .hide-for-paying, div.onet-ad, div.bottomBar, ad-default'; + hideDOMStyle(ads); +} + +else if (matchDomain('polityka.pl')) { + let paywall = document.querySelector('div.cg-article-salebox'); + if (paywall) { + removeDOMElement(paywall); + let elem_hidden = document.querySelectorAll('div.cg_article_meat > [style]'); + for (let elem of elem_hidden) + elem.removeAttribute('style'); + let fade = document.querySelector('article.article_status-cut'); + if (fade) + fade.classList.remove('article_status-cut'); + } +} + +else if (matchDomain(['rp.pl', 'parkiet.com'])) { + let paywall = document.querySelector('div.paywallComp'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div.article--content'); + if (article) { + let url = window.location.href; + article.firstChild.before(googleSearchToolLink(url)); + } + } +} + +else if (matchDomain(['wyborcza.biz', 'wyborcza.pl', 'wysokieobcasy.pl', 'magazyn-kuchnia.pl'])) { + let url = window.location.href; + func_post = function () { + let empty_spans = document.querySelectorAll('figure > a > span:empty'); + removeDOMElement(...empty_spans); + } + if (matchDomain(['wyborcza.biz', 'wyborcza.pl'])) + getArchive(url, 'div.article--content-fadeout', {rm_attrib: 'class'}, 'div.container[class*="pt"]', '', 'div.body > div:not([style*="background-color:"]):not([old-position])'); + else + getArchive(url, 'section.fade-out-article', {rm_attrib: 'class'}, 'article'); + let ads = 'div[id^="adUnit"], div[id^="ads-"]'; + hideDOMStyle(ads); +} + +else + csDone = true; + +} else if ((window.location.hostname.match(/\.(ie|uk)$/) && !matchDomain(['vogue.co.uk'])) || matchDomain(['apollo-magazine.com', 'autosport.com', 'decanter.com', 'fnlondon.com', 'ft.com', 'gbnews.com', 'granta.com', 'motorsportmagazine.com', 'newstatesman.com', 'scotsman.com', 'tes.com', 'thelawyer.com', 'thetimes.com', 'unherd.com'])) {//united kingdom/ireland + +if (matchDomain('apollo-magazine.com')) { + let banner = document.querySelector('#subscribe-ribbon'); + removeDOMElement(banner); +} + +else if (matchDomain('autocar.co.uk')) { + let paywall = document.querySelector('div.ms-block, div.register-block'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let article = document.querySelector('div.block-node'); + if (json_text && article) { + article.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + let fade = document.querySelector('div.article-section > div[style*="max-height"]'); + removeDOMElement(fade); + let url = window.location.href; + article.append(article_new, 'Text-only > for missing media/links: ', googleSearchToolLink(url)); + } + } + } + } + let ads = 'div[class*="-ads-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('autosport.com')) { + header_nofix('div.ms-article-content > p', 'div.ms-piano_article-banner'); +} + +else if (matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) { + let paywall = document.querySelector('div[class*="_fadetowhite"]'); + if (paywall && dompurify_loaded) { + let content = document.querySelector('script[data-fragment-type="ArticleContent"]'); + if (content) { + removeDOMElement(paywall); + let flip_pay = 'div#flip-pay'; + hideDOMStyle(flip_pay, 5); + let intro = document.querySelector('div > div[data-auth-intro="article"]'); + if (intro) { + let intro_par = intro.querySelector('p[class]'); + let intro_par_class; + if (intro_par) + intro_par_class = intro_par.getAttribute('class'); + let content_text = content.innerText; + if (content_text.includes('__PRELOADED_STATE_GRAPH')) { + content_text = content_text.replace(/window\["__PRELOADED_STATE_GRAPH__.+"\]\s=\s/, ''); + try { + let json = JSON.parse(content_text); + if (Object.keys(json).length) { + let key = Object.keys(json)[0]; + let pars = json[key].data.article.body; + let parser = new DOMParser(); + for (let par of pars) { + for (let type in par) { + let item = par[type]; + let elem = document.createElement('p'); + elem.setAttribute('style', "margin: 10px;"); + if (type === 'bullet_list') { + let ul = document.createElement('ul'); + for (let sub_item of item) { + let li = document.createElement('li'); + li.innerText = parseHtmlEntities(sub_item.replace(/<[^<]*>/g, '')); + ul.appendChild(li); + } + elem.appendChild(ul); + } else if (type === 'image') { + let url = item.url; + if (item.cropped && item.cropped.url) + url = item.cropped.url; + let figure = makeFigure(url, item.caption); + elem.appendChild(figure); + } else if (type === 'related') { + if (item.articles) { + let articles = item.articles; + for (let article of articles) { + let elem_link = document.createElement('a'); + elem_link.href = article.webcmsRelativeUrl; + elem_link.innerText = article.title; + elem_link.style = 'text-decoration: underline;'; + elem.append(elem_link, document.createElement('br')); + } + } + } else if (!['ad', 'quote', 'streamone'].includes(type)) { + let html = parser.parseFromString('

' + DOMPurify.sanitize(item, dompurify_options) + '

', 'text/html'); + elem = html.querySelector('p'); + let error_iframes = elem.querySelectorAll('iframe[allow*="fullscreen"][allowfullscreen]'); + for (let iframe of error_iframes) + iframe.removeAttribute('allowfullscreen'); + if (!['p', 'subhead', 'legacy-ml'].includes(type)) { + console.log(type); + console.log(item); + } + } + window.setTimeout(function () { + if (elem) + intro.parentNode.appendChild(elem); + }, 500); + } + } + } + } catch (err) { + console.log(err); + } + } + } + } + } + let ads = 'div.ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('businesspost.ie')) { + function bpie_main() { + if ($) { + let article_id_dom = document.querySelector('article[id]'); + let article_id; + if (article_id_dom) + article_id = article_id_dom.id; + if (article_id) { + let bp_ajaxurl = 'https://www.businesspost.ie/wp-admin/admin-ajax.php'; + let data_ajax = { + action: 'fetch_article_content', + type: 'POST', + data: { + id: article_id + }, + dataType: 'json', + contentType: 'application/json' + }; + $.ajax({ + type: 'POST', + url: bp_ajaxurl, + data: data_ajax, + success: function (data) { + window.postMessage({type: 'from_page', data: data}); + } + }); + } + } else + refreshCurrentTab(); + } + csDoneOnce = true; + window.setTimeout(function () { + let paywall = document.querySelector('div#bp_paywall_content'); + let article_id_dom = document.querySelector('article[id]'); + let article_id; + if (article_id_dom) + article_id = article_id_dom.id; + if (paywall || article_id) { + removeDOMElement(paywall); + insert_script(bpie_main); + } + }, 1500); +} + +else if (matchDomain('decanter.com')) { + let paywall = document.querySelector('div[id^="react_subscriber_content_"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let data = document.querySelector('div[data-dom-id^="react_subscriber_content_"][data-props]'); + if (data) { + try { + let json = JSON.parse(data.getAttribute('data-props')); + if (json && json.content) { + let content = decode_utf8(atob(json.content)); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(content, dompurify_options) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + data.before(content_new); + header_nofix('div.collection-wrapper', '', 'BPC > no fix for reviews'); + let fade = 'div.piano-container-fade'; + hideDOMStyle(fade); + } + } catch (err) { + console.log(err); + } + } + } +} + +else if (matchDomain('fnlondon.com')) { + let signin_links = 'div.fn-snippet-login-container'; + hideDOMStyle(signin_links); + let unfade = 'section[class^="css-"] {position: static !important;}'; + addStyle(unfade); + csDoneOnce = true; +} + +else if (matchDomain('ft.com')) { + func_post = function () { + let lazy_images = document.querySelectorAll('figure > picture > img[loading="lazy"][src^="data:image/gif"][new-cursrc]'); + for (let elem of lazy_images) { + elem.removeAttribute('loading'); + elem.style = 'width: 100%;'; + let figure = elem.parentNode.parentNode; + if (figure.parentNode && figure.parentNode.nodeName === 'DIV') + figure.parentNode.removeAttribute('style'); + elem.src = elem.getAttribute('new-cursrc'); + } + if (mobile) { + let grids = document.querySelectorAll('div[style*="grid-template-areas"], article#site-content'); + for (let elem of grids) + elem.style = 'margin: 10px;'; + } + } + let url = window.location.href; + getArchive(url, 'div#barrier-page', '', 'div.n-layout__row--content', '', 'div[style*="article-body"]', 'body'); + let banners = '.o-cookie-message, .js-article-ribbon, .o-ads, .o-banner'; + hideDOMStyle(banners); +} + +else if (matchDomain('gbnews.com')) { + let ads = 'div.ad--billboard, div.ad--placeholder, div.video-inbody'; + hideDOMStyle(ads); +} + +else if (matchDomain('granta.com')) { + getJsonUrl('div.article-sign-up-container', '', 'div.article-excerpt'); +} + +else if (matchDomain('investorschronicle.co.uk')) { + let paywall = document.querySelector('div#hard-barrier'); + if (paywall) { + removeDOMElement(paywall); + let url = window.location.href; + let article = document.querySelector('div.summary'); + if (article) + article.before(googleSearchToolLink(url)); + } + let ads = 'div[id$="ad-wrapper"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('literaryreview.co.uk')) { + getJsonUrl('p.subscribe-for-more', '', 'div#_articlereview'); +} + +else if (matchDomain('motorsportmagazine.com')) { + getJsonUrl('aside.paywall', '', 'div[data-behaviour="post-content"]'); + let banner = document.querySelector('div[data-behaviour="react-paywall-threshold"]'); + removeDOMElement(banner); + let ads = 'aside.ad-space'; + hideDOMStyle(ads); +} + +else if (matchDomain('newstatesman.com')) { + let ads = 'div.ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('spectator.co.uk')) { + let paywall_sel = 'section.paywall, div.paywall-magazine'; + let entry_content = document.querySelector('div.entry-content'); + if (entry_content) + getJsonUrl(paywall_sel, '', 'div.entry-content', {art_append: 1}); + else + getJsonUrl(paywall_sel, '', 'div.entry-content__wrapper', {art_append:1, art_hold:1, art_class: 'entry-content'}); + let ads = '#subscribe-ribbon, div.ad-slot, div[style*="background-image: linear-gradient"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('stylist.co.uk')) { + let paywall = document.querySelector('div[data-testid="paywall-component"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json.props.pageProps.data.post.acf.widgets) { + let url_next = json.props.pageProps.data.post.id; + if (url_next && !window.location.pathname.endsWith(url_next)) + refreshCurrentTab(); + let pars = json.props.pageProps.data.post.acf.widgets; + let first_par = document.querySelector('main div[data-column="true"] > p'); + if (first_par) { + let article = first_par.parentNode; + let teaser = article.querySelectorAll('div > p:not([class])'); + removeDOMElement(...teaser); + if (article) { + let parser = new DOMParser(); + for (let par of pars) { + let elem = document.createElement('p'); + if (par.paragraph) { + let content = par.paragraph; + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(content) + '
', 'text/html'); + elem = content_new.querySelector('div'); + } else if (par.acf_fc_layout === 'heading') { + if (par.text) + elem.appendChild(document.createTextNode(par.text)); + } else if (['image', 'interactive_image'].includes(par.acf_fc_layout)) { + let image_array = []; + if (par.image) + image_array = [par.image]; + else if (par.image_collection) + image_array = par.image_collection; + for (let img_elem of image_array) { + let figure = makeFigure(img_elem.url, img_elem.caption ? (img_elem.caption + ' ' + img_elem.description) : img_elem.alt, {alt: img_elem.alt, style: 'width: 95%;'}); + elem.appendChild(figure); + } + } else if (par.acf_fc_layout === 'listicle') { + let ul = document.createElement('ul'); + for (let sub_item of par.item) { + let li = document.createElement('li'); + if (sub_item.url) { + let par_link = document.createElement('a'); + par_link.href = sub_item.url; + par_link.innerText = sub_item.title; + par_link.target = '_blank'; + li.appendChild(par_link); + } else + li.innerText = sub_item.title; + if (sub_item.paragraph) { + let content = sub_item.paragraph; + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(content) + '
', 'text/html'); + let par_elem = content_new.querySelector('div'); + li.appendChild(par_elem); + } + if (sub_item.image) { + let img = document.createElement('img'); + img.src = sub_item.image.url; + img.alt = sub_item.image.alt; + img.style = 'width: 95%;'; + li.appendChild(img); + li.appendChild(document.createElement('br')); + } + li.style = 'font-size: 20px; margin: 20px 0px;'; + ul.appendChild(li); + } + elem.appendChild(ul); + } else if (par.embed_link) { + let par_link = document.createElement('a'); + par_link.href = par.embed_link; + par_link.innerText = 'Embedded link: ' + par.embed_link; + par_link.target = '_blank'; + elem.appendChild(par_link); + } else if (par.acf_fc_layout === 'divider') { + elem.appendChild(document.createElement('hr')); + } else if (par.acf_fc_layout === 'related_articles') { + if (par.posts) { + for (let post of par.posts) { + if (post.link && post.title.rendered) { + let par_link = document.createElement('a'); + par_link.href = post.link; + par_link.innerText = 'You may also like: ' + post.title.rendered; + elem.appendChild(par_link); + elem.appendChild(document.createElement('br')); + } + } + } + } else if (!['newsletter_signup', 'pull-quote'].includes(par.acf_fc_layout)) + console.log(par); + if (elem.hasChildNodes()) { + elem.style = 'font-family: "Source Serif Pro"; font-size: 20px; line-height: 34px;'; + article.appendChild(elem); + } + } + } + } + } + } catch (err) { + console.log(err); + } + } + } +} + +else if (matchDomain('telegraph.co.uk')) { + let subwall = '[class^="subwall"]'; + let ads = '.advert, .commercial-unit'; + hideDOMStyle(subwall + ', ' + ads); +} + +else if (matchDomain('tes.com')) { + let paywall = document.querySelector('div.tg-paywall-message'); + if (paywall) { + removeDOMElement(paywall); + let overlay = document.querySelector('div.tg-paywall-body-overlay'); + if (overlay) + overlay.removeAttribute('class'); + } + let banner = document.querySelector('div.js-paywall-info'); + removeDOMElement(banner); +} + +else if (matchDomain('the-tls.co.uk')) { + getJsonUrl('div.tls-single-article__closed-paywall', '', 'div.tls-article-body', {art_class: 'tls-article-body'}); + let fade = 'div.tls-single-article__closed-paywall-wrapper'; + let ads = 'div[class*="tls-single-article__ad-slot"]'; + hideDOMStyle(fade + ', ' + ads); +} + +else if (matchDomain('thelawyer.com')) { + if (window.location.pathname.startsWith('/mda/')) { + header_nofix('div.sf-content__post', 'div.sf-login-form', 'BPC > no fix'); + } else if (dompurify_loaded) { + let body = document.querySelector('body[class*="postid-"]'); + if (body) { + let article_id = body.className.split('postid-')[1].split(' ')[0]; + if (article_id) { + func_post = function () { + let lazy_images = document.querySelectorAll('img.lazy[data-src]:not([src])'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-src'); + elem.removeAttribute('class'); + } + } + getJsonUrl('div.sf-login-form', '', 'div.sf-content-body__text', {art_append: 1}, article_id, '', false, true); + } + } + } +} + +else if (matchDomain('theneweuropean.co.uk')) { + let paywall = document.querySelector('div[data-show-fade-on-noaccess]'); + if (paywall) { + removeDOMElement(paywall); + let content = document.querySelector('div[data-show-has-access]'); + if (content) + content.removeAttribute('data-show-has-access'); + } + let banners = document.querySelectorAll('div[data-show-subs-blocked]'); + removeDOMElement(...banners); +} + +else if (matchDomain('thestage.co.uk')) { + let url = window.location.href; + getArchive(url, 'div#ao-MeteringDNAllow', '', 'div[id^="aos-FeatureArticle2Col-"], div[id^="aos-ReviewArticle-"]'); +} + +else if (matchDomain(['thesun.co.uk', 'thescottishsun.co.uk'])) { + let ads = 'div.billboard, div.advert-wrapper'; + hideDOMStyle(ads); +} + +else if (matchDomain('thetimes.com')) { + let url = window.location.href; + if (window.location.hostname !== 'epaper.thetimes.com') { + func_post = function () { + let figure = document.querySelector('figure > div[style] > div[style]'); + if (figure) { + figure.removeAttribute('style'); + figure.parentNode.removeAttribute('style'); + } + let style_new = 'display: block; margin-left: auto; margin-right: auto; width: 90%;'; + let inline_images = document.querySelectorAll('img[style][src^="https"]'); + for (let elem of inline_images) { + elem.style = style_new; + elem.parentNode.removeAttribute('style'); + } + let headers = document.querySelectorAll('article:not([id]) div[style*="text-align"]'); + for (let elem of headers) + elem.style = style_new + ' text-align: center;'; + for (let n = 0; n < 5; n++) { + window.setTimeout(function () { + let page_scroll = document.querySelectorAll('html, body'); + for (let elem of page_scroll) + elem.style.overflow = 'auto'; + }, n * 500); + } + } + if (!url.includes('?shareToken=')) { + let teaser = document.querySelector('body[data-view-name="teaser-article"]'); + if (teaser) { + getArchive(url, 'div#paywall-portal-article-footer', '', 'article:not([id])'); + } + } + let paywall_page = document.querySelector('div#paywall-portal-page-footer'); + let block = document.querySelector('.subscription-block'); + removeDOMElement(paywall_page, block); + let ads = '#ad-article-inline, div#sticky-ad-header, div[class*="InlineAdWrapper"], div[class*="NativeAd"], div.gyLkkj'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('unherd.com')) { + let preview = document.querySelector('div#premiumpreview'); + if (preview) { + removeDOMElement(preview); + let premium = document.querySelector('div#premiumcontent'); + if (premium) + premium.removeAttribute('id'); + } +} + +else if (matchDomain(uk_nat_world_domains) || document.querySelector('footer > div a[href^="https://www.nationalworldplc.com"]')) { + let ads = 'div[class^="MarkupAds__Container-"], div[class*="_AdContainer-"], div[class^="Dailymotion__Wrapper-"], div.banner'; + hideDOMStyle(ads); +} + +else + csDone = true; + +} else if (window.location.hostname.match(/\.(ar|br|cl|mx|pe|uy)$/) || matchDomain(['abcmais.com', 'cambiocolombia.com', 'clarin.com', 'cronista.com', 'elespectador.com', 'elmercurio.com', 'eltiempo.com', 'eltribuno.com', 'eluniverso.com', 'exame.com', 'globo.com', 'latercera.com', 'revistaoeste.com'])) {//south america + +if (matchDomain('abcmais.com')) { + if (!window.location.pathname.endsWith('/amp/')) { + getJsonUrl('section#section-iframe-assinante', '', 'div.degressing-opacity'); + } else { + let paywall = document.querySelector('div.b-vindo'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let template = document.querySelector('template'); + if (template) { + let article = document.querySelector('section > div.resumo'); + if (article) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(template.innerHTML, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + article.parentNode.replaceChild(article_new, article); + } + } + } + } +} + +else if (matchDomain('abril.com.br')) { + if (window.location.pathname.endsWith('/amp/')) { + let paywall = document.querySelector('.piano-modal'); + removeDOMElement(paywall); + } else { + let ads = 'div.ads, div[class^="ads-"], div.MGID'; + hideDOMStyle(ads); + } +} + +else if (matchDomain(ar_grupo_clarin_domains)) { + let ads = 'div.ad-slot, div.box-adv, div.wrapperblock, div.banner, div[id^="div-gpt-ad-flotante"]'; + hideDOMStyle(ads); + let ads_inline = document.querySelectorAll('div > div.sticky, div > div.SRA, div > div[id^="div-gpt-ad-inread"], div > div[id^="div-gpt-ad-caja"], div > div[id^="div-gpt-ad-horizontal"]'); + for (let ad of ads_inline) + hideDOMElement(ad.parentNode); +} + +else if (matchDomain('cambiocolombia.com')) { + let author = document.querySelector('head > meta[name="author"]'); + if (author && !document.querySelector('article section')) + refreshCurrentTab(); + let ads = 'div[role="banner"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('cartacapital.com.br')) { + if (!window.location.pathname.endsWith('/amp/')) { + let paywall = document.querySelector('aside.paywall'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json[1].articleBody.replace(/\s{2,}/g, '\r\n\r\n'); + let content = document.querySelector('section.s-content__text'); + if (json_text && content) { + content.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + content.appendChild(article_new); + } + } + } catch (err) { + console.log(err); + } + } + } else { + let content_soft = document.querySelector('div.contentSoft'); + if (content_soft) { + content_soft.removeAttribute('class'); + let freemium = document.querySelectorAll('div[class^="s-freemium"], div.maggazine-add'); + removeDOMElement(...freemium); + } + } + let ads = 'div.div_ros_topo'; + hideDOMStyle(ads); + } else + ampToHtml(); +} + +else if (matchDomain('cronista.com')) { + let ads = 'div#ad-slot-header, div.ad-slot-intext, div#selectMediaNota, div.b-suscription-container'; + hideDOMStyle(ads); +} + +else if (matchDomain('crusoe.com.br')) { + getJsonUrl('section.paywall', '', 'div#content_post', {art_append: 1}); + let ads = 'div#gpt-leaderboard, div.ads_desktop, div[class^="container-banner-"], div.catchment-box'; + hideDOMStyle(ads); +} + +else if (matchDomain('diplomatique.org.br')) { + getJsonUrl('div.entry-content div.module_row', '', 'div.entry-content'); +} + +else if (matchDomain(pe_grupo_elcomercio_domains)) { + let paywall = document.querySelector('.paywall'); + if (paywall) { + paywall.removeAttribute('class'); + paywall.removeAttribute('style'); + let fade = document.querySelector('p.story-contents--fade'); + if (fade) + fade.classList.remove('story-contents--fade'); + } + let ads = 'div[class^="content_gpt"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('elespectador.com')) { + if (window.location.search.includes('outputType=amp')) { + amp_unhide_subscr_section('[class^="Widget"], amp-fx-flying-carpet', false); + let googledoc_iframes = document.querySelectorAll('div > amp-iframe[src^="https://docs.google.com/viewer"][class]'); + for (let elem of googledoc_iframes) { + let a_link = document.createElement('a'); + a_link.href = elem.getAttribute('src'); + a_link.innerText = 'pdf-link'; + a_link.target = '_blank'; + elem.removeAttribute('class'); + elem.parentNode.before(a_link); + } + } else { + amp_redirect('div.exclusive_validation'); + } +} + +else if (matchDomain('elobservador.com.uy')) { + if (window.location.pathname.endsWith('/amp')) { + amp_unhide_access_hide('="observador.mostrarNota"'); + let amp_images = document.querySelectorAll('div.fixed-container > amp-img.null'); + for (let amp_image of amp_images) { + let elem = document.createElement('img'); + Object.assign(elem, { + src: amp_image.getAttribute('src'), + alt: amp_image.getAttribute('alt'), + title: amp_image.getAttribute('title') + }); + amp_image.parentNode.replaceChild(elem, amp_image); + } + } else { + amp_redirect('div.mensaje_member', '', window.location.pathname + '/amp'); + } +} + +else if (matchDomain('eltiempo.com')) { + let modulos = document.querySelector('div.modulos'); + if (modulos) + modulos.classList.remove('modulos'); + let ads = '[class^="c-add"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('eltribuno.com')) { + let lazy_images = document.querySelectorAll('img.lazyload[data-src]:not([src])'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-src'); + elem.classList.remove('lazyload'); + } +} + +else if (matchDomain('eluniversal.com.mx')) { + let ads = 'div.dfp-tag-wrapper-container'; + hideDOMStyle(ads); +} + +else if (matchDomain('eluniverso.com')) { + let paywall = pageContains('div > span', /Contenido exclusivo para suscriptores/); + let article = document.querySelector('section.article-body'); + if (paywall.length && article && dompurify_loaded) { + removeDOMElement(paywall[0].parentNode); + let fusion_script = document.querySelector('script#fusion-metadata'); + if (fusion_script && fusion_script.text.includes('Fusion.globalContent=')) { + try { + let json = JSON.parse(fusion_script.text.split('Fusion.globalContent=')[1].split(';Fusion.')[0]); + if (json) { + article.innerHTML = ''; + let parser = new DOMParser(); + let pars = json.content_elements; + for (let par of pars) { + let par_new; + if (['header', 'text'].includes(par.type)) { + if (par.content) { + let doc = parser.parseFromString('

' + DOMPurify.sanitize(par.content) + '

', 'text/html'); + par_new = doc.querySelector('p'); + } + } else if (par.type === 'interstitial_link') { + if (par.url && par.content) { + par_new = document.createElement('p'); + int_link = document.createElement('a'); + int_link.href = par.url; + int_link.innerText = par.content; + par_new.appendChild(int_link); + } + } else if (par.type === 'image') { + if (par.url) { + let caption_text = par.caption; + if (par.credits && par.credits.by && par.credits.by[0] && par.credits.by[0].name) + caption_text += ' - ' + par.credits.by[0].name; + par_new = makeFigure(par.url, caption_text); + } + } else if (par.type === 'raw_html') { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.content, dompurify_options) + '
', 'text/html'); + par_new = doc.querySelector('div'); + } else if (par.raw_oembed) { + if (par.raw_oembed.html) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.raw_oembed.html, dompurify_options) + '
', 'text/html'); + par_new = doc.querySelector('div'); + } + } else if (par.type === 'list') { + if (par.items) { + par_new = document.createElement('ul'); + for (let item of par.items) { + let li = document.createElement('li'); + let doc = parser.parseFromString('' + DOMPurify.sanitize(item.content) + '', 'text/html'); + let span = doc.querySelector('span'); + li.appendChild(span); + par_new.appendChild(li); + } + } + } else if (par.type === 'table') { + if (par.header && par.rows) { + par_new = document.createElement('table'); + let h_row = document.createElement('tr'); + for (let item of par.header) { + let th = document.createElement('th'); + let doc = parser.parseFromString('' + DOMPurify.sanitize(item.content) + '', 'text/html'); + let span = doc.querySelector('span'); + th.appendChild(span); + h_row.appendChild(th); + } + par_new.appendChild(h_row); + for (let row of par.rows) { + let tr = document.createElement('tr'); + for (let item of row) { + let td = document.createElement('td'); + let doc = parser.parseFromString('' + DOMPurify.sanitize(item.content) + '', 'text/html'); + let span = doc.querySelector('span'); + td.appendChild(span); + tr.appendChild(td); + } + par_new.appendChild(tr); + } + } + } else if (!['quote'].includes(par.type)) { + console.log(par); + } + if (par_new) + article.appendChild(par_new); + } + } + } catch (err) { + console.log(err); + } + } + } + let ads = 'div[id^="ad-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('em.com.br')) { + if (!window.location.pathname.endsWith('/amp.html')) { + amp_redirect('.news-blocked-content'); + let ads = 'div.ads, div.containerads'; + hideDOMStyle(ads); + } else { + amp_unhide_subscr_section('amp-fx-flying-carpet'); + let compress_text = document.querySelector('div.compress-text'); + if (compress_text) + compress_text.classList.remove('compress-text'); + } +} + +else if (matchDomain('estadao.com.br')) { + if (window.location.pathname.match(/(\.amp$|^\/amp\/)/) || window.location.search.startsWith('?amp')) { + amp_unhide_access_hide('="outputValue=\'hide_paywall\'"', '="outputValue=\'show_paywall\'"', 'amp-fx-flying-carpet, div[class^="pAd"], div.ads-container'); + } else { + let paywall = document.getElementById('paywall-wrapper-iframe-estadao'); + removeDOMElement(paywall); + let ads = 'div[class^="styles__Container-sc-"]'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('exame.com')) { + window.localStorage.removeItem('pywllcount'); + let ads = 'div[id^="ads_"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('uol.com.br')) { + if (matchDomain('folha.uol.com.br')) { + if (matchDomain('piaui.folha.uol.com.br')) { + header_nofix('div.paywall__content', 'div.revista--interna__assineonly'); + } else if (window.location.pathname.startsWith('/amp/')) { + amp_unhide_subscr_section('amp-sticky-ad'); + } else { + let signup = document.querySelector('.c-top-signup'); + removeDOMElement(signup); + } + } else if (matchDomain('blogfolha.uol.com.br')) { + let hidden_images = document.querySelectorAll('div[id^="attachment_"] > a > img[src^="http:"][srcset]'); + for (let hidden_image of hidden_images) { + hidden_image.src = hidden_image.src.replace('http:', 'https:'); + hidden_image.srcset = ''; + } + } + let ads = 'div[class*="advertising"], div.jupiter-ads, div.up-floating, div[data-cp-id$="asfads"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('gauchazh.clicrbs.com.br')) { + window.setTimeout(function () { + let blink = document.querySelector('div:not(.hidden) > div:not([class]) > div.animate-pulse'); + if (blink) { + csDoneOnce = true; + refreshCurrentTab(); + } + }, 2000); + let ads = 'div.ad-banner'; + hideDOMStyle(ads); +} + +else if (matchDomain('gazetadopovo.com.br')) { + if (window.location.pathname.endsWith('/amp/')) { + amp_unhide_subscr_section('div.ads-amp, div.tpl-wrapper', false); + } else { + let ads = 'div[class*="c-ads"]'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('globo.com')) { + if (matchDomain('valor.globo.com')) { + if (!window.location.pathname.startsWith('/google/amp/')) { + amp_redirect('div.paywall'); + } else { + amp_unhide_subscr_section(); + amp_images_replace(); + } + } else if (window.location.pathname.includes('/amp/')) + ampToHtml(); + if (!window.location.pathname.includes('/amp/')) { + let ads = 'div[id^="ad-container"], div.content-ads, div[class^="block__advertising"], div#pub-in-text-wrapper, div.area_publicidade_container'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('ladiaria.com.uy')) { + if (window.location.search.startsWith('?display=amp')) { + csDoneOnce = true; + ampToHtml(); + } else { + let banners = document.querySelectorAll('div.softwall, div.subscribe-notice'); + removeDOMElement(...banners); + } +} + +else if (matchDomain('lagaceta.com.ar')) { + let ads = 'div.add'; + hideDOMStyle(ads); +} + +else if (matchDomain('lanacion.com.ar')) { + let ads = 'div.ln-banner-container'; + hideDOMStyle(ads); +} + +else if (matchDomain('latercera.com')) { + let paywall = document.querySelector('div.pw-frontier'); + if (paywall) + removeDOMElement(paywall); + let ads = 'div.spm'; + hideDOMStyle(ads); +} + +else if (matchDomain('nsctotal.com.br')) { + let ads = 'div.ad, div[id^="floater"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('revistaoeste.com')) { + if (window.location.pathname.startsWith('/revista/')) { + let loading_content = document.querySelector('div.loading_content'); + if (loading_content) + loading_content.removeAttribute('class'); + let spinner = document.querySelector('svg.spinner-eclipse'); + removeDOMElement(spinner); + let lazy_images = document.querySelectorAll('img[src^="data:image/"][data-src]'); + for (let elem of lazy_images) + elem.src = elem.getAttribute('data-src'); + } else { + let div_expandable = document.querySelector('div.expandable'); + if (div_expandable) + div_expandable.classList.remove('expandable'); + let ads = 'section.ad-wrapper, div.autozep-outer'; + hideDOMStyle(ads); + } +} + +else if (window.location.hostname.endsWith('.cl') && document.querySelector('head > meta[property="og:image"][content*="://impresa.soy-chile.cl/"]')) { + window.setTimeout(function () { + let content = document.querySelector('div.content'); + if (content) + content.setAttribute('id', 'content_new'); + let modal_wrapper = document.querySelector('div.modal-wrapper'); + removeDOMElement(modal_wrapper); + }, 1000); + waitDOMAttribute('body', 'BODY', 'class', node => node.removeAttribute('class'), true); + csDoneOnce = true; +} + +else + csDone = true; + +} else {//other (like com/org & not ar/at/au/be/br/cat/ch/cl/de/dk/fi/fr/es/ie/nl/pe/pt/se/uk/uy)) + +if (matchDomain(usa_adv_local_domains)) { + if (!window.location.search.startsWith('?outputType=amp')) { + let paywall_sel = 'div.paywall'; + let paywall = document.querySelector(paywall_sel); + let article = document.querySelector('div.entry-content'); + if (paywall && article && dompurify_loaded) { + function fusionGetContent(fusion_text) { + try { + let json = JSON.parse(fusion_text.split('Fusion.globalContent=')[1].split(';Fusion.')[0]); + if (json) { + let section = article.querySelector('div[style="display: none;"] > section'); + article.innerHTML = ''; + let parser = new DOMParser(); + let pars = json.content_elements; + for (let par of pars) { + let par_new; + if (['header', 'text'].includes(par.type)) { + if (par.content) { + let doc = parser.parseFromString('

' + DOMPurify.sanitize(par.content) + '

', 'text/html'); + par_new = doc.querySelector('p'); + } + } else if (par.image_type) { + if (par.url) { + let caption_text = par.caption; + if (par.credits && par.credits.by && par.credits.by[0] && par.credits.by[0].byline) + caption_text += ' - ' + par.credits.by[0].byline; + par_new = makeFigure(par.url, caption_text, {alt: par.alt_text}, {'class': 'article__image-caption'}); + par_new.className = 'article__image'; + par_new.style = 'width: 75%; margin-left: auto; margin-right: auto;'; + } + } else if (par.type === 'custom_embed') { + if (par.subtype === 'custom-image' && par.embed && par.embed.config) { + let config = par.embed.config; + if (config.image_src) { + let caption_text = config.image_caption; + if (config.image_credit) + caption_text += ' ' + config.image_credit; + par_new = makeFigure(config.image_src, caption_text, {}, {'class': 'article__image-caption'}); + par_new.className = 'article__image'; + } + } + } else if (par.raw_oembed) { + if (par.raw_oembed.html) { + let doc = parser.parseFromString('

' + DOMPurify.sanitize(par.raw_oembed.html, dompurify_options) + '

', 'text/html'); + par_new = doc.querySelector('p'); + } + } else if (par.type === 'list') { + if (par.items) { + par_new = document.createElement('ul'); + for (let item of par.items) { + let li = document.createElement('li'); + let doc = parser.parseFromString('' + DOMPurify.sanitize(item.content) + '', 'text/html'); + let span = doc.querySelector('span'); + li.appendChild(span); + par_new.appendChild(li); + } + } + } else if (!['quote', 'raw_html'].includes(par.type)) { + console.log(par); + } + if (par_new) + article.appendChild(par_new); + } + if (section) { + section.parentNode.removeAttribute('style'); + article.appendChild(section); + } + } + } catch (err) { + console.log(err); + } + } + let fusion_script = document.querySelector('script#fusion-metadata'); + if (fusion_script) { + paywall.classList.remove('paywall'); + if (fusion_script.text.includes('Fusion.globalContent=')) { + fusionGetContent(fusion_script.text); + } else { + let url = window.location.href.split(/[#\?]/)[0]; + fetch(url) + .then(response => { + if (response.ok) { + response.text().then(html => { + if (html.includes('Fusion.globalContent=')) + fusionGetContent(html); + }); + } + }); + } + } else + amp_redirect(paywall_sel, '', window.location.pathname + '?outputType=amp'); + } + } + let ads = 'div.ad, div.ad-inner, div.ad-unit, div#below-toprail, div[id^="taboola"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('ajc.com')) { + let paygate = document.querySelector('div.story-paygate_placeholder'); + if (paygate) + paygate.removeAttribute('class'); + let video_blocker = document.querySelector('div.video-blocker'); + removeDOMElement(video_blocker); +} + +else if (matchDomain('americanbanker.com') || matchDomain(usa_arizent_custom_domains)) { + let inline_gate = document.querySelector('.inline-gate'); + if (inline_gate) { + inline_gate.classList.remove('inline-gate'); + let inline_gated = document.querySelectorAll('.inline-gated'); + for (let elem of inline_gated) + elem.classList.remove('inline-gated'); + } +} + +else if (matchDomain('artnet.com')) { + if (window.location.pathname.endsWith('/amp-page')) { + amp_unhide_subscr_section(); + } else { + let body_hidden = document.querySelector('.article-body'); + if (body_hidden) + body_hidden.style = 'display:block;'; + let banner = document.querySelector('div[id^="issuem-leaky-paywall-"]'); + removeDOMElement(banner); + } +} + +else if (matchDomain('asia.nikkei.com')) { + let paywall = document.querySelector('div#paywall-offer'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div#article-body-preview > div'); + if (article) { + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.data.body) { + let json_text = json.props.pageProps.data.body; + if (!json_text.includes('
')) + json_text = '
' + json_text + '
'; + let parser = new DOMParser(); + let doc = parser.parseFromString(DOMPurify.sanitize(json_text, dompurify_options), 'text/html'); + let article_new = doc.querySelector('div'); + article.parentNode.replaceChild(article_new, article); + } else + refreshCurrentTab(); + } catch (err) { + console.log(err); + } + } + } + } + let banners = 'div#pianoj_ribbon, div#paywall-offer'; + hideDOMStyle(banners); +} + +else if (matchDomain('axios.com')) { + function axios_noscroll(node) { + node.removeAttribute('style'); + let overlay = 'div[class^="Modal_paywall"], div[class^="Modal_cta"]'; + hideDOMStyle(overlay, 2); + } + let noscroll = document.querySelector('html[style]'); + if (noscroll) + axios_noscroll(noscroll); + waitDOMAttribute('html', 'HTML', 'style', axios_noscroll, true); + let banners = 'div[data-cy="pro-paywall"], div.apexAd, div[class*="NativeAd"], span[data-ad-type]'; + hideDOMStyle(banners); + csDoneOnce = true; +} + +else if (matchDomain('balkaninsight.com')) { + getJsonUrl('div.subscribeWrapper', '', 'div.post_teaser', {art_append: 1, art_hold: 1}); +} + +else if (matchDomain(['barandbench.com', 'theleaflet.in', 'thenewsminute.com'])) { + let paywall = document.querySelector('div[id*="paywall-banner"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div.paywall'); + if (article) { + let article_new = getArticleQuintype(); + if (article_new && article.parentNode) + article.parentNode.replaceChild(article_new, article); + } + } +} + +else if (matchDomain('barrons.com')) { + if (window.location.pathname.startsWith('/livecoverage/')) { + window.setTimeout(function () { + fix_dowjones_live(); + }, 1500); + } else { + let paywall = document.querySelector('div#cx-interstitial-snippet, div[data-id^="ArticleRoadblock_"]'); + if (paywall) { + removeDOMElement(paywall); + window.setTimeout(function () { + let articles = document.querySelectorAll('article > div.crawler'); + let article; + for (let elem of articles) { + let paragraph = elem.querySelector('p[class*="Paragraph"]'); + if (paragraph) { + article = elem; + break; + } + } + if (article) { + let article_id_dom = document.querySelector('head > meta[name="article.id"][content]'); + if (article_id_dom) { + let article_id = article_id_dom.content; + let url_src = 'https://barrons.djmedia.djservices.io/apps/barrons/theaters/default-article?screen_ids=' + article_id; + let x_access_token = cs_param['x-access-token'] || "eyJhbGciOiJSUzI1NiJ9.WFZsaHN3MXd3Smw0V3kwRXBzclQ.qwwBedAUNXHTQchowQZ5zMwmnXqDKeMhoRJlkB7drjWmb0ktZCScIhq5lpIiWaMyNJA_ODYgHAfIoi7DKWkS8g8GunFNAXpJDUOLdI2rtQkTEi_E3o90rdZHunPR7p0ULjRmHCnDofAdpTQdJtTXjQ9eEDZT2xoooVGdBpoVKhE"; + getExtFetch(url_src, '', {headers: {"app-identifier": "http://com.news.screens", "device-type": "phone", "x-access-token": x_access_token}}, main_barrons); + function main_barrons(url_src, data) { + try { + if (data) { + let json = JSON.parse(data); + if (json && json.screens[0] && json.screens[0].frames) { + let pars = json.screens[0].frames; + let par_class; + let intro = article.querySelector('p[class]'); + if (intro) + par_class = intro.className; + let body_first = true; + article.innerHTML = ''; + for (let par of pars) { + let elem = document.createElement('p'); + if (par_class) + elem.className = par_class; + if (par.type === 'body') { + if (par.body && par.styleID !== 'article-summary-body') { + if (body_first && intro) { + elem = intro; + body_first = false; + } else + elem.innerText = par.body.text.replace(/\s_/g, ''); + } + } else if (par.type === 'listelement') { + if (par.body) + elem.innerText = ' • ' + par.body.text; + } else if (par.type === 'image') { + if (par.image && par.image.url) { + let caption = (par.caption ? par.caption.text + ' - ' : '') + (par.credit ? par.credit.text : ''); + elem = makeFigure(par.image.url, caption, {style: 'width: 80%; margin: auto;'}); + } + } else if (par.type === 'dynamicinset') { + if (par.webview && par.webview.value) { + let iframe = document.createElement('iframe'); + iframe.src = par.webview.value; + iframe.style = 'height: 600px; width: 100%; border: none;'; + elem.appendChild(iframe); + } + } else if (par.type === 'video') { + let video_thumbnail = makeFigure(par.thumbnail.url, par.description.text, {style: 'width: 80%; margin: auto;'}); + let video_link = document.createElement('a'); + video_link.href = par.url; + video_link.innerText = 'Video-link (open in media player): ' + par.url; + elem.append(video_thumbnail, video_link); + } else if (!['ad', 'audioplayer', 'byline', 'caption', 'title'].includes(par.type)) { + console.log(par); + } + if (elem.hasChildNodes()) + article.appendChild(elem); + } + } + } + } catch (err) { + console.log(err); + } + } + } + } + }, 2000); + } + } + let signin_links = document.querySelectorAll('p > a[href^="https://www.barrons.com/client/login"][href*="target="]'); + for (let elem of signin_links) { + elem.href = decodeURIComponent(elem.href.split('target=')[1].split('&')[0]); + elem.innerText = 'Open'; + elem.target = '_top'; + } + let ads = document.querySelectorAll('div[class] > div.uds-ad-container'); + for (let ad of ads) + hideDOMElement(ad.parentNode); +} + +else if (matchDomain('benzinga.com')) { + function benz_main(node) { + removeDOMElement(node); + let blurred = document.querySelector('div.article-content-paywalled'); + if (blurred) { + blurred.classList.remove('article-content-paywalled'); + let key_points = document.querySelectorAll('li.blur-sm'); + for (let elem of key_points) + elem.classList.remove('blur-sm'); + let article = document.querySelector('div#article-body'); + if (article) { + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.article.primaryImage) { + let img_data = json.props.pageProps.article.primaryImage; + if (img_data.url) { + let img = document.createElement('img'); + img.src = img_data.url; + img.alt = img_data.alt; + article.before(img); + } + } + } catch (err) { + console.log(err); + } + } + } + } + } + waitDOMElement('div.paywall-content', 'DIV', benz_main, false); + csDoneOnce = true; +} + +else if (matchDomain('bhaskar.com')) { + if (!window.location.pathname.startsWith('/amp/')) { + let paywall_sel = 'div.paywallBlockedContent'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + let banner = document.querySelector(paywall_sel + ' ~ div'); + if (banner) + removeDOMElement(banner); + paywall.removeAttribute('class'); + } + let ads = document.querySelectorAll('div[style*="overflow:hidden"][style*="max-height:"], div[id^="Ad--"], article div:empty'); + if (ads) + removeDOMElement(...ads); + } else + ampToHtml(); +} + +else if (matchDomain('bizjournals.com')) { + if (window.location.pathname.includes('/subscriber-only/')) { + header_nofix('div.primary'); + } else { + window.setTimeout(function () { + let dialog = document.querySelector('div[id^="headlessui-dialog-"], div.sheet-overlay'); + if (dialog) { + removeDOMElement(dialog); + let html = document.querySelector('html[style]'); + if (html) + html.removeAttribute('style'); + let overlays = document.querySelectorAll('html.is-overlaid, body.is-overlaid'); + for (let elem of overlays) + elem.classList.remove('is-overlaid'); + let nuxt_inert = document.querySelector('div#__nuxt[inert]'); + if (nuxt_inert) + nuxt_inert.removeAttribute('inert'); + } + }, 1000); + } + let ads = 'div.adwrap'; + hideDOMStyle(ads); +} + +else if (matchDomain('bloomberg.com')) { + let paywall_sel = 'div[id^="fortress-"]'; + let paywall = paywall_sel; + let leaderboard = 'div[id^="leaderboard"], div[class^="leaderboard"], div.canopy-container'; + let ads = 'div[data-ad-status], div[data-ad-type], div[class*="FullWidthAd_"], div.adWrapper'; + hideDOMStyle(paywall + ', ' + leaderboard + ', ' + ads); + csDoneOnce = true; + waitDOMElement(paywall_sel, 'DIV', removeDOMElement, true); + waitDOMAttribute('body', 'BODY', 'data-paywall-overlay-status', node => node.removeAttribute('data-paywall-overlay-status'), true); + if (window.location.pathname.startsWith('/live/')) { + setInterval(function () { + window.localStorage.clear(); + }, 15 * 60 * 1000); + } + window.setTimeout(function () { + let shimmering = document.querySelector('article.first-story div[class*="Placeholder_placeholderParagraphWrapper-"]'); + if (shimmering) { + header_nofix(shimmering.parentNode, '', 'BPC > disable Dark Reader or enable JavaScript for site'); + } + }, 5000); +} + +else if (matchDomain('bloombergadria.com')) { + let article_hidden = document.querySelector('article[style]'); + if (article_hidden) + article_hidden.removeAttribute('style'); + let ads = '.banner'; + hideDOMStyle(ads); +} + +else if (matchDomain('bostonglobe.com')) { + if (window.location.search.startsWith('?outputType=amp')) + amp_unhide_subscr_section(); +} + +else if (matchDomain('bt.no')) { + let ads = 'div[class^="advertory-bt-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('business-standard.com')) { + function bs_main(node) { + removeDOMElement(node); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.data.htmlContent) { + let json_text = json.props.pageProps.data.htmlContent; + let content = document.querySelector('div[class^="MainStory_storycontent__"'); + if (json_text && content) { + content.innerHTML = ''; + let intro = content.querySelectorAll('div:not([class]'); + removeDOMElement(...intro); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + window.setTimeout(function () { + content.appendChild(content_new); + }, 1000); + } + } else + refreshCurrentTab(); + } catch (err) { + console.log(err); + } + } + } + if (!window.location.pathname.startsWith('/amp/')) { + if (dompurify_loaded) { + let paywall_sel = 'div.subscribe-page'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + bs_main(paywall) + } else { + csDoneOnce = true; + waitDOMElement(paywall_sel, 'DIV', bs_main, false); + } + } + let banner = 'section.sbcrbtmlfull'; + let ads = 'div.advertisement-bg, div[id^="between_article_content_"]'; + hideDOMStyle(banner + ', ' + ads); + } else + ampToHtml(); +} + +else if (matchDomain('businessinsider.com')) { + let ads = 'div.masthead-ad, div.l-ad, div.in-post-sticky, aside.has-video-ad, div.ad-callout-wrapper'; + hideDOMStyle(ads); +} + +else if (matchDomain('businessinsider.jp')) { + let paywall = document.querySelector('div.piano-paywall-container[hidden]'); + if (paywall) + paywall.removeAttribute('hidden'); +} + +else if (matchDomain('businessoffashion.com')) { + if (window.location.search.startsWith('?outputType=amp')) { + amp_unhide_access_hide(); + } else { + let ads = 'div[class^="default__AdsBlockWrapper"]'; + hideDOMStyle(ads); + } +} + +else if (matchDomain(ca_gcm_domains)) { + let paywall = document.querySelector('div._block_1dgevo'); + if (paywall) { + removeDOMElement(paywall); + refreshCurrentTab(); + } + let counter = document.querySelector('div#paywall-banner-content'); + removeDOMElement(counter); +} + +else if (matchDomain('capital.bg')) { + let paywall = document.querySelector('div.paywall-story'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let img_main = document.querySelector('div.story--header picture > img[src]'); + let article = document.querySelector('div.story-content'); + if (json_text && article) { + let article_new = document.createElement('p'); + let json_pars = parseHtmlEntities(json_text).replace(/\s{2,}/g, '\r\n\r\n').split(/[\[\]]{2}/); + for (let elem of json_pars) { + let par; + if (!elem.match(/[\[\]]{2}/)) { + if (elem.match(/img:\d+/)) { + if (img_main) { + let img_new_id = elem.split('img:')[1]; + if (img_new_id) { + par = document.createElement('img'); + par.src = img_main.src.replace(/_\d+\./, '_' + img_new_id + '.').split('?')[0]; + par.style = 'margin: 20px; width: 90%;'; + } + } + } else if (!elem.match(/quote:\d+/)) { + par = document.createElement('p'); + par.innerText = elem; + } + } + if (par) + article.appendChild(par); + } + } + } + } + } +} + +else if (matchDomain('cen.acs.org')) { + let meteredBar = document.querySelector('.meteredBar'); + removeDOMElement(meteredBar); +} + +else if (matchDomain(['chronicle.com', 'philanthropy.com'])) { + let preview = document.querySelector('div[data-content-summary]'); + removeDOMElement(preview); + let article_hidden = document.querySelector('div[class~="contentBody" i][hidden]'); + if (article_hidden) { + let attributes = [...article_hidden.attributes].filter(x => x.name !== 'class'); + for (let elem of attributes) + article_hidden.removeAttribute(elem.name); + } + let ads = 'div.GoogleDfpAd-container'; + hideDOMStyle(ads); +} + +else if (matchDomain('citywire.com')) { + let ads = 'div.cw-top-advert'; + hideDOMStyle(ads); +} + +else if (matchDomain('cnbc.com')) { + let paywall = document.querySelector('div.ArticleGate-proGate'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div.ArticleBody-articleBody'); + if (article) + article.style = "margin: 20px; font-family: Lyon,Helvetica,Arial,sans-serif; font-size: 18px; line-height: 1.66"; + let span_hidden = document.querySelectorAll('span[hidden]'); + for (let elem of span_hidden) { + elem.removeAttribute('hidden'); + elem.removeAttribute('class'); + if (elem.innerText) + elem.innerText = elem.innerText.split('DISCLOSURES: (None)')[0]; + } + let inline_image = document.querySelector('div[data-test="InlineImage"]'); + if (inline_image) + article.firstChild.before(inline_image); + } +} + +else if (matchDomain('cnn.com')) { + let subwall = document.querySelector('div[data-component-id="subwall"]'); + if (subwall) { + removeDOMElement(subwall); + let noscroll = document.querySelectorAll('html[style], body[style]'); + for (let elem of noscroll) + elem.removeAttribute('style'); + waitDOMAttribute('html', 'HTML', 'style', node => node.removeAttribute('style'), true); + waitDOMAttribute('body', 'BODY', 'style', node => node.removeAttribute('style'), true); + } + let regwall_keys = Object.keys(window.localStorage).filter(x => x.match(/reg_?wall/i)); + for (let item of regwall_keys) + window.localStorage.removeItem(item); + let ads = 'div[class^="ad-slot-"], div.container__ads'; + hideDOMStyle(ads); +} + +else if (matchDomain('csmonitor.com')) { + let paywall = document.querySelector('div.paywall'); + removeDOMElement(paywall); +} + +else if (matchDomain('cw.com.tw')) { + header_nofix('div.article__content', 'div.paywall', 'BPC > no fix'); +} + +else if (matchDomain('cyclingnews.com')) { + let paywall = document.querySelector('div.paywall-locker'); + if (paywall) { + paywall.classList.remove('paywall-locker'); + let banner = 'div.kiosq-main-layer'; + hideDOMStyle(banner); + } +} + +else if (matchDomain('dagsavisen.no')) { + // plus code in contentScript_once_var.js (timing) + header_nofix('div#paywall', '', 'BPC > hard refresh page'); + let ads = 'div.arcad-block-container'; + hideDOMStyle(ads); +} + +else if (matchDomain('dailywire.com')) { + let paywall = document.querySelector('div#payed-article-paywall'); + if (paywall) { + removeDOMElement(paywall); + let div_hidden = document.querySelector('#post-body-text > div > div[class]'); + if (div_hidden) + div_hidden.removeAttribute('class'); + } + let ads = 'div.ad-wrapper'; + hideDOMStyle(ads); +} + +else if (matchDomain('dallasnews.com')) { + if (window.location.search.startsWith('?outputType=amp')) { + amp_unhide_subscr_section(); + } +} + +else if (matchDomain('defector.com')) { + let paywall = document.querySelector('div[class^="ContentGate_wrapper__"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article_sel = 'div[class^="PostContent_wrapper__"]'; + let article = document.querySelector(article_sel); + if (article) { + window.setTimeout(function () { + let pars = article.querySelectorAll('p'); + if (pars.length < 3) { + let url = window.location.href.split('?')[0]; + replaceDomElementExt(url, false, false, article_sel); + } + }, 1000); + } + } +} + +else if (matchDomain('denik.cz')) { + let video_sources = document.querySelectorAll('video[id] > source[src]'); + for (let elem of video_sources) { + let iframe = document.createElement('iframe'); + iframe.src = elem.src; + iframe.style = 'width: 100%; height: 100%;'; + let video = elem.parentNode; + video.parentNode.replaceChild(iframe, video); + } +} + +else if (matchDomain(['digiday.com', 'glossy.co', 'modernretail.co'])) { + let ads = 'div[class^="ad_"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('discovermagazine.com')) { + window.setTimeout(function () { + let mammoth = document.querySelector('.iXVGnF'); + if (mammoth) + refreshCurrentTab(); + let body = document.querySelector('body'); + if (body) + body.style = 'overflow: auto !important;'; + let banners = 'div.fIkXwQ, div[style*="fadeIn"], div[role="button"][aria-label="Dismiss Dialog"]'; + hideDOMStyle(banners); + }, 1000); +} + +else if (matchDomain('dwell.com')) { + if (window.location.pathname.match(/^(\/amp)?\/article\//)) { + if (!window.location.search.startsWith('?rel=plus')) { + let paywall = pageContains('div > a', /Try Dwell\+ for FREE/); + if (paywall.length) { + removeDOMElement(paywall[0]); + window.location.href = window.location.pathname.replace(/^\/amp/, '') + '?rel=plus'; + } + } else { + let paywall = document.querySelector('div#mainPanel div[class^="FCR_"]'); + let article = document.querySelector('div > section[class]'); + if (paywall && article && dompurify_loaded) { + removeDOMElement(paywall); + article.classList.remove('_2S7l9_l2eDI5b8DSR29ijf'); + let filter = /^window\.INITIAL_STATE\s?=\s?/; + let json_script = getSourceJsonScript(filter); + if (json_script) { + let split1 = json_script.text.split(filter)[1]; + let state = (split1.split('};')[0] + '}'); + if (state) { + try { + let json = JSON.parse(state); + if (json) { + let items = json.articles.items; + let id = Object.keys(items)[0]; + let photos = json.photos ? json.photos.items : ''; + let json_text = items[id].attributes.body.replace(/(
||<\/span>)/g, ''); + function find_img_url(match, p1, p2, offset, string) { + let contributorId; + let format; + if (photos && photos[p1]) { + contributorId = photos[p1].attributes.userId; + format = photos[p1].attributes.format; + } + let result = '

missing photo: ' + p1 + '

'; + if (contributorId) + result = '
' + p2 + '
'; + return result; + } + json_text = json_text.replace(//g, find_img_url); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('section'); + article.parentNode.replaceChild(article_new, article); + } + } catch (err) { + console.log(err); + } + } + } + } + let photo_links = document.querySelectorAll('div > a[href^="' + window.location.pathname.replace(/\/\d{8,}/, '') + '"]'); + for (let elem of photo_links) + elem.href += '?rel=plus'; + let close_button = document.querySelector('header > div > span > svg'); + if (!document.querySelector('a#bpc_close') && close_button) { + let elem = document.createElement('a'); + elem.href = window.location.pathname.split('?')[0].replace(/\/\d{8,}/, ''); + elem.id = 'bpc_close'; + elem.innerText = 'close'; + elem.style.color = 'white'; + close_button.parentNode.parentNode.appendChild(elem); + } + } + } + let ads = 'div.EYrS5iukqzJMkNAcFQ0ho'; + hideDOMStyle(ads); +} + +else if (matchDomain('economictimes.com')) { + if (window.location.pathname.includes('/amp_')) { + let paywall = document.querySelector('.paywall_wrap'); + if (paywall && dompurify_loaded) { + let content = document.querySelector('.paywall[style="display:none;"]'); + if (content) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(content.innerText, dompurify_options) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + if (content_new && content.parentNode) + content.parentNode.replaceChild(content_new, content); + } else + window.location.href = 'https://economictimes.indiatimes.com' + window.location.pathname.replace('amp_prime', 'prime'); + let intro = document.querySelector('.art_wrap'); + let article_blocker = document.querySelector('.articleBlocker'); + removeDOMElement(paywall, intro, article_blocker); + let ads = 'amp-ad'; + hideDOMStyle(ads); + } + } else { + window.setTimeout(function () { + let paywall = document.querySelector('div#blocker_layer'); + let data_prime = document.querySelector('div[data-prime="1"]'); + let amphtml = document.querySelector('head > link[rel="amphtml"]'); + if (paywall || data_prime) { + removeDOMElement(paywall); + if (data_prime) + data_prime.removeAttribute('data-prime'); + if (amphtml) + amp_redirect_not_loop(amphtml); + else if (window.location.pathname.startsWith('/epaper/')) + window.location.href = 'https://economictimes.indiatimes.com' + window.location.pathname; + } else { + let ads = '.adContainer'; + hideDOMStyle(ads); + } + }, 500); + } +} + +else if (matchDomain('economictimes.indiatimes.com')) { + let paywall = document.querySelector('section.prime_paywall'); + if (paywall) { + removeDOMElement(paywall); + let content = document.querySelector('div.content1, div.artText'); + let full_text = document.querySelector('div.paywall.p1'); + if (content && full_text) + content.innerText = full_text.innerText; + let page_content = document.querySelector('div.pageContent:not([style])'); + if (page_content) + page_content.setAttribute('style', 'height: auto !important;'); + let article_wrap = document.querySelector('div.article_wrap[style]'); + if (article_wrap) + article_wrap.removeAttribute('style'); + } + if (mobile) { + let pageholder = document.querySelector('main.pageHolder'); + if (pageholder) { + pageholder.classList.remove('pageHolder'); + let header = document.querySelector('header'); + if (header) + header.style = 'width: 100% !important;'; + let f_col = document.querySelector('div.f_col'); + removeDOMElement(f_col); + } + } +} + +else if (matchDomain('economist.com')) { + let ads = 'div[class*="adComponent"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('enotes.com')) { + let paywall = document.querySelector('section#enotes-paywall'); + if (paywall) { + let section_words = pageContains('p', /\(This entire section contains/); + removeDOMElement(paywall, ...section_words); + ext_api.runtime.sendMessage({request: 'clear_cookies_domain', data: {domain: 'enotes.com'}}); + let blurred = document.querySelectorAll('div.u-paywall'); + for (let elem of blurred) + elem.className = 'o-rte-text u-space--top'; + let ads = document.querySelectorAll('div:not([class]) > div[id^="div-gpt-ad-"]'); + for (let ad of ads) + hideDOMElement(ad.parentNode); + } +} + +else if (matchDomain('epoch.org.il')) { + getJsonUrl('div.register-login-box', '', 'div.paywall'); +} + +else if (matchDomain('espn.com')) { + let url = window.location.href; + getArchive(url, 'aside.espn-plus-container-wrapper', '', 'section#article-feed > article'); +} + +else if (matchDomain('euobserver.com')) { + let paywall = pageContains('div > div > button > div > span', /^Register$/); + if (paywall.length && dompurify_loaded) { + let article = paywall[0].parentNode.parentNode.parentNode.parentNode; + if (article) { + let filter = /^window\.__basedcache__\s?=\s?/; + let json_script = getSourceJsonScript(filter); + if (json_script) { + try { + let json = JSON.parse(json_script.text.split(filter)[1]); + if (json) { + let body = findKeyJson(json, ['body']); + if (body) { + article.innerHTML = ''; + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(body, dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + let pars = article_new.querySelectorAll('p.rte-p'); + for (let par of pars) + par.style = 'margin: 20px 0px;'; + article.appendChild(article_new); + } + } + } catch (err) { + console.log(err); + } + } + } + } +} + +else if (matchDomain('fastcompany.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let filter = /\\"content\\":\[/; + let json_script = getSourceJsonScript(filter, ':not([id], [src], [type])'); + if (json_script) { + try { + let json = JSON.parse('[' + json_script.text.split(filter)[1].split(/\],\\"/)[0].replace(/\\\\\\"/g, '\\"').replace(/(\[|,)\\"/g, '$1"').replace(/\\"(\]|,)/g, '"$1').replace(/\\\\n/g, '') + ']'); + if (json) { + let article = document.querySelector('article'); + if (article) { + article.innerHTML = ''; + article.className = 'article-container'; + let parser = new DOMParser(); + for (let pars of json) + for (let par of pars) { + if (!par.match(/^\$\w{2}$/)) { + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(par, dompurify_options) + '
', 'text/html'); + let elem = content_new.querySelector('div'); + let img_srcset_drop = elem.querySelectorAll('figure > img[srcset]'); + for (let img of img_srcset_drop) + img.removeAttribute('srcset'); + article.appendChild(elem); + } + } + } + } + } catch (err) { + console.log(err); + } + } + } + let ads = 'div[class*="ad-wrapper"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('fieldandstream.com')) { + let overlay = document.querySelectorAll('div[class^="mailmunch-"]'); + removeDOMElement(...overlay); + let noscroll = document.querySelector('html.mailmunch-pop-open'); + if (noscroll) + noscroll.removeAttribute('class'); +} + +else if (matchDomain('financialexpress.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) + paywall.classList.remove('paywall'); + let register = 'div.pcl-wrap'; + let ads_selector = window.location.pathname.endsWith('/lite/') ? '.ad-bg-container' : 'div[class*="-ads-blocks-ad-unit"]'; + hideDOMStyle(register + ', ' + ads_selector); +} + +else if (matchDomain('firstthings.com')) { + let paywall = document.querySelector('.paywall'); + removeDOMElement(paywall); +} + +else if (matchDomain('forbes.com')) { + waitDOMAttribute('html', 'HTML', 'class', node => node.removeAttribute('class'), true); + waitDOMAttribute('body', 'BODY', 'class', node => node.removeAttribute('class'), true); + csDoneOnce = true; + if (window.location.pathname.startsWith('/newsletters/')) { + let paywall = document.querySelector('div > div.newsletter-teaser'); + if (paywall) { + paywall.classList.remove('newsletter-teaser'); + let header = paywall.parentNode; + header_nofix(header); + } + } + let ads = 'fbs-ad, div.inlineAdContainer'; + hideDOMStyle(ads); +} + +else if (matchDomain('forbes.ua')) { + let paywall = document.querySelector('div.js-closed-part'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = parseHtmlEntities(json.articleBody).replace(/\n/g, "$&\r\n"); + let article = document.querySelector('div.c-post-text'); + if (json_text && article) + article.innerText = json_text; + } + } + } +} + +else if (matchDomain('foreignaffairs.com')) { + window.setTimeout(function () { + let paywall = document.querySelector('.paywall'); + let loading_indicator = document.querySelector('.loading-indicator'); + let msg_bottom = document.querySelector('.messages--container--bottom'); + removeDOMElement(paywall, loading_indicator, msg_bottom); + let article_dropcap = document.querySelectorAll('.article-dropcap'); + for (let elem of article_dropcap) + elem.classList.add('loaded'); + }, 1000); +} + +else if (matchDomain('foreignpolicy.com')) { + let content_ungated = document.querySelector('div.content-ungated'); + if (content_ungated && dompurify_loaded) { + removeDOMElement(content_ungated); + let content_gated = document.querySelector('div.content-gated'); + if (content_gated) { + let insider = document.querySelector('body.is-fp-insider'); + if (insider) { + getJsonUrl('div.content-gated', {rm_class: 'content-gated'}, 'div.content-gated'); + window.setTimeout(function () { + let lazy_images = document.querySelectorAll('img[loading="lazy"]'); + for (let elem of lazy_images) + elem.removeAttribute('loading'); + }, 1000); + } else + content_gated.classList.remove('content-gated'); + } + } +} + +else if (matchDomain('fortune.com')) { + let paywall = document.querySelector('div.paywallActive'); + if (window.location.pathname.match(/\/amp(\/)?/)) { + amp_unhide_access_hide('="NOT p.showRegWall AND NOT p.showPayWall"', '="p.showPayWall"', '[class^="amp-ad"], div.paywall'); + } else { + if (paywall) + paywall.removeAttribute('class'); + let banners = 'div.daBnAu, div.trinity-player, div:empty'; + hideDOMStyle(banners); + } +} + +else if (matchDomain('foxnews.com')) { + let paywall = document.querySelector('div.article-gating-wrapper'); + removeDOMElement(paywall); + let overlay = document.querySelector('div[class*="gated-overlay"]'); + if (overlay) + overlay.removeAttribute('class'); +} + +else if (matchDomain('ftm.eu')) { + let videos = document.querySelectorAll('div.body > div.video-pp'); + for (let video of videos) { + let video_id_dom = video.querySelector('a.video[data-youtube-id]'); + if (video_id_dom) { + video_new = document.createElement('iframe'); + video_new.src = 'https://www.youtube.com/embed/' + video_id_dom.getAttribute('data-youtube-id'); + video_new.style = 'width: 95%; height: 400px; margin: 0px 20px;'; + video.parentNode.replaceChild(video_new, video); + } + } + let audio_controls = document.querySelectorAll('audio[controls][style]'); + for (let elem of audio_controls) + elem.removeAttribute('style'); + document.querySelectorAll('div.foldable').forEach(e => e.classList.remove('foldable')); + let banners = 'div.banner-pp'; + hideDOMStyle(banners); +} + +else if (domain = matchDomain(['haaretz.co.il', 'haaretz.com', 'themarker.com'])) { + if (window.location.pathname.match(/\/ty-article/)) { + let mh = document.querySelector('div[data-test="masthead"]'); + if (!mh) { + let article = document.querySelector('main'); + if (article) { + let mh_new = document.createElement('div'); + mh_new.style = 'font-size: 20px; font-weight: bold; text-align: center; margin: 20px;'; + mh_new.setAttribute('data-test', 'masthead'); + let main = document.createElement('a'); + main.href = 'https://www.' + domain; + main.innerText = domain.toUpperCase(); + mh_new.appendChild(main); + article.before(mh_new); + } + } + } + let history_keys = Object.keys(window.localStorage).filter(x => x.match(/^(reading(Count)?History|raData)/i)); + for (let item of history_keys) + window.localStorage.removeItem(item); +} + +else if (matchDomain('hbr.org')) { + if (window.location.pathname.startsWith('/data-visuals')) { + let feed_entries = document.querySelectorAll('li.feed-entry'); + for (let feed_entry of feed_entries) { + let download = feed_entry.querySelector('span.entry-download > a[href*="/undefined/"]'); + if (download) { + let figure = feed_entry.querySelector('figure.entry-image > img[src]'); + if (figure) { + download.href = figure.src; + download.setAttribute('download', ''); + } + } + } + } else { + function hbr_main() { + window.top.postMessage({type: 'article-paywall:full-content'}, '*'); + } + let popup = document.querySelector('.persistent-banner'); + removeDOMElement(popup); + let paywall = document.querySelector('div[id^="paywall"]'); + if (paywall) { + removeDOMElement(paywall); + insert_script(hbr_main); + } + } +} + +else if (matchDomain('hilltimes.com')) { + function hilltimes_main(node) { + getJsonUrl('div.paywallcont', '', 'div#entry-content'); + } + let paywall_sel = 'div.paywallcont'; + let paywall = document.querySelector(paywall_sel); + if (dompurify_loaded) { + if (paywall) + hilltimes_main(paywall); + else + waitDOMElement(paywall_sel, 'DIV', hilltimes_main, false); + csDoneOnce = true; + } + let banner = 'section.hide_this_section'; + hideDOMStyle(banner); +} + +else if (matchDomain('hindustantimes.com')) { + let paywall = document.querySelector('.freemium-card'); + if (paywall) { + removeDOMElement(paywall); + let freemium_text = document.querySelector('.freemiumText'); + if (freemium_text) + freemium_text.classList.remove('freemiumText'); + } + let noscroll = document.querySelector('body.open-popup'); + if (noscroll) + noscroll.classList.remove('open-popup'); + let close_story = '.closeStory'; + let ads = 'div[class^="adHeight"]'; + hideDOMStyle(close_story + ', ' + ads); +} + +else if (matchDomain('historyextra.com')) { + let article_masked = document.querySelector('.template-article__masked'); + if (article_masked) { + let extra_pars = document.querySelectorAll('div.template-article__masked > p'); + removeDOMElement(...extra_pars); + article_masked.classList.remove('template-article__masked'); + } + let ad_banner = document.querySelector('.ad-banner-container'); + removeDOMElement(ad_banner); +} + +else if (matchDomain('historytoday.com')) { + if (window.location.hostname.startsWith('app.')) { + restorePugpigPage(); + } else { + let paywall = document.querySelector('div.nopremium-message'); + if (paywall) { + let app_link = document.createElement('a'); + let app_url = 'app.historytoday.com'; + app_link.href = 'https://' + app_url; + app_link.innerText = 'BPC > no fix, search article on: ' + app_url; + app_link.style = 'color: red; font-weight: bold;'; + let app_div = document.createElement('div'); + app_div.style = 'margin: 20px;'; + app_div.appendChild(app_link); + paywall.before(app_div); + removeDOMElement(paywall); + } + } +} + +else if (matchDomain('inc.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + removeDOMElement(paywall); + let locked = document.querySelector('div.article-container--locked'); + if (locked) + locked.className = 'article-container'; + } + let ads = 'div.second-scroll-border'; + hideDOMStyle(ads); +} + +else if (matchDomain('inc42.com')) { + if (window.location.pathname.endsWith('/amp/')) { + amp_unhide_access_hide('="status"', '="NOT status"', 'div.wru-widget'); + } else { + let banner = document.querySelector('div[id*="_leaderboard_"]'); + removeDOMElement(banner); + } +} + +else if (matchDomain('indianexpress.com')) { + if (window.location.pathname.endsWith('/lite/')) + amp_unhide_access_hide('="metering.result=\'ALLOW_ACCESS\'"', ''); + else { + let ads = 'div[class^="adsbox"], div.adboxtop, div.add-first, div.osv-ad-class, div.ie-int-campign-ad'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('indiatoday.in')) { + if (window.location.pathname.match(/(\/amp)?\/magazine\//)) { + let url = window.location.href; + if (!url.includes('/amp/')) { + amp_redirect('div#csc-paywall'); + } else { + amp_unhide_access_hide('="granted"', '="NOT NOT granted"'); + } + } +} + +else if (matchDomain('infzm.com')) { + let url = window.location.href; + if (url.includes('.com/wap/#/content/')) { + let container = document.querySelector('section.container'); + if (container) + container.classList.remove('container'); + let overlay = document.querySelector('div.article-content[style]'); + if (overlay) + overlay.removeAttribute('style'); + } else if (url.includes('.com/contents/')) { + let paywall = document.querySelector('div.nfzm-article-jumbotron--unauth'); + if (paywall) { + removeDOMElement(paywall); + window.location.href = url.replace('.com/contents/', '.com/wap/#/content/').split('?')[0]; + } + } +} + +else if (matchDomain('inkl.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + paywall.removeAttribute('class'); + let gradient_container = document.querySelector('div.gradient-container'); + removeDOMElement(gradient_container); + } + let what_is_inkl = document.querySelector('.what-is-inkl-container, .features-panel'); + let signup = document.querySelectorAll('.article-signup-container, .locked-sign-up-container, div[class*="/inkl-watermark.svg"]'); + let shared_banner = document.querySelector('div.shared-article-inline-banner'); + removeDOMElement(what_is_inkl, ...signup, shared_banner); + let dismiss_button = document.querySelector('div.dismiss-button-container button.btn'); + if (dismiss_button) + dismiss_button.click(); + let dive_deeper_summary_bodies = document.querySelectorAll('div.dive-deeper-container div.summary-body'); + if (dive_deeper_summary_bodies) { + for (let summary_body of dive_deeper_summary_bodies) { + if (!summary_body.querySelector('a')) { + let ng_click = summary_body.getAttribute('ng-click').replace("showArticle('", '').replace("')", ''); + let weblink = document.createElement('a'); + weblink.text = 'open'; + weblink.href = 'https://www.inkl.com/news/' + ng_click; + summary_body.appendChild(weblink); + } + } + } +} + +else if (matchDomain('insidehighered.com')) { + let ads = 'div[id^="block-dfptag"], div.wp-block-ihe-ad, section.section-ad_slot, div#roadblock'; + hideDOMStyle(ads); +} + +else if (matchDomain('interestingengineering.com')) { + let paywall = document.querySelector('div.paywall-main-wrapper'); + if (paywall) { + removeDOMElement(paywall); + let blurred = document.querySelectorAll('.blurFilter'); + for (let elem of blurred) + elem.classList.remove('blurFilter'); + } +} + +else if (matchDomain('ipolitics.ca')) { + let login = document.querySelector('div.login'); + if (login && dompurify_loaded) { + removeDOMElement(login); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.innerText); + if (json && json.props.pageProps.post && json.props.pageProps.post.content) { + let url_next = json.props.pageProps.post.slug; + if (url_next && !window.location.pathname.includes(url_next)) + refreshCurrentTab(); + let article_new = json.props.pageProps.post.content; + let article = document.querySelector('.post-body'); + if (article) { + article.innerHTML = ''; + article.classList.remove('locked'); + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(article_new) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + article.appendChild(content_new); + } + } else { + refreshCurrentTab(); + } + } catch (err) { + console.log(err); + } + } + } +} + +else if (matchDomain('japantimes.co.jp')) { + window.setTimeout(function () { + let url = window.location.href; + let paywall = document.querySelector('div.blocker'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div#jtarticle'); + if (article) + article.firstChild.before(document.createTextNode('Refresh page or'), googleSearchToolLink(url), archiveLink(url)); + } + }, 5000); + let banner = document.querySelector('div.subscribe'); + removeDOMElement(banner); + let ads = 'div.DisplayAd'; + hideDOMStyle(ads); +} + +else if (matchDomain('jpost.com')) { + let premium_banners = document.querySelectorAll('.hide-for-premium, #hiddenPremiumForm, #hiddenLink'); + removeDOMElement(...premium_banners); +} + +else if (matchDomain('kathimerini.gr')) { + let ads = 'div.nx-billboard-ad-row'; + hideDOMStyle(ads); +} + +else if (matchDomain('kompas.id')) { + let url_artikel = window.location.pathname.startsWith('/artikel/'); + let delay = url_artikel ? 2500 : 0; + window.setTimeout(function () { + let paywall = document.querySelector('kompasid-paywall'); + if (paywall) { + removeDOMElement(paywall); + if (url_artikel) { + let intro = document.querySelector('div.paywall'); + removeDOMElement(intro); + let art_hidden = document.querySelector('div.non-paywall[style]'); + if (art_hidden) + art_hidden.removeAttribute('style'); + } else { + let art_hidden = document.querySelector('section.paywall.hidden'); + if (art_hidden) + art_hidden.classList.remove('hidden'); + } + } + }, delay); +} + +else if (matchDomain('latimes.com')) { + let subscribers = pageContains('div.infobox > p.infobox-title', /subscribers/i); + if (subscribers.length) + removeDOMElement(subscribers[0].parentNode); + let ads = 'div.google-dfp-ad-wrapper, div.revcontent'; + hideDOMStyle(ads); +} + +else if (matchDomain('ledevoir.com')) { + let counter = document.querySelector('.paywall-breakpoint-wrapper'); + removeDOMElement(counter); +} + +else if (matchDomain('livelaw.in')) { + let amp = window.location.pathname.startsWith('/amp/'); + let paywall = document.querySelector(amp ? 'div.subscribeNow' : 'div#subscription_paid_message'); + if (paywall) { + let intro = document.querySelector(amp ? 'div.story' : 'div.details-story-wrapper'); + removeDOMElement(paywall, intro); + let paywall_content = document.querySelector('div.paywall-content.hide'); + if (paywall_content) + paywall_content.className = amp ? '' : 'news_details_page_row2 details-story-wrapper'; + } + let ads = 'inside-post-ad, amp-ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('livemint.com')) { + if (window.location.pathname.includes('/amp-')) { + let paywall = document.querySelectorAll('[amp-access="NOT subscribed"]'); + removeDOMElement(...paywall); + } else { + let paywall = document.querySelector('div.paywall'); + if (paywall) + paywall.classList.remove('paywall'); + let ads = '[class^="ad"], [id^="ad"], #subscribeAd, .taboolaHeight'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('magazine.atavist.com')) { + let bottom_notification = document.querySelector('div.bottom-notification'); + let overlay = document.querySelector('div.notification-overlay'); + removeDOMElement(bottom_notification, overlay); + let paywall = document.querySelector('body.paywall-notification-visible'); + if (paywall) + paywall.classList.remove('paywall-notification-visible'); +} + +else if (matchDomain('manoramaonline.com')) { + if (!window.location.pathname.endsWith('.amp.html')) { + amp_redirect('ev-engagement'); + } else { + amp_unhide_access_hide("=\"result='ALLOW_ACCESS'\""); + } +} + +else if (matchDomain('marketwatch.com')) { + let ads = 'div.element--ad, div.j-ad, div.adWrapper, div#cx-articlecover'; + hideDOMStyle(ads); +} + +else if (matchDomain('medscape.com')) { + let ads = '.AdUnit, [id^="ads-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('mexiconewsdaily.com')) { + let div_hidden = document.querySelector('body.single div.td-post-content > div.tdb-block-inner'); + if (div_hidden) + div_hidden.classList.remove('tdb-block-inner'); +} + +else if (matchDomain('mid-day.com')) { + if (window.location.pathname.startsWith('/amp/')) { + amp_unhide_access_hide('="granted"', '="NOT granted"', '[class*="BannerAd"], div.midday-wrapper'); + } else { + amp_redirect('div#myModalFullscreen'); + let read_more = document.querySelector('#read-more-my'); + if (read_more) + read_more.click(); + } +} + +else if (matchDomain('nationalgeographic.com')) { + function natgeo_func(node) { + removeDOMElement(node); + let body = document.querySelector('body[class]'); + if (body) { + body.removeAttribute('class'); + body.removeAttribute('style'); + } + } + let paywall = document.querySelector('div[id^="fittPortal"]'); + if (paywall) + natgeo_func(paywall); + waitDOMElement('div[id^="fittPortal"]', 'DIV', natgeo_func, false); + csDoneOnce = true; + window.setTimeout(function () { + let url = window.location.href; + let subscribed = document.querySelector('div.Article__Content--gated'); + let msg = document.querySelector('div#bpc_archive'); + if (subscribed && !msg) { + subscribed.appendChild(archiveLink(url)); + subscribed.setAttribute('style', 'overflow: visible !important;'); + } + let overlay = document.querySelector('div.Article__Content__Overlay--gated'); + if (overlay) + overlay.classList.remove('Article__Content__Overlay--gated'); + }, 2000); + let ads = 'div.ad-slot, div.InsertedAd, div.natgeo-ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('nationalreview.com')) { + if (!window.location.pathname.endsWith('/amp/')) { + let paywall_sel = 'div.continue-reading'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + let amphtml = document.querySelector('head > link[rel="amphtml"][href]'); + if (amphtml && !amphtml.href.includes(window.location.pathname)) { + removeDOMElement(paywall); + refreshCurrentTab(); + } else + getJsonUrl(paywall_sel, '', 'div.article-content', {art_class: 'article-content article-content--headless'}); + } + } + let banners = 'div.zephr-wrapper, div#bc-root, div.cookie-text'; + let ads = 'amp-ad, .ad-unit, .ad-skeleton, amp-connatix-player, div[class*="-connatix-"]'; + hideDOMStyle(banners + ', ' + ads); +} + +else if (matchDomain('nautil.us')) { + let banners = document.querySelectorAll('div[class^="a__sc-np"], div.subscibe-bar'); + removeDOMElement(...banners); +} + +else if (matchDomain('ndtvprofit.com')) { + if (window.location.pathname.startsWith('/amp/')) { + amp_unhide_subscr_section(); + } else { + window.setTimeout(function () { + amp_redirect('div[class^="hard-paywall"], div[class*="geotag-container_"]'); + }, 1000); + } + let ads = 'div.responsive-ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('newcriterion.com')) { + getJsonUrl('div.paywall-overlay', '', 'div.entry-content'); +} + +else if (matchDomain('newrepublic.com')) { + let modal = document.querySelector('div.article-scheduled-modal'); + let pw_popups = document.querySelector('div#pwPopups'); + removeDOMElement(modal, pw_popups); + let ads = '.ad-unit'; + hideDOMStyle(ads); +} + +else if (matchDomain('newscientist.com')) { + if (!window.location.hostname.startsWith('appan.')) { + let paywall = document.querySelector('section#subscription-barrier'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = document.querySelector('script#ns-seo-schema'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.datePublished) { + let date = json.datePublished.split(/T\d/)[0].replace(/-/g, '/'); + let path_new = window.location.pathname.split(/\/article\/(\d+-|mg\d+-\d+-)/)[2]; + if (path_new) { + let url = 'https://appan.newscientist.com/' + date + '/' + path_new + 'content.html'; + func_post = function () { + let lazy_images = document.querySelectorAll('img[src^="../"][data-src]'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-src'); + elem.removeAttribute('height'); + elem.removeAttribute('width'); + } + } + replaceDomElementExt(url, false, false, 'section.ArticleContent', 'BPC > no fix (source file)', 'section[class$="-article__body"]'); + } + } + } catch (err) { + console.log(err); + } + } + } + let ads = 'div[class*="Advert"]'; + hideDOMStyle(ads); + } else { + restorePugpigPage(); + } +} + +else if (matchDomain('newsday.com')) { + let nd_lock = document.querySelector('html[class]'); + if (nd_lock) + nd_lock.removeAttribute('class'); + let ads = 'div.ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('newslaundry.com')) { + let paywall = document.querySelector('div > div > img[alt^="paywall"]'); + if (paywall && dompurify_loaded) { + let banner = document.querySelector('div.FrsvM'); + removeDOMElement(paywall.parentNode.parentNode, banner); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = parseHtmlEntities(json.articleBody).replace(/<\/p>\./g, '

'); + let article = document.querySelector('div.story-element-text'); + if (json_text && article) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + article.innerHTML = ''; + article.appendChild(article_new); + } + } + } + } +} + +else if (matchDomain('newsweek.com')) { + let ads = 'div#topad, div[id^="dfp-ad-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain(['nola.com', 'shreveportbossieradvocate.com', 'theadvocate.com'])) { + if (window.location.pathname.endsWith('.amp.html')) { + let body_hidden = document.querySelector('.site-container'); + if (body_hidden) + body_hidden.setAttribute('style', 'display:block;'); + } else { + let ads = 'div.tnt-ads-container, div.asset-breakout-ads'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('nv.ua')) { + if (!window.location.pathname.includes('/amp/')) { + amp_redirect('div[id^="media_paywall"]'); + } else { + let paywall = document.querySelector('div.paywall-area'); + if (paywall) { + paywall.removeAttribute('class'); + let subscr = paywall.querySelector('div.make-subscription'); + removeDOMElement(subscr); + } + let article = document.querySelector('div.article__content'); + if (article) + article.removeAttribute('class'); + } +} + +else if (matchDomain('nybooks.com')) { + let paywall_article = document.querySelector('.paywall-article'); + if (paywall_article) + paywall_article.classList.remove('paywall-article'); + let banners = 'div.toast-cta, div.inline-ad'; + hideDOMStyle(banners); +} + +else if (matchDomain('nytimes.com')) { + if (!window.location.pathname.startsWith('/athletic/')) { + waitDOMElement('div#dock-container', 'DIV', removeDOMElement, false); + csDoneOnce = true; + let banners = 'div[data-testid="inline-message"], div[id^="ad-"], div.pz-ad-box'; + hideDOMStyle(banners); + } +} + +else if (matchDomain('outlookbusiness.com')) { + let paywall = document.querySelector('div#csc-paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + let json = JSON.parse(json_script.innerText); + if (json && json.props.initialState.dashboard.ARTICLE_POST_DETAIL_API.data.article_data.description) { + let article_new = json.props.initialState.dashboard.ARTICLE_POST_DETAIL_API.data.article_data.description; + let article = document.querySelector('div.story-content'); + if (article) { + article.innerHTML = ''; + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(article_new) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + article.appendChild(content_new); + } + } + } + } +} + +else if (matchDomain('outlookindia.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = parseHtmlEntities(json.articleBody).replace(/\n/g, "$&\r\n"); + let content = document.querySelector('div#articleBody'); + if (json_text && content) { + content.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + content.appendChild(article_new); + } + } + } + } +} + +else if (matchDomain('piratewires.com')) { + if (window.location.pathname.startsWith('/pw/')) { + let url_script = getSourceJsonScript(/successButton/); + let filter = /window\.location\.href\s?=\s?"/; + if (url_script && url_script.text.match(filter)) { + let url = url_script.text.split(filter)[1].split(/[\?"]/)[0]; + removeDOMElement(url_script); + window.location.href = url; + } + } else if (window.location.pathname.startsWith('/p/')) { + let header = document.querySelector('header'); + if (!header) { + let main = document.querySelector('main'); + if (main) { + let home = document.createElement('header'); + home.style = 'font-size: 20px; font-weight: bold; text-align: center; margin: 20px;'; + let pw_link = document.createElement('a'); + pw_link.innerText = 'PIRATE WIRES'; + pw_link.href = 'https://www.piratewires.com'; + home.appendChild(pw_link); + main.before(home); + } + } + } +} + +else if (matchDomain('politico.com')) { + let ads = 'div.ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('project-syndicate.org')) { + func_post = function () { + let hidden_images = document.querySelectorAll('img[src][new-cursrc]'); + for (let elem of hidden_images) { + if (elem.src.startsWith('data:image/')) + elem.src = elem.getAttribute('new-cursrc'); + elem.style = 'width: 95%;'; + } + } + let url = window.location.href; + getArchive(url, 'div.paywall--base', '', 'main > article'); +} + +else if (matchDomain('puck.news')) { + let url = window.location.href; + getArchive(url, 'div[class*="paywall"]', '', 'article'); + let modal = document.querySelector('div#paywall-modal'); + removeDOMElement(modal); + let overlay = document.querySelector('body.paywall-active'); + if (overlay) + overlay.classList.remove('paywall-active'); +} + +else if (matchDomain('quora.com')) { + let overlays = document.querySelectorAll('div[class*="_overlay"]'); + removeDOMElement(...overlays); + let mask_image = document.querySelector('div.jhqnqh'); + if (mask_image) + mask_image.classList.remove('jhqnqh'); + let read_more_buttons = document.querySelectorAll('button.puppeteer_test_read_more_button.qu-bg--gray_ultralight'); + for (let elem of read_more_buttons) + elem.click(); + let overlay_cards = document.querySelectorAll('div[class*="OverlayCard"]'); + for (let elem of overlay_cards) + elem.removeAttribute('class'); + window.setTimeout(function () { + let answers = document.querySelectorAll('div[class*="dom_annotate_question_answer_item_"]'); + for (let answer of answers) { + let wall = answer.querySelector('div.content-monetization-wall'); + if (wall) { + wall.classList.remove('content-monetization-wall'); + let timestamp_link = answer.querySelector('a.answer_timestamp[href]'); + if (timestamp_link) { + let answer_link = document.createElement('a'); + answer_link.innerText = 'BPC > open Quora+ answer'; + answer_link.href = timestamp_link.href; + wall.appendChild(answer_link); + } + } + } + }, 500); +} + +else if (matchDomain('reuters.com')) { + let ads = 'div[data-testid="ResponsiveAdSlot"], div[data-testid="Dianomi"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('rivals.com')) { + func_post = function () { + let paywall = pageContains('div[style]', 'Subscribe to read more'); + if (paywall.length) { + let banner = paywall.pop().parentNode; + header_nofix(banner, '', 'BPC > no archive-fix'); + removeDOMElement(banner); + } + } + let url = window.location.href; + getArchive(url, 'div[class^="Paywall_paywall_"]', '', 'div[class^="Article_body_"]', '', 'main div[style*="grid-row-start:body"]'); +} + +else if (matchDomain('rugbypass.com')) { + if (window.location.pathname.match(/^\/plus\/\w/)) { + let paywall = document.querySelector('.premium-fold-bottom'); + if (paywall) { + paywall.classList.remove('premium-fold-bottom'); + let offer = document.querySelector('.plus-article-offer'); + removeDOMElement(offer); + let fade = document.querySelector('.fade'); + if (fade) + fade.classList.remove('fade'); + } + let lazy_images = document.querySelectorAll('figure > img.lazy[data-src]:not([src])'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-src'); + elem.removeAttribute('class'); + } + } else + csDoneOnce = true; +} + +else if (matchDomain('scholastic.com')) { + let paywall = document.querySelector('div.paywallModalElement'); + if (paywall) { + let modal = document.querySelector('div.modal-backdrop'); + removeDOMElement(paywall, modal); + let body_modal = document.querySelector('body.modal-open'); + if (body_modal) + body_modal.removeAttribute('class'); + } +} + +else if (matchDomain('science.org')) { + let paywall = document.querySelector('div.alert-read-limit'); + removeDOMElement(paywall); + let overlay = document.querySelector('body.alert-read-limit__overlay'); + if (overlay) + overlay.classList.remove('alert-read-limit__overlay'); +} + +else if (matchDomain('scmp.com')) { + window.setTimeout(function () { + let paywall = document.querySelector('div[data-qa="GenericArticle-PaywallContainer"], div.js-reading-0-percent-completion-tracker'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('section[data-qa="ContentBody-ContentBodyContainer"]'); + if (article) { + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.payload.data.article.body.json) { + let pars = json.props.pageProps.payload.data.article.body.json; + if (pars && pars.length) + article.innerHTML = ''; + for (let par of pars) { + let elem = document.createElement('p'); + if (window.location.pathname.startsWith('/magazines/')) + elem.style = 'margin: 20px 0px;'; + if (['p', 'h3'].includes(par.type)) { + for (let sub_elem of par.children) { + if (sub_elem.type === 'text') { + if (sub_elem.data) + elem.appendChild(document.createTextNode(sub_elem.data)); + } else if (['a', 'em', 'span', 'strong'].includes(sub_elem.type)) { + let first_child = sub_elem.children && sub_elem.children[0]; + if (sub_elem.children && sub_elem.children.length > 1) { + let elem_text = sub_elem.children.map(x => x.data || x.children[0].data).join(''); + first_child = {type: 'text', data: elem_text}; + } + if (first_child) { + if (first_child.type === 'text') { + if (first_child.data) { + let a_link = document.createElement('span'); + if (sub_elem.attribs && sub_elem.attribs.href) { + a_link = document.createElement('a'); + a_link.style = 'text-decoration: underline;'; + a_link.href = sub_elem.attribs.href; + if (!matchUrlDomain(window.location.hostname, sub_elem.attribs.href)) + a_link.target = '_blank'; + } else if (sub_elem.type === 'em') + a_link.style = 'font-style: italic;'; + else if (sub_elem.type === 'strong') + a_link.style = 'font-weight: bold;'; + a_link.innerText = first_child.data; + elem.appendChild(a_link); + } + } + } + } else if (sub_elem.type === 'img') { + if (sub_elem.attribs) { + let attribs = sub_elem.attribs; + if (attribs.src) + elem = makeFigure(attribs.src, attribs.title, {alt: attribs.alt, style: 'width: 100%;'}, {style: 'font-size: 80%;'}); + } + } else { + console.log(sub_elem); + } + } + } else if (par.type === 'div') { + if (par.attribs) { + if (par.attribs.class === 'image-inline-container') { + if (par.children && par.children[0]) { + let attribs = par.children[0].attribs; + if (attribs.src) + elem = makeFigure(attribs.src, attribs.title, {alt: attribs.alt, style: 'width: 100%;'}, {style: 'font-size: 80%;'}); + } + } else if (par.attribs.class.match(/(methode-html|oembed|video)-wrapper/)) { + for (let sub_elem of par.children) { + if (sub_elem.type === 'iframe') { + let attribs = sub_elem.attribs; + if (attribs.src) { + let figure = document.createElement('figure'); + let iframe = document.createElement('iframe'); + iframe.src = attribs.src; + if (attribs.width && attribs.height) { + let ratio = attribs.width / (article.offsetWidth); + iframe.width = attribs.width / ratio; + iframe.height = attribs.height / ratio; + } else if (attribs.style) { + iframe.style = attribs.style; + if (attribs.height) + iframe.height = attribs.height; + } + figure.appendChild(iframe); + if (attribs.title) { + let iframe_title = document.createElement('figcaption'); + iframe_title.innerText = attribs.title; + iframe_title.style = 'font-size: 80%;'; + figure.appendChild(iframe_title); + } + elem.appendChild(figure); + } + } + } + } else if (par.attribs.class) + console.log(par); + } + } else if (!['blockquote-quote', 'inline-ad-slot', 'track-viewed-percentage'].includes(par.type)) + console.log(par); + if (elem.hasChildNodes()) + article.appendChild(elem); + } + } + } catch (err) { + console.log(err); + } + } + } + } + }, 1000); + let ads = 'div[data-qa*="AdSlot"], div.adblock-message'; + hideDOMStyle(ads); +} + +else if (matchDomain('seattletimes.com')) { + let ads = 'div.top-ad-wrapper, div.ad, div.native-ad-article'; + hideDOMStyle(ads); +} + +else if (matchDomain('sfstandard.com')) { + let ads = 'div.sticky'; + hideDOMStyle(ads); +} + +else if (matchDomain(sg_sph_media_domains)) { + if (matchDomain('straitstimes.com')) { + func_post = function () { + header_nofix('main', 'div#sph_cdp_4:not(:empty)', 'BPC > no archive-fix'); + } + let url = window.location.href; + getArchive(url, 'div[id][data-sdkids-campaignname^="OVR_Anon_Locked_"]', '', 'main'); + } else if (matchDomain('businesstimes.com.sg')) { + let article = document.querySelector('div.body-content > div[class]'); + if (article) { + let par_hidden = article.querySelectorAll('p.hidden'); + if (par_hidden.length) { + par_hidden[0].parentNode.removeAttribute('class'); + for (let elem of par_hidden) + elem.classList.remove('hidden'); + let fade = article.querySelector('p[class*="bg-gradient-to-t"]'); + if (fade) + fade.className = par_hidden[0].className; + } + } + } + let ads = 'div.ads, div[id^="dfp-ad-"], div.cx_paywall_placeholder, div[data-testid="cas-block-component"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('slate.com')) { + let slate_roadblock = '.slate-roadblock'; + let ads = 'section[class*="-ad"]'; + hideDOMStyle(slate_roadblock + ', ' + ads); +} + +else if (matchDomain('slideshare.net')) { + let limit_overlay = document.querySelector('.limit-overlay'); + if (limit_overlay) + limit_overlay.classList.remove('limit-overlay'); +} + +else if (matchDomain('sltrib.com')) { + let ads = 'div.ad, div.stickyAd, div[class^="sltrib_medrec"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('sloanreview.mit.edu')) { + if (window.location.pathname.startsWith('/article/')) { + window.setTimeout(function () { + let pars = document.querySelectorAll('div.article-content > p'); + if (pars.length && pars.length < 7) + refreshCurrentTab_bg(); + }, 1000); + } +} + +else if (matchDomain('sofrep.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + paywall.removeAttribute('class'); + let intro = document.querySelector('div.non-paywall'); + removeDOMElement(intro); + waitDOMElement('div#paywall_wrap', 'DIV', node => removeDOMElement(node.parentNode)); + } + let banners = document.querySelectorAll('#scrollerCTA, #botCta'); + removeDOMElement(...banners); +} + +else if (matchDomain('spglobal.com')) { + let overlay = document.querySelector('.article__overlay'); + removeDOMElement(overlay); + let html_noscroll = document.querySelector('html[class]'); + if (html_noscroll) + html_noscroll.removeAttribute('class'); +} + +else if (matchDomain('standardmedia.co.ke')) { + let js_disabled = document.querySelector('div#js-disabled'); + removeDOMElement(js_disabled); + let js_enabled = document.querySelector('div#js-enabled'); + if (js_enabled) + js_enabled.removeAttribute('id'); +} + +else if (matchDomain('staradvertiser.com')) { + let paywall = document.querySelectorAll('div.fade'); + if (paywall.length) { + removeDOMElement(...paywall); + let div_hidden = document.querySelector('div#hsa-paywall-content[style]'); + if (div_hidden) + div_hidden.removeAttribute('style'); + let noscroll = document.querySelector('body.overflow-hidden'); + if (noscroll) + noscroll.classList.remove('overflow-hidden'); + } + let ads = 'div.promo-container, div.teads-inread'; + hideDOMStyle(ads); +} + +else if (matchDomain('startribune.com')) { + let ads = 'div[data-testid$="-ad"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('statnews.com')) { + let paywall = document.querySelector('div.restricted-content-breaker'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div.entry-content'); + if (article) { + let url = window.location.href; + article.before(googleSearchToolLink(url)); + } + } +} + +else if (matchDomain('stereogum.com')) { + let paywall = document.querySelector('div.members-only-overlay-wrapper'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_url_dom = document.querySelector('head > link[rel="alternate"][type="application/json"][href]'); + if (json_url_dom) { + let json_url = json_url_dom.href; + fetch(json_url) + .then(response => { + if (response.ok) { + response.json().then(json => { + try { + let json_text = json.acf.article_modules[0].copy.replace(/data-src/g, 'src'); + let content = document.querySelector('div.article__content div.text-block__inner'); + if (json_text && content) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text, dompurify_options) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + content.innerHTML = ''; + content.appendChild(content_new); + } + } catch (err) { + console.log(err); + } + }); + } + }); + } + } +} + +else if (matchDomain('stocknews.com')) { + let hideme = document.querySelector('div#hideme'); + removeDOMElement(hideme); + let blurmes = document.querySelectorAll('div[id^="blurme"]'); + for (let i = 0; i < blurmes.length; i++) + blurmes[i].setAttribute('id', 'blurmenot' + i); +} + +else if (matchDomain('study.com')) { + let faded_content = document.querySelector('div.faded-content'); + if (faded_content) + faded_content.removeAttribute('class'); + let div_hidden = document.querySelector('div.hidden[ng-non-bindable]'); + if (div_hidden) + div_hidden.removeAttribute('class'); + let banners = document.querySelectorAll('div.article-cutoff-div'); + removeDOMElement(...banners); +} + +else if (matchDomain('swarajyamag.com')) { + if (!window.location.pathname.startsWith('/amp/')) { + let paywall = pageContains('h2', /Please Sign In To Continue Reading/); + let amphtml = document.querySelector('head > link[rel="amphtml"]'); + if (paywall.length) { + removeDOMElement(...paywall); + if (amphtml) + amp_redirect_not_loop(amphtml); + } + } +} + +else if (matchDomain('techinasia.com')) { + let paywall = document.querySelector('div.paywall-content'); + if (paywall && dompurify_loaded) { + paywall.classList.remove('paywall-content'); + let url = window.location.href; + let url_xhr = url.replace('.com/', '.com/wp-json/techinasia/2.0/posts/').replace('/visual-story/', '/'); + fetch(url_xhr) + .then(response => { + if (response.ok) { + response.json().then(json => { + let json_text = json.posts[0].content; + json_text = json_text.replace(/width\=\"(\d){3,}\"/g, 'width="100%"').replace(/height\=\"(\d){3,}\"/g, 'height="100%"'); + let content = document.querySelector('div.content'); + if (json_text && content) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let content_new = doc.querySelector('div.content'); + content.parentNode.replaceChild(content_new, content); + } + }); + } + }); + } + let splash_subscribe = document.querySelector('div.splash-subscribe'); + let paywall_hard = document.querySelector('div.paywall-hard'); + removeDOMElement(splash_subscribe, paywall_hard); +} + +else if (matchDomain(['techtarget.com', 'computerweekly.com', 'lemagit.fr'])) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + paywall.classList.remove('paywall'); + let banners = document.querySelectorAll('p#firstP, div#inlineRegistrationWrapper'); + removeDOMElement(...banners); + } +} + +else if (matchDomain('tempo.co')) { + let paywall = document.querySelector('div.bg-black > div > img[src="/_ipx/_/icons/paywallatas.svg"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall.parentNode.parentNode); + let article_hidden = document.querySelector('article > div:not([class]) div.overflow-hidden'); + if (article_hidden) + article_hidden.removeAttribute('class'); + let article = document.querySelector('div#content-wrapper'); + if (article) { + let json_script = document.querySelector('script#__NUXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json) { + let article_index = json.indexOf('published') + 2; + if (article_index) { + let parser = new DOMParser(); + for (let i = article_index; i < article_index + 50; i++) { + let par = json[i]; + if (par && typeof par === 'string' && par.match(/^<(p|div)/)) { + let doc = parser.parseFromString(DOMPurify.sanitize(par, dompurify_options), 'text/html'); + let par_new = doc.querySelector('p, div'); + article.appendChild(par_new); + } else if (!Array.isArray(par)) + console.log(par); + else + break; + } + } + } + } catch (err) { + console.log(err); + } + } + } + } + let ads = 'div.ads'; + hideDOMStyle(ads); +} + +else if (matchDomain('texasmonthly.com')) { + let ads = 'div.promo-in-body'; + hideDOMStyle(ads); +} + +else if (matchDomain('the-american-interest.com')) { + let counter = document.getElementById('article-counter'); + removeDOMElement(counter); +} + +else if (matchDomain('the-scientist.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + paywall.classList.remove('paywall'); + let fader = document.querySelector('div.gated-fader'); + let modal = document.querySelector('div#Modal'); + removeDOMElement(fader, modal); + } +} + +else if (matchDomain('theamericanconservative.com')) { + let paywall_sel = 'section.c-blog-post__body--locked'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + let art_options = { + art_append: 1, + func_text: function (json_text) { + if (json_text.includes('

')) { + let split = json_text.split(/(

)/); + json_text = split[1] + split[2]; + }; + return json_text; + } + }; + getJsonUrl(paywall_sel, {rm_class: 'c-blog-post__body--locked'}, 'div.c-blog-post__content', art_options); + } else { + let img_dark = document.querySelector('div.c-hero-article__image-img.o-image'); + if (img_dark) + img_dark.removeAttribute('class'); + } + let modal = document.querySelector('div#emailsub-modal'); + removeDOMElement(modal); + let noscroll = document.querySelector('body.modal-open'); + if (noscroll) + noscroll.classList.remove('modal-open'); +} + +else if (matchDomain('theamericanscholar.org')) { + getJsonUrl('div.ssagk-form', '', 'div.post_summary'); +} + +else if (matchDomain('theatlantic.com')) { + let banners = 'aside#paywall, div[class^="LostInventoryMessage_"]'; + hideDOMStyle(banners); +} + +else if (matchDomain('thebulletin.org')) { + getJsonUrl('div.article--cropped', '', 'div#body-copy', {art_append: 1}); +} + +else if (matchDomain('thedailybeast.com')) { + let paywall = document.querySelector('div.Body__paywall-container'); + if (paywall) { + removeDOMElement(paywall); + let json_script = document.querySelector('script[displayName="initialState"]'); + if (json_script) { + let json_str = json_script.text.substring(json_script.textContent.indexOf('{')); + try { + let json = JSON.parse(json_str); + if (json.body) { + let pars = json.body.sections; + let cards = json.body.cards; + if (pars) { + let mobile_doc = document.querySelector('div.Mobiledoc'); + if (mobile_doc) { + let mobile_doc_text = mobile_doc.innerText.replace(/(\r|\n)/g, ''); + for (let elem of pars) { + let par_elem = ''; + if (elem[0] === 1) { + if (elem[1] === 'p') { + let par = ''; + for (let part of elem[2]) + par += part[3]; + if (par && !mobile_doc_text.includes(par)) { + par_elem = document.createElement('p'); + par_elem.innerText = par; + } + } + } else if (elem[0] === 10) { + if (cards && cards[elem[1]]) { + let card = cards[elem[1]]; + if (card[0] === 'pt-image') { + par_elem = document.createElement('p'); + let par_fig = makeFigure(card[1].url, card[1].title + ' ' + card[1].credit); + par_elem.appendChild(par_fig); + } else if (card[0] === 'pt-fancy-links-card') { + par_elem = document.createElement('p'); + let par_link = document.createElement('a'); + par_link.href = card[1].links; + par_link.innerText = card[1].linksData[0].long_headline; + par_elem.appendChild(par_link); + } + } + } + if (par_elem) + mobile_doc.appendChild(par_elem); + } + } + } + } + csDoneOnce = true; + } catch (err) { + console.log(err); + } + } + } + let ads = document.querySelectorAll('div > div.tdb-ads-block'); + for (let ad of ads) + hideDOMElement(ad.parentNode); +} + +else if (matchDomain('thediplomat.com')) { + if (matchDomain('magazine.thediplomat.com')) { + let article = document.querySelector('article > section.h-96'); + if (article) + article.classList.remove('h-96'); + let fade = 'aside.bg-gradient-to-b'; + hideDOMStyle(fade, 2); + } + let ads = 'aside.td-ad-container--labeled, div[data-actirise]'; + hideDOMStyle(ads); +} + +else if (matchDomain('theglobeandmail.com')) { + let lazy_images = document.querySelectorAll('img[src^="data:image/"][data-src]'); + for (let elem of lazy_images) + elem.src = elem.getAttribute('data-src'); + let ads = 'div.c-ad--base'; + hideDOMStyle(ads); +} + +else if (matchDomain(['thehindu.com', 'thehindubusinessline.com'])) { + if (!window.location.pathname.endsWith('/amp/')) { + let counter = '#test'; + let ads = 'div.ad, div.article-ad, div.dfp-ad, div#paywallbox, div[id^="piano-art-"]'; + hideDOMStyle(counter + ', ' + ads); + } else { + let ads = '[class^="height"], [class^="advt"], [id^="piano"]'; + hideDOMStyle(ads); + } + function hindu_main() { + if (window) { + window.Adblock = false; + window.isNonSubcribed = false; + } + } + insert_script(hindu_main); +} + +else if (matchDomain('theimpression.com')) { + let paywall = document.querySelector('div#modalpostsubscribe'); + if (paywall) { + let blureffect = document.querySelectorAll('div.blureffect'); + for (let elem of blureffect) + elem.classList.remove('blureffect'); + } +} + +else if (matchDomain(['thejuggernaut.com', 'jgnt.co'])) { + let paywall = pageContains('div.font-mono', /(Read this article and many more by subscribing today|Join today to read the full story)/); + if (paywall.length) { + removeDOMElement(paywall[0].parentNode); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.post.fields) { + let url_next = json.query.slug; + if (url_next && !window.location.pathname.includes(url_next)) + refreshCurrentTab(); + let fields = json.props.pageProps.post.fields; + let pars = fields.fullText ? fields.fullText.content : fields.textEssay.fields.body.content; + window.setTimeout(function () { + let article = document.querySelector('div[class*="opacity-"]'); + if (article) { + article.innerHTML = ''; + article.removeAttribute('class'); + let fade = document.querySelectorAll('div.bg-gradient-to-b'); + for (let elem of fade) + elem.removeAttribute('class'); + let modal = document.querySelector('div#headlessui-portal-root'); + removeDOMElement(modal); + let par_first = true; + function attach_text(sub_item, elem) { + if (sub_item.value) { + let sub_elem = document.createElement('span'); + sub_elem.innerText = sub_item.value; + if (sub_item.marks && sub_item.marks.length) { + let style = ''; + for (let mark of sub_item.marks) { + if (mark.type === 'bold') + style += 'font-weight: bold;'; + else if (mark.type === 'italic') + style += 'font-style: italic;'; + else if (mark.type === 'underline') + style += 'text-decoration: underline;'; + } + sub_elem.style = style; + } + elem.appendChild(sub_elem); + } + } + function attach_hyperlink(sub_item, elem) { + if (sub_item.content && sub_item.content[0] && sub_item.content[0].value && sub_item.data && sub_item.data.uri) { + let sub_elem = document.createElement('a'); + sub_elem.href = sub_item.data.uri; + sub_elem.innerText = sub_item.content[0].value; + if (!matchUrlDomain(['thejuggernaut.com', 'jgnt.co'], sub_item.data.uri)) + sub_elem.target = '_blank'; + sub_elem.style = 'text-decoration: underline;'; + elem.appendChild(sub_elem); + } + } + function attach_paragraph(par, elem) { + if (par.content && par.content.length) { + let span_elem = document.createElement('span'); + for (let item of par.content) { + if (item.nodeType === 'text') { + attach_text(item, span_elem); + } else if (item.nodeType === 'hyperlink') { + attach_hyperlink(item, span_elem); + } else + console.log(item); + } + elem.appendChild(span_elem); + } + } + for (let par of pars) { + let elem = document.createElement('p'); + if (par.nodeType.match(/^(paragraph|heading-\d)$/)) { + attach_paragraph(par, elem); + } else if (['blockquote'].includes(par.nodeType)) { + if (par.content && par.content.length) { + for (let item of par.content) { + if (item.nodeType === 'paragraph') { + elem.style = 'margin: 0px 20px; font-style: italic;'; + attach_paragraph(item, elem); + } else + console.log(item); + } + } + } else if (par.nodeType === 'hr') { + elem.appendChild(document.createElement('hr')); + } else if (par.nodeType === 'embedded-asset-block') { + if (!par_first) { + if (par.data && par.data.target && par.data.target.fields) { + if (par.data.target.fields.file && par.data.target.fields.file.url) { + let figure = makeFigure(par.data.target.fields.file.url, par.data.target.fields.description); + elem.appendChild(figure); + } + } + } else + par_first = false; + } else if (par.nodeType === 'unordered-list') { + if (par.content && par.content.length) { + let ul = document.createElement('ul'); + for (let item of par.content) { + if (item.nodeType === 'list-item') { + if (item.content) { + for (let sub_item_par of item.content) { + if (sub_item_par.nodeType === 'paragraph') { + let li = document.createElement('li'); + attach_paragraph(sub_item_par, li); + ul.appendChild(li); + } + } + } + } else + console.log(item); + } + elem.appendChild(ul); + } + } else { + console.log(par); + } + if (elem.hasChildNodes()) { + article.appendChild(document.createElement('br')); + article.appendChild(elem); + } + } + } + }, 1000); + } else + refreshCurrentTab(); + } catch (err) { + console.log(err); + } + } + } +} + +else if (matchDomain('thelampmagazine.com')) { + let paywall = document.querySelector('div.paywall-gradient'); + if (paywall) { + paywall.removeAttribute('class'); + let banner = document.querySelector('section.p-8'); + removeDOMElement(banner); + } + let login = document.querySelectorAll('a.js-login-modal-trigger'); + for (let elem of login) { + elem.removeAttribute('class'); + let url_search = '/search?q=' + elem.innerText.replace(/\s/g, '+'); + elem.href = url_search; + elem.onclick = x => window.location.href = url_search; + } +} + +else if (matchDomain('thenewatlantis.com')) { + let article_gated = document.querySelector('.article-gated'); + if (article_gated) + article_gated.classList.remove('article-gated'); +} + +else if (matchDomain('thenewslens.com')) { + let paywall = document.querySelector('div.article-mask-box'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let article = document.querySelector('section.article-body'); + if (json_text && article) { + let article_text = article.innerText.replace(/\n/g, ''); + let split = json_text.split('。'); + for (let elem of split) { + if (!elem.includes('(function(') && !article_text.includes(elem)) { + let par_new = document.createElement('p'); + par_new.innerText = elem + '。'; + article.append(par_new); + } + } + } + } + } + } +} + +else if (matchDomain('thepointmag.com')) { + let overlay = document.querySelectorAll('div.overlay, div#tpopup-'); + removeDOMElement(...overlay); +} + +else if (matchDomain('thequint.com')) { + window.setTimeout(function () { + let lock = document.querySelector('div > img[alt^="lock"]'); + if (lock && dompurify_loaded) { + lock.removeAttribute('alt'); + let paywall = document.querySelector('div#paywall-widget'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div.story-element'); + if (article) { + let article_new = getArticleQuintype(); + if (article_new && article.parentNode) + article.parentNode.replaceChild(article_new, article); + } + } + let body_hidden = document.querySelector('div#story-body-wrapper'); + if (body_hidden) { + body_hidden.removeAttribute('class'); + body_hidden.removeAttribute('style'); + } + function thequint_unhide(node) { + node.removeAttribute('style'); + } + waitDOMAttribute('div#story-body-wrapper', 'DIV', 'style', thequint_unhide, true); + } + }, 4000); +} + +else if (matchDomain('thespectator.com')) { + let div_hidden = document.querySelector('div.ev-meter-content-class'); + if (div_hidden) + div_hidden.classList.remove('ev-meter-content-class'); +} + +else if (matchDomain('theweek.com')) { + let paywall = document.querySelector('div.kiosq-main-layer'); + removeDOMElement(paywall); + let locker = document.querySelector('div.paywall-locker'); + if (locker) + locker.classList.remove('paywall-locker'); +} + +else if (matchDomain('thewrap.com')) { + getJsonUrl('div#zephr-payment-form-root', '', 'div.entry-content', {art_append: 1}); + let fade = document.querySelector('div.content-area div[style*="background-image: linear-gradient"]'); + removeDOMElement(fade); +} + +else if (matchDomain('timeshighereducation.com')) { + let paywall = document.querySelector('div.paywall-active'); + if (paywall) { + removeDOMElement(paywall); + let fade = document.querySelectorAll('div.paywall-fade'); + for (let elem of fade) + elem.classList.remove('paywall-fade'); + } + let hidden_images = document.querySelectorAll('img.b-lazy[src^="data:image/"][data-src]'); + for (let hidden_image of hidden_images) { + hidden_image.setAttribute('src', hidden_image.getAttribute('data-src')); + hidden_image.classList.remove('b-lazy'); + hidden_image.parentElement.classList.remove('media--loading'); + } + let ads = 'div[data-ad-page], section.block-the-dfp'; + hideDOMStyle(ads); +} + +else if (matchDomain(timesofindia_domains)) { + if (matchDomain('epaper.indiatimes.com')) { + let blocker = document.querySelector('div.epaperBlockerWrap'); + removeDOMElement(blocker); + if (window.location.pathname.startsWith('/english-news-paper-today-toi-print-edition/')) { + let paywall = document.querySelector('section#blocker'); + if (paywall) { + let fq = document.querySelector('section#fq'); + removeDOMElement(paywall, fq); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let content = document.querySelector('section[type="synopsis"]'); + if (json_text && content) { + let article_new = document.createElement('p'); + article_new.innerText = breakText(json_text); + content.innerHTML = ''; + addStyle('[type="synopsis"]::after {background: none !important;}'); + content.appendChild(article_new); + } + } + } + } + } + } else { + let url = window.location.href; + let region_block = document.querySelector('div.plan-popup.active'); + if (region_block) { + removeDOMElement(region_block); + let overflow = document.querySelector('html[style]'); + if (overflow) + overflow.removeAttribute('style'); + } + if (!window.location.pathname.includes('/amp_')) { + let paywall = document.querySelector('div[id^="story-blocker"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + let article = document.querySelector('div.paywall'); + if (json_text && article) { + if (!json_text.match(/\s(src|href)=/)) + json_text = breakText(json_text).replace(/\n\n/g, '

'); + window.setTimeout(function () { + let parser = new DOMParser(); + let doc = parser.parseFromString('

' + DOMPurify.sanitize(parseHtmlEntities(json_text), dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + if (article_new) { + article.innerHTML = ''; + article.appendChild(article_new); + } + }, 1500); + addStyle('div.paywall::after {background-image: none !important;}'); + } + } + } catch (err) { + console.log(err); + } + } + window.setTimeout(function () { + let popup_button = document.querySelector('div.primeshow button:not([data-type])'); + if (popup_button) + popup_button.click(); + }, 1000); + let banners = 'div.bannerBenefitsWrapper'; + hideDOMStyle(banners); + } + } else { + ampToHtml(); + } + } +} + +else if (matchDomain(no_dn_media_domains)) { + if (matchDomain('tradewindsnews.com')) { + if (window.location.pathname.startsWith('/markets/')) { + let paywall = document.querySelector('iframe[src]'); + removeDOMElement(paywall); + let overflow = document.querySelector('body[style]'); + if (overflow) + overflow.removeAttribute('style'); + let blurred = document.querySelector('body > div[style]'); + if (blurred) + blurred.removeAttribute('style'); + } else { + header_nofix('div.article-body > div', 'div[style*="background-image: linear-gradient"]'); + } + } else { + window.setTimeout(function () { + let paywall = document.querySelector('div.dn-paywall > div#sub-paywall-container'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall.parentNode); + let article = document.querySelector('div#dn-content'); + let json_script = document.querySelector('script#__NUXT_DATA__'); + if (json_script) { + try { + let pars = JSON.parse(json_script.text); + let article_id_index = pars.indexOf('global-article') + 1; + if (article_id_index) { + let article_id = pars[article_id_index]; + if (article_id && !window.location.pathname.endsWith(article_id)) { + refreshCurrentTab(); + return; + } + } + article.innerHTML = ''; + article.classList.remove('shadow'); + let img_first = true; + let parser = new DOMParser(); + for (let par of pars) { + let elem; + if (par && par.type) { + let type = pars[par.type]; + if (['text', 'subhead'].includes(type)) { + if (par.html || par.value) { + let index = par.html || par.value; + let json_text = pars[index]; + let content_new = parser.parseFromString('

' + DOMPurify.sanitize(json_text) + '

', 'text/html'); + elem = content_new.querySelector('p'); + if (par.value) + elem.style = 'font-weight: bold;'; + } + } else if (type === 'picture') { + if (img_first) + img_first = false; + else { + let caption_text = pars[par.caption]; + if (par.credit) + caption_text += ' (' + pars[par.credit] + ')'; + elem = makeFigure(pars[par.src], caption_text); + elem.className = 'dn-image'; + } + } else if (type === 'factbox') { + elem = document.createElement('p'); + if (par.title) + elem.innerText = pars[par.title]; + if (par.html) { + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(pars[par.html]) + '
', 'text/html'); + let box = content_new.querySelector('div'); + elem.appendChild(box); + } + } else if (type === 'news' && par.title && par.url) { + elem = document.createElement('p'); + let sub_elem = document.createElement('a'); + sub_elem.href = pars[par.url]; + sub_elem.innerText = 'Related: ' + pars[par.title]; + sub_elem.style = 'font-weight: bold;'; + elem.appendChild(sub_elem); + } else if (!['ad', 'adobetarget', 'author', 'break', 'embed', 'Emne', 'Location', 'news', 'Organisasjon', 'Organisation', 'Organization', 'promobox', 'Person', 'Personer', 'Region', 'Regions', 'related', 'Sector', 'Sectors', 'Selskap', 'Sted', 'Topic'].includes(type)) { + for (let item in par) { + console.log(item); + console.log(pars[par[item]]); + } + } + if (elem) + article.appendChild(elem); + } + } + } catch (err) { + console.log(err); + } + } + } else if (matchDomain('dn.no') && window.location.pathname.match(/^\/(d2|magasinet|smak)\//)) { + let paywall = document.querySelector('div#sub-paywall-container'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('p.vrs-article-header__summary'); + if (article) { + let url = window.location.href; + article.firstChild.before(googleSearchToolLink(url)); + } + } + } + }, 1000); + } +} + +else if (matchDomain(usa_conde_nast_domains)) { + let maps = document.querySelectorAll('div.map_wrapper'); + for (let elem of maps) + elem.style.visibility = 'visible'; + let banners = 'aside.paywall-bar, div[class^="MessageBannerWrapper-"], div.ad-stickyhero, div.ad_wrapper'; + hideDOMStyle(banners); +} + +else if (matchDomain(usa_craincomm_domains)) { + if (matchDomain('european-rubber-journal.com')) { + let paywall = document.querySelector('div.article-overlay'); + if (paywall) { + let fade = document.querySelector('div.gradient'); + removeDOMElement(paywall, fade); + let truncated = document.querySelector('div.truncated'); + if (truncated) + truncated.classList.remove('truncated'); + } + } else if (matchDomain(['pionline.com', 'rubbernews.com'])) { + let body_hidden = document.querySelector('body[class]'); + if (body_hidden) + body_hidden.removeAttribute('class'); + let lazy_images = document.querySelectorAll('img.lazy[data-src]'); + for (let lazy_image of lazy_images) { + lazy_image.src = lazy_image.getAttribute('data-src'); + lazy_image.removeAttribute('class'); + } + let lazy_sources = document.querySelectorAll('source[srcset^="data:image"]'); + removeDOMElement(...lazy_sources); + } else { + let sponsored_article = document.querySelector('div.sponsored-article'); + if (sponsored_article) + sponsored_article.classList.remove('sponsored-article'); + } + let ads = 'div.footer__ads-footer'; + hideDOMStyle(ads); +} + +else if (matchDomain(usa_nymag_domains)) { + let ads = 'div.m-ad, section.ad-splash'; + hideDOMStyle(ads); +} + +else if (matchDomain(usa_outside_mag_domains)) { + let ads = 'div.js-ad'; + hideDOMStyle(ads); +} + +else if (matchDomain(usa_tribune_domains)) { + getJsonUrl('div.paywall-container', '', 'div.body-copy', {art_class: 'body-copy'}); + let ads = 'div.dfp-ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('usatoday.com')) { + if (window.location.hostname.startsWith('amp.')) { + amp_unhide_access_hide('="gup.hasAssetAccess"', '', 'div[class*="ad-"]'); + } else { + let roadblock = document.querySelector('.roadblock-container'); + if (roadblock) { + removeDOMElement(roadblock); + article_next = document.querySelector('article.next-in-depth-story > div.article-inner'); + if (article_next) { + let url = article_next.getAttribute('data-url'); + let weblink = document.createElement('a'); + weblink.href = url; + weblink.innerText = 'open next in-depth story'; + article_next.appendChild(weblink); + } + } + } +} + +else if (matchDomain('vice.com')) { + let paywall = document.querySelectorAll('iframe.swg-dialog, swg-popup-background'); + removeDOMElement(...paywall); + let noscroll = document.querySelector('body.swg-disable-scroll'); + if (noscroll) + noscroll.classList.remove('swg-disable-scroll'); +} + +else if (matchDomain('vikatan.com')) { + window.setTimeout(function () { + let paywall = document.querySelector('div#paywallDisplay'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = parseHtmlEntities(json.articleBody); + let content = document.querySelector('div.story-element > div'); + if (json_text && content) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + content.parentNode.replaceChild(content_new, content); + } + } + } + } + let story_hidden = document.querySelector('div[class^="styles-m__story-card-wrapper_"]'); + if (story_hidden) + story_hidden.removeAttribute('class'); + }, 500); +} + +else if (matchDomain('voguebusiness.com')) { + let article = document.querySelector('article'); + if (article) { + let pars = article.querySelectorAll('p:not([class]), p.paywall'); + if (pars.length < 5) { + removeDOMElement(...pars); + let filter = /^window\.__PRELOADED_STATE__\s?=\s?/; + let json_script = getSourceJsonScript(filter, '[type]:not([src])'); + if (json_script) { + try { + let json = JSON.parse(json_script.text.split(filter)[1].split('};')[0] + '}'); + let body = document.querySelector('div.body__inner-container'); + if (body) { + let pars = json.transformed.article.body; + function makeElem(elem, par_elem) { + if (Array.isArray(elem) && elem.length) { + let elem_new; + let item = elem[0]; + if (typeof item === 'string') { + if (['p', 'h2', 'em', 'strong'].includes(item)) { + elem_new = document.createElement(item); + par_elem.appendChild(elem_new); + elem.shift(); + makeElem(elem, elem_new); + } else if (item === 'a' && elem.length > 2) { + elem_new = document.createElement('a'); + let a_data = elem[1]; + elem_new.href = a_data.href; + if (a_data.isExternal) + elem_new.target = '_blank'; + makeElem(elem.slice(2), elem_new); + par_elem.appendChild(elem_new); + } else if (item === 'inline-embed' || !(['ad', 'cm-unit', 'inline-newsletter', 'native-ad'].includes(item) || (item.length < 30 && item.includes('inline-embed')))) { + if (item === 'inline-embed') { + let img_data = elem[1]; + if (img_data && img_data.type === 'image') { + if (img_data.props && img_data.props.image && img_data.props.image.sources) { + let caption_text; + if (img_data.props.dangerousCaption) { + caption_text = img_data.props.dangerousCaption.replace(/<\/?\w+>/g, ''); + if (img_data.props.dangerousCredit) + caption_text += ' ' + img_data.props.dangerousCredit; + } + let figure = makeFigure(img_data.props.image.sources.lg.url, caption_text); + par_elem.appendChild(figure); + } + } + } else { + elem_new = document.createTextNode(item); + par_elem.appendChild(elem_new); + elem.shift(); + makeElem(elem, par_elem); + } + } + } else if (Array.isArray(item)) { + if (['a', 'em', 'strong'].includes(item[0])) { + makeElem(item, par_elem); + elem.shift(); + makeElem(elem, par_elem); + } else { + console.log(item); + } + } else if (typeof item === 'object') { + if (!item.class) + console.log(item); + elem.shift(); + makeElem(elem, par_elem); + } + } else if (typeof elem === 'string' && !['div'].includes(elem)) { + par_elem.appendChild(document.createTextNode(elem)); + } + } + for (let par of pars) + makeElem(par, body); + } + } catch (err) { + console.log(err); + } + } + } + } +} + +else if (matchDomain('vox.com')) { + let ads = 'div[id^="div-gpt-ad-"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('washingtonpost.com')) { + let leaderboard = '#leaderboard-wrapper'; + let ads = 'div[data-qa$="-ad"]'; + hideDOMStyle(leaderboard + ', ' + ads); + if (window.location.pathname.startsWith('/comments') && window.location.search.startsWith('?storyUrl=')) { + let wrapper = document.querySelector('div#comments-wrapper'); + if (wrapper) { + let com_link = document.createElement('a'); + com_link.href = window.location.href.replace('https://www.washingtonpost.com/comments?storyUrl', 'https://talk.washingtonpost.com/embed/stream?storyURL'); + com_link.innerText = 'BPC > open comments'; + wrapper.appendChild(com_link); + csDoneOnce = true; + } + } else if (window.location.hostname === 'talk.washingtonpost.com') { + let body = document.querySelector('body'); + if (body) + body.style = 'margin: 10px;'; + let nav = document.querySelector('main > nav'); + if (nav && window.location.search.startsWith('?storyURL=')) { + let com_link = document.createElement('a'); + com_link.href = decodeURIComponent(window.location.href.split('?storyURL=')[1]); + com_link.innerText = 'BPC > return to article'; + nav.after(com_link); + csDoneOnce = true; + } + } +} + +else if (matchDomain('winnipegfreepress.com')) { + let ads = '.billboard-ad-space, .ad, .article-ad, .fixed-sky'; + hideDOMStyle(ads); +} + +else if (matchDomain('wsj.com')) { + if (!matchDomain('cn.wsj.com')) + blockJsReferrer(); + if (window.location.pathname.startsWith('/livecoverage/')) { + window.setTimeout(function () { + fix_dowjones_live(); + }, 1500); + } else { + let paywall = document.querySelector('.snippet-promotion, div[id*="-snippet-overlay"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('article section'); + let article_id_dom = document.querySelector('head > meta[name="article.id"][content]'); + if (article && article_id_dom) { + article.removeAttribute('class'); + let article_id = article_id_dom.content; + let url_src = 'https://mats.mobile.dowjones.io/translate/' + article_id + '/jpml'; + let x_api_key = cs_param['x-api-key'] || 'e05995ff442143255eb8381f72d4913bf7503d6c'; + getExtFetch(url_src, '', {headers: {"x-api-key": x_api_key}}, main_wsj_pro); + function main_wsj_pro(url_src, data) { + try { + if (data) { + let intro = article.querySelectorAll('p[class][data-type="paragraph"]'); + let par_class; + if (intro[0]) { + par_class = intro[0].className; + removeDOMElement(...intro); + } + let parser = new DOMParser(); + let doc = parser.parseFromString(data, "application/xml"); + let body = doc.querySelector('panel#body'); + if (body) { + let media_bucket = doc.querySelector('panel#metadata > p#media-bucket'); + let media_items = []; + let schema_data = []; + if (media_bucket) { + media_items = JSON.parse(media_bucket.innerHTML).items.filter(x => ['image', 'video', 'youtube'].includes(x.type)); + if (media_items.length) { + let video = document.querySelector('div[data-type="video"]'); + if (!(video && media_items[0].type !== 'video')) + media_items = media_items.slice(1); + let schema_script = document.querySelector('script#articleschema'); + if (schema_script) + schema_data = JSON.parse(schema_script.text); + } + } + let pars = body.querySelectorAll('p[class], panel.media-item'); + let par_first = true; + let image_nr = 0; + let par_new; + for (let par of pars) { + if (par.tagName === 'p') { + if (par_first) + par_first = false; + let doc = parser.parseFromString('

' + DOMPurify.sanitize(par.innerHTML.replace(/(<\/?mark([^>]+)?>)/g, ''), dompurify_options) + '', 'text/html'); + par_new = doc.querySelector('p'); + if (par_new) { + let app_links = par_new.querySelectorAll('a[data-canonical-url][href^="wsj:"], a[data-canonical-url]:not([href])'); + for (let elem of app_links) + elem.href = elem.getAttribute('data-canonical-url'); + } + } else if (!par_first && par.tagName === 'panel') { + if (media_items[image_nr]) { + let media_item = media_items[image_nr]; + if (media_item.type === 'image' && media_item['manifest-url']) { + par_new = makeFigure(media_item['manifest-url'], media_item.caption + ' PHOTO: ' + media_item.credit.toUpperCase(), {style: 'width: 100%;'}); + } else if (media_item.type === 'video' && media_item.sourceid) { + par_new = document.createElement('p'); + par_new.className = par_class; + let title = document.createTextNode(media_item.title); + let video = document.createElement('iframe'); + video.src = schema_data.find(x => x['@type'] === 'VideoObject' && x.embedUrl.includes(media_item.sourceid)).embedUrl; + video.style = 'width: ' + article.offsetWidth + 'px; height: ' + article.offsetWidth * 3 / 4 + 'px;'; + let caption = document.createTextNode(media_item.caption + ' ' + media_item.credit); + par_new.append(title, video, caption); + } else if (media_item.type === 'youtube' && media_item['sourceid']) { + par_new = document.createElement('iframe'); + par_new.src = 'https://www.youtube.com/embed/' + media_item['sourceid']; + par_new.style = 'width: 100%; height: 400px;'; + } else { + console.log(media_item); + } + image_nr++; + } + } + if (par_new) + article.appendChild(par_new); + } + } + } + } catch (err) { + console.log(err); + } + } + } + } + } + let ads = 'div.wsj-ad, div.adWrapper, div.css-xgokil-Box, div#cx-article-cover-overlay'; + hideDOMStyle(ads); +} + +else if (matchDomain('zerohedge.com')) { + window.setTimeout(function () { + let paywall = document.querySelector('div[class^="PremiumOverlay_container__"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.innerText); + if (json && json.props.pageProps.node.body) { + let article_new = parseHtmlEntities(decode_utf8(atob(json.props.pageProps.node.body.substring(21)))); + let article = document.querySelector('div[class^="NodeContent_mainContent__"'); + if (article) { + article.innerHTML = ''; + let parser = new DOMParser(); + let doc = parser.parseFromString('

' + DOMPurify.sanitize(article_new) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + article.appendChild(content_new); + } + } + } catch (err) { + console.log(err); + } + } + } + }, 1000); +} + +else if (matchDomain(ke_nation_media_domains) || matchDomain(ke_nation_media_custom_domains)) { + let paywall = document.querySelectorAll('div.modal, [id*="wall"], section.wall-guard'); + if (paywall.length && dompurify_loaded) { + removeDOMElement(...paywall); + func_post = function () { + let div_hidden = document.querySelectorAll('div.article-page .nmgp'); + for (let elem of div_hidden) + elem.classList.remove('nmgp'); + let page_hidden = document.querySelector('div.article-page .hidden'); + if (page_hidden) + page_hidden.classList.remove('hidden'); + let lazy_images = document.querySelectorAll('img.lazy-img[data-srcset]:not([src])'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-srcset').split(',').pop().split(' ')[0]; + elem.classList.remove('lazy-img'); + elem.style = 'margin: 0px 20px'; + } + let videos = document.querySelectorAll('iframe.lazy-iframe_iframe[data-src]:not([src])'); + for (let elem of videos) { + elem.src = elem.getAttribute('data-src'); + elem.removeAttribute('class'); + } + } + let url = window.location.href; + replaceDomElementExt(url, false, false, 'div.blk-txt'); + } + let banners = 'div.banner, div.spinner'; + hideDOMStyle(banners); +} + +else if (matchDomain(['oed.com']) || (window.location.hostname.replace(/^www\./, '').startsWith('oxford') && document.querySelector('div[id^="footer"] a[href="http://www.oup.com/"]'))) { + let paywall_sel = 'div.contentRestrictedMessage'; + let article_sel = 'div#readPanel > div'; + if (matchDomain('oed.com')) { + paywall_sel = 'div.paywallOptions'; + article_sel = 'div#entry_content'; + } + header_nofix(article_sel, paywall_sel, cs_param.signin_text || 'BPC > Sign in with library card 12345678 or 11111111 & library of Royal Bor. of Kensington and Chelsea'); +} + +else if (matchDomain(usa_gannett_domains) || document.querySelector('head > link[href*=".gannettdigital.com/"], head > link[href*=".gannett-cdn.com/"]')) { + if (window.location.pathname.endsWith('/restricted/') && window.location.search.startsWith('?return=')) + window.location.href = decodeURIComponent(window.location.href.split('?return=')[1]); +} + +else if (matchDomain(usa_hearst_comm_domains) || document.querySelector('head > script[src*="/treg.hearstnp.com/"]')) { + let overlay = document.querySelector('div > div#modalOuter'); + if (overlay) { + hideDOMElement(overlay.parentNode); + let noscroll = document.querySelector('body[style]'); + if (noscroll) + noscroll.removeAttribute('style'); + } + let ads = pageContains('div > div > p', 'Article continues below this ad'); + for (let elem of ads) + hideDOMElement(elem.parentNode.parentNode); +} + +else if ((domain = matchDomain(usa_lee_ent_domains)) || matchDomain(ca_torstar_domains.concat(['abqjournal.com'])) || document.querySelector('head > meta[name="tncms-access-version"]')) { + if (window.location.pathname.endsWith('.amp.html')) { + amp_unhide_access_hide('="hasAccess"', '="NOT hasAccess"', '.amp-ads-container'); + let elem_hidden = document.querySelectorAll('html[class], body[class]'); + for (let elem of elem_hidden) + elem.removeAttribute('class'); + let amp_images = document.querySelectorAll('div.main-content amp-img[src^="https://"]'); + for (let amp_image of amp_images) { + let elem = document.createElement('img'); + Object.assign(elem, { + src: amp_image.getAttribute('src'), + alt: amp_image.getAttribute('alt'), + height: '400' + }); + amp_image.parentNode.replaceChild(elem, amp_image); + } + } else { + if (!domain) { + function unscramble(t) { + for (var n = "", i = 0, r = t.length; i < r; i++) { + var s = t.charCodeAt(i); + if (s >= 33 && s <= 126) { + var sTmp = String.fromCharCode(33 + (s - 33 + 47) % 94); + n += sTmp; + } else + n += t.charAt(i); + } + return n; + } + let paywall = document.querySelector('div.subscriber-offers'); + removeDOMElement(paywall); + let subscriber_only = document.querySelectorAll('div.subscriber-only'); + for (let elem of subscriber_only) { + if (elem.classList.contains('encrypted-content') && dompurify_loaded) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(unscramble(elem.innerText)) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + elem.parentNode.replaceChild(content_new, elem); + } + elem.removeAttribute('style'); + elem.removeAttribute('class'); + } + let banners = document.querySelectorAll('div.subscription-required, div.redacted-overlay'); + removeDOMElement(...banners); + } + let ads = 'div.tnt-ads-container, div[class*="adLabelWrapper"], div.globalHeaderBillboard'; + hideDOMStyle(ads); + } +} + +else if (matchDomain(usa_mcc_domains) || document.querySelector('section.bottom-nav > a[href^="https://www.mcclatchy.com/privacy-policy"]')) { + if (window.location.hostname.startsWith('amp.')) { + amp_unhide_subscr_section(); + let subscriptions_action = document.querySelector('div[subscriptions-action][subscriptions-display="NOT data.hasError"]'); + if (subscriptions_action) + subscriptions_action.removeAttribute('subscriptions-action'); + let art_cropped = document.querySelector('div.article-body.cropped'); + if (art_cropped) + art_cropped.classList.remove('cropped'); + let subscr_tag = document.querySelector('div#subscriber-exclusive-tag'); + let amp_players = document.querySelectorAll('amp-connatix-player, amp-iframe.trinity-player'); + removeDOMElement(subscr_tag, ...amp_players); + let amp_images = document.querySelectorAll('amp-img[srcset]:not([src])'); + for (let elem of amp_images) { + let img = document.createElement('img'); + img.src = elem.getAttribute('srcset').split(' ')[0], + img.alt = elem.getAttribute('alt'), + img.style = 'width: 100%;'; + elem.parentNode.replaceChild(img, elem); + } + } else { + window.setTimeout(function () { + let paywall = document.querySelector('p#yzwall'); + if (paywall) { + removeDOMElement(paywall); + let pars_hidden = document.querySelectorAll('.yzfade, .yzarret'); + for (let elem of pars_hidden) + elem.removeAttribute('class'); + } + }, 1000); + } + let ads = 'div[data-type="ad"], div.vf-promo, div#ymovrly'; + hideDOMStyle(ads); +} + +else if (matchDomain(usa_mng_domains) || document.querySelector('head > link[rel="stylesheet"][id^="dfm-accuweather-"], footer li > a[href^="https://www.medianewsgroup.com"]')) { + if (window.location.pathname.endsWith('/amp/')) + amp_unhide_subscr_section('div.ampWrapperInside, div#paywall'); + else if (dompurify_loaded) { + let paywall_sel = '#server-paywall'; + let paywall = document.querySelector(paywall_sel); + let article_sel = 'div.body-copy'; + let article = document.querySelector(article_sel); + if (paywall && article) { + func_post = function () { + let slideshow = article.querySelector('div.article-slideshow'); + if (slideshow) { + slideshow.removeAttribute('class'); + let image_wrappers = slideshow.querySelectorAll('div.image-wrapper'); + for (let elem of image_wrappers) { + elem.removeAttribute('class'); + elem.style = 'margin: 20px 0px;'; + } + let caption = 'div.mng-gallery-information-container, button.icon-close'; + hideDOMStyle(caption, 2); + } + if (iframe) + article.appendChild(iframe); + } + let iframe = article.querySelector('iframe'); + getJsonUrl(paywall_sel, '', article_sel, {art_append: 1, art_class: 'body-copy'}); + } + let ads = 'div.dfp-ad'; + hideDOMStyle(ads); + } +} + +else if (document.querySelector('head > script[src*=".axate.io/"]')) { + let premium = document.querySelector('.premium, div[class*="-premium"]'); + if (premium) + premium.removeAttribute('class'); +} + +else if (document.querySelector('head > meta[property][content^="https://cdn.forumcomm.com/"]')) { + let ads = 'div.GoogleDfpAd-Content'; + hideDOMStyle(ads); +} + +else if (document.querySelector('head > script[src*=".postmedia.digital/"], head > meta[content*=".postmedia.digital/"]')) { + let ads = 'div.ad__section-border, div[id^="tbl_"], div.js-widget-content'; + hideDOMStyle(ads); +} + +else + csDone = true; +} + +} // end csDone(Once) + +} // end cs_default function + +if (document.querySelector('head > link[href*="/leaky-paywall"], script[src*="/leaky-paywall"], div[id^="issuem-leaky-paywall-"]')) { + let js_cookie = document.querySelector('script#leaky_paywall_cookie_js-js-extra'); + if (js_cookie && js_cookie.text.includes('"post_container":"')) { + let post_sel = js_cookie.text.split('"post_container":"')[1].split('"')[0]; + if (post_sel) { + let post = document.querySelector(post_sel); + if (post) + post.removeAttribute('class'); + } + } +} + +// General Functions +function removeDOMElement(...elements) { + for (let element of elements) { + if (element) + element.remove(); + } +} + +function hideDOMElement(...elements) { + for (let element of elements) { + if (element) + element.style = 'display:none !important;'; + } +} + +function hideDOMStyle(selector, id = 1) { + let style = document.querySelector('head > style#ext'+ id); + if (!style && document.head) { + let sheet = document.createElement('style'); + sheet.id = 'ext' + id; + sheet.innerText = selector + ' {display: none !important;}'; + document.head.appendChild(sheet); + } +} + +function addStyle(css, id = 1) { + let style = document.querySelector('head > style#add'+ id); + if (!style && document.head) { + let sheet = document.createElement('style'); + sheet.id = 'add' + id; + sheet.innerText = css; + document.head.appendChild(sheet); + } +} + +function waitDOMElement(selector, tagName = '', callback, multiple = false) { + new window.MutationObserver(function (mutations) { + for (let mutation of mutations) { + for (let node of mutation.addedNodes) { + if (!tagName || (node.tagName === tagName)) { + if (node.matches(selector)) { + callback(node); + if (!multiple) + this.disconnect(); + } + } + } + } + }).observe(document, { + subtree: true, + childList: true + }); +} + +function waitDOMAttribute(selector, tagName = '', attributeName = '', callback, multiple = false) { + let targetNode = document.querySelector(selector); + if (!targetNode) + return; + new window.MutationObserver(function (mutations) { + for (let mutation of mutations) { + if (mutation.target.attributes[attributeName]) { + callback(mutation.target); + if (!multiple) + this.disconnect(); + } + } + }).observe(targetNode, { + attributes: true, + attributeFilter: [attributeName] + }); +} + +function matchDomain(domains, hostname = window.location.hostname) { + let matched_domain = false; + if (typeof domains === 'string') + domains = [domains]; + domains.some(domain => (hostname === domain || hostname.endsWith('.' + domain)) && (matched_domain = domain)); + return matched_domain; +} + +function urlHost(url) { + if (/^http/.test(url)) { + try { + return new URL(url).hostname; + } catch (e) { + console.log(`url not valid: ${url} error: ${e}`); + } + } + return url; +} + +function matchUrlDomain(domains, url) { + return matchDomain(domains, urlHost(url)); +} + +function makeFigure(url, caption_text, img_attrib = {}, caption_attrib = {}) { + let elem = document.createElement('figure'); + let img = document.createElement('img'); + img.src = url; + for (let attrib in img_attrib) + if (img_attrib[attrib]) + img.setAttribute(attrib, img_attrib[attrib]); + elem.appendChild(img); + if (caption_text) { + let caption = document.createElement('figcaption'); + for (let attrib in caption_attrib) + if (caption_attrib[attrib]) + caption.setAttribute(attrib, caption_attrib[attrib]); + let cap_par = document.createElement('p'); + cap_par.innerText = caption_text; + caption.appendChild(cap_par); + elem.appendChild(caption); + } + return elem; +} + +function header_nofix(header, cond_sel = '', msg = 'BPC > no fix') { + if (header && typeof header === 'string') + header = document.querySelector(header); + if (header && !document.querySelector('div#bpc_nofix')) { + if (cond_sel) { + let elem = document.querySelectorAll(cond_sel); + if (elem.length) + removeDOMElement(...elem); + else + return false; + } + let nofix_div = document.createElement('div'); + nofix_div.id = 'bpc_nofix'; + nofix_div.style = 'margin: 20px; font-size: 20px; font-weight: bold; color: red;'; + nofix_div.innerText = msg; + header.before(nofix_div); + } +} + +function blockJsReferrer() { + if (document.head && !document.querySelector('head > meta[name="referrer"][content="no-referrer"]')) { + var meta = document.createElement('meta'); + meta.name = "referrer"; + meta.content = "no-referrer"; + document.head.appendChild(meta); + } +} + +function clearPaywall(paywall, paywall_action) { + if (paywall) { + if (!paywall_action) + removeDOMElement(...paywall); + else { + for (let elem of paywall) { + if (paywall_action.rm_class) + elem.classList.remove(paywall_action.rm_class); + else if (paywall_action.rm_attrib) + elem.removeAttribute(paywall_action.rm_attrib); + } + } + } +} + +function getArchive(url, paywall_sel, paywall_action = '', selector, text_fail = '', selector_source = selector, selector_archive = selector) { + let url_archive = 'https://' + archiveRandomDomain() + '/' + url.split(/[#\?]/)[0]; + let paywall = document.querySelectorAll(paywall_sel); + if (paywall.length && dompurify_loaded) { + clearPaywall(paywall, paywall_action); + csDoneOnce = true; + replaceDomElementExt(url_archive, true, false, selector, text_fail, selector_source, selector_archive); + } +} + +function getExtFetch(url, json_key = '', headers = {}, callback, data_ext_fetch_id = 0, args = []) { + data_ext_fetch[data_ext_fetch_id] = {func: callback, args: args}; + ext_api.runtime.sendMessage({request: 'getExtFetch', data: {url: url, json_key: json_key, headers: headers, data_ext_fetch_id: data_ext_fetch_id}}); +} + +var selector_level; +function replaceDomElementExt(url, proxy, base64, selector, text_fail = '', selector_source = selector, selector_archive = selector) { + let article = document.querySelector(selector); + if (!article) + return; + if (proxy) { + selector_level = true; + if (!text_fail) { + if (url.startsWith('https://archive.')) + text_fail = 'BPC > Try for full article text (no need to report issue for external site):\r\n'; + else if (!matchUrlDomain(window.location.hostname, url)) + text_fail = 'BPC > failed to load from external site:\r\n'; + } + ext_api.runtime.sendMessage({request: 'getExtSrc', data: {url: url, selector: selector, selector_source: selector_source, selector_archive: selector_archive, base64: base64, text_fail: text_fail, headers: fetch_headers}}); + } else { + fetch(url, {headers: fetch_headers}) + .then(response => { + let article = document.querySelector(selector); + if (response.ok) { + response.text().then(html => { + replaceDomElementExtSrc(url, '', html, false, base64, selector, text_fail, selector_source); + }); + } else { + replaceTextFail(url, article, proxy, text_fail); + } + }).catch(function (err) { + replaceTextFail(url, article, proxy, text_fail); + }); + } +} + +function getSelectorLevel(selector) { + if (selector.replace(/,\s+/g, ',').match(/[>\s]+/)) + selector = selector.replace(/,\s+/g, ',').split(',').map(x => x.match(/[>\s]+/) ? x + ', ' + x.split(/[>\s]+/).pop() : x).join(', '); + return selector; +} + +function replaceDomElementExtSrc(url, url_src, html, proxy, base64, selector, text_fail = '', selector_source = selector, selector_archive = selector) { + let article = document.querySelector(selector); + let article_link = document.querySelector(selector_archive); + let no_content_msg = ' | no article content found! | :'; + if (html) { + if (!proxy && base64) { + html = decode_utf8(atob(html)); + selector_source = 'body'; + } + let parser = new DOMParser(); + window.setTimeout(function () { + if (url.startsWith('https://archive.') && url_src) { + let domain_archive = url.match(/^https:\/\/(archive\.\w{2})/)[1]; + let pathname = new URL(url_src).pathname; + html = html.replace(new RegExp('https:\\/\\/' + domain_archive.replace('.', '\\.') + '\\/o\\/\\w+\\/', 'g'), '').replace(new RegExp("(src=\"|background-image:url\\(')" + pathname.replace('/', '\\/'), 'g'), "$1" + 'https://' + domain_archive + pathname); + } + let doc = parser.parseFromString(DOMPurify.sanitize(html, dompurify_options), 'text/html'); + //console.log(DOMPurify.removed); + if (selector_level) + selector_source = getSelectorLevel(selector_source); + let article_new = doc.querySelector(selector_source); + if (article_new) { + if (article && article.parentNode) { + if (url.startsWith('https://archive.')) { + let arch_dom = (selector_archive !== selector) ? (article_new.querySelector(selector_archive) || document.querySelector(selector_archive)) : article_new; + if (arch_dom) { + if (arch_dom.firstChild) + arch_dom = arch_dom.firstChild; + let arch_div = document.createElement('div'); + arch_div.appendChild(archiveLink_renew(url_src)); + arch_div.appendChild(archiveLink(window.location.href, 'BPC > Full article text fetched from (no need to report issue for external site):\r\n')); + arch_div.style = 'margin: 0px 0px 50px;'; + arch_dom.before(arch_div); + } + let targets = article_new.querySelectorAll('a[target="_blank"][href^="' + window.location.origin + '"]'); + for (let elem of targets) + elem.removeAttribute('target'); + let invalid_links = article_new.querySelectorAll('link[rel*="preload"]:not([href])'); + removeDOMElement(...invalid_links); + } + window.setTimeout(function () { + if (article.parentNode) { + article.parentNode.replaceChild(article_new, article); + if (func_post) + func_post(); + } + }, 200); + } + } else + replaceTextFail(url, article_link, proxy, text_fail.replace(':', no_content_msg)); + }, 200); + } else { + replaceTextFail(url, article_link, proxy, url_src ? text_fail.replace(':', no_content_msg) : text_fail); + } +} + +function replaceTextFail(url, article, proxy, text_fail) { + if (text_fail && article) { + let text_fail_div = document.createElement('div'); + text_fail_div.id = 'bpc_fail'; + text_fail_div.setAttribute('style', 'margin: 0px 50px; font-weight: bold; color: red;'); + text_fail_div.appendChild(document.createTextNode(text_fail)); + if (proxy) { + if (url.startsWith('https://archive.')) { + text_fail_div = archiveLink(url.replace(/^https:\/\/archive\.\w{2}\//, ''), text_fail); + } else { + let a_link = document.createElement('a'); + a_link.innerText = url; + a_link.href = url; + a_link.target = '_blank'; + text_fail_div.appendChild(a_link); + } + } + if (article.firstChild) + article.firstChild.before(text_fail_div); + else + article.appendChild(text_fail_div); + } +} + +function amp_images_replace() { + window.setTimeout(function () { + let amp_images = document.querySelectorAll('figure amp-img[src^="http"]'); + for (let amp_image of amp_images) { + let elem = document.createElement('img'); + elem.src = amp_image.getAttribute('src'); + elem.alt = amp_image.getAttribute('alt'); + elem.style = 'width: 100%;'; + amp_image.parentNode.replaceChild(elem, amp_image); + } + }, 1000); +} + +function amp_iframes_replace(weblink = false, source = '') { + let amp_iframes = document.querySelectorAll('amp-iframe' + (source ? '[src*="' + source + '"]' : '')); + let par, elem; + for (let amp_iframe of amp_iframes) { + if (!weblink) { + if (amp_iframe.offsetHeight > 10) { + elem = document.createElement('iframe'); + elem.src = amp_iframe.getAttribute('src').replace(/^http:/, 'https:'); + elem.style = 'height: ' + amp_iframe.offsetHeight + 'px; width: 100%; border: 0px;'; + if (amp_iframe.getAttribute('sandbox')) + elem.sandbox = amp_iframe.getAttribute('sandbox'); + amp_iframe.parentNode.replaceChild(elem, amp_iframe); + } + } else { + par = document.createElement('p'); + par.style = 'margin: 20px 0px;'; + elem = document.createElement('a'); + elem.innerText = 'Media-link'; + elem.setAttribute('href', amp_iframe.getAttribute('src')); + elem.setAttribute('target', '_blank'); + par.appendChild(elem); + amp_iframe.parentNode.replaceChild(par, amp_iframe); + } + } +} + +function amp_redirect_not_loop(amphtml) { + if (!check_loop()) { + window.location.href = amphtml.href; + } else { + let header = (document.body && document.body.firstChild) || document.documentElement; + header_nofix(header, '', 'BPC > redirect to amp failed (disable amp-to-html extension/add-on or browser setting)'); + } +} + +function amp_redirect(paywall_sel, paywall_action = '', amp_url = '') { + let paywall = document.querySelectorAll(paywall_sel); + let amphtml = document.querySelector('head > link[rel="amphtml"]'); + if (!amphtml && amp_url) + amphtml = {href: amp_url}; + if (paywall.length && amphtml) { + clearPaywall(paywall, paywall_action); + amp_redirect_not_loop(amphtml); + } +} + +function amp_unhide_subscr_section(amp_ads_sel = '', replace_iframes = true, amp_iframe_link = false, source = '') { + let preview = document.querySelectorAll('[subscriptions-section="content-not-granted"]'); + removeDOMElement(...preview); + let subscr_section = document.querySelectorAll('[subscriptions-section="content"]'); + for (let elem of subscr_section) + elem.removeAttribute('subscriptions-section'); + hideDOMStyle(amp_ads_sel, 5); + if (replace_iframes) + amp_iframes_replace(amp_iframe_link, source); +} + +function amp_unhide_access_hide(amp_access = '', amp_access_not = '', amp_ads_sel = '', replace_iframes = true, amp_iframe_link = false, source = '') { + let access_hide = document.querySelectorAll('[amp-access' + amp_access + '][amp-access-hide]:not([amp-access="error"], [amp-access^="message"], .piano)'); + for (let elem of access_hide) + elem.removeAttribute('amp-access-hide'); + if (amp_access_not) { + let amp_access_not_dom = document.querySelectorAll('[amp-access' + amp_access_not + ']'); + removeDOMElement(...amp_access_not_dom); + } + hideDOMStyle(amp_ads_sel, 6); + if (replace_iframes) + amp_iframes_replace(amp_iframe_link, source); +} + +function ampToHtml() { + window.setTimeout(function () { + let canonical = document.querySelector('head > link[rel="canonical"][href]'); + if (canonical) + window.location.href = canonical.href; + }, 1000); +} + +function check_loop(interval = 2000) { + let loop = true; + let loop_date = Number(sessionStorage.getItem('###_loop')); + if (!(loop_date && (Date.now() - loop_date < interval))) { + sessionStorage.setItem('###_loop', Date.now()); + loop = false; + } + return loop; +} + +function refreshCurrentTab(not_loop = true, not_loop_msg = true) { + if (!not_loop || !check_loop(5000)) { + window.setTimeout(function () { + window.location.reload(true); + }, 500); + } else if (not_loop_msg) { + let header = (document.body && document.body.firstChild) || document.documentElement; + header_nofix(header, '', 'BPC > refresh loop stopped'); + } +} + +function refreshCurrentTab_bg() { + ext_api.runtime.sendMessage({request: 'refreshCurrentTab'}); +} + +function archiveRandomDomain() { + let tld_array = ['fo', 'is', 'li', 'md', 'ph', 'vn']; + let tld = tld_array[randomInt(6)]; + return 'archive.' + tld; +} + +function archiveLink(url, text_fail = 'BPC > Try for full article text (no need to report issue for external site):\r\n') { + return externalLink(['archive.today', archiveRandomDomain()], 'https://{domain}?run=1&url={url}', url, text_fail); +} + +function archiveLink_renew(url, text_fail = 'BPC > Only use to renew if text is incomplete or updated:\r\n') { + return externalLink([new URL(url).hostname], '{url}/again?url=' + window.location.href, url, text_fail); +} + +function googleSearchToolLink(url, text_fail = 'BPC > Try for full article text (test url & copy html (tab) code to [https://codebeautify.org/htmlviewer]):\r\n') { + return externalLink(['search.google.com'], 'https://search.google.com/test/rich-results?url={url}', encodeURIComponent(url), text_fail); +} + +function freediumLink(url, text_fail = 'BPC > Try for full article text:\r\n') { + return externalLink(['freedium.cfd'], 'https://{domain}/{url}', url, text_fail); +} + +function readMediumLink(url, text_fail = 'BPC > Try for full article text:\r\n') { + return externalLink(['readmedium.com'], 'https://{domain}/{url}', url, text_fail); +} + +function externalLink(domains, ext_url_templ, url, text_fail = 'BPC > Full article text:\r\n') { + let text_fail_div = document.createElement('div'); + text_fail_div.id = 'bpc_archive'; + text_fail_div.setAttribute('style', 'margin: 20px; font-size: 20px; font-weight: bold; color: red;'); + let parser = new DOMParser(); + text_fail = text_fail.replace(/\[(?[^\]]+)\]/g, function (match, url) { + return "" + new URL(url).hostname + ""; + }); + let doc = parser.parseFromString('' + text_fail + '', 'text/html'); + let elem = doc.querySelector('span'); + text_fail_div.appendChild(elem); + for (let domain of domains) { + let ext_url = ext_url_templ.replace('{domain}', domain).replace('{url}', url.split('?')[0]); + let a_link = document.createElement('a'); + a_link.innerText = domain; + a_link.href = ext_url; + a_link.target = '_blank'; + text_fail_div.appendChild(document.createTextNode(' | ')); + text_fail_div.appendChild(a_link); + } + return text_fail_div; +} + +function removeClassesByPrefix(el, prefix) { + let el_classes = el.classList; + for (let el_class of el_classes) { + if (el_class.startsWith(prefix)) + el_classes.remove(el_class); + } +} + +function removeClassesList(list) { + for (let class_item of list) { + let elems = document.querySelectorAll('.' + class_item); + for (let elem of elems) + elem.classList.remove(class_item); + } +} + +function cookieExists(name) { + return document.cookie.split(';').some(function (item) { + return item.trim().indexOf(name + '=') === 0 + }) +} + +function setCookie(name, value, domain, path, days) { + let max_age = days * 24 * 60 * 60; + document.cookie = name + "=" + (value || "") + "; domain=" + domain + "; path=" + path + "; max-age=" + max_age; +} + +function insert_script(func, insertAfterDom) { + let bpc_script = document.querySelector('script#bpc_script'); + if (!bpc_script) { + let script = document.createElement('script'); + script.setAttribute('id', 'bpc_script'); + script.appendChild(document.createTextNode('(' + func + ')();')); + let insertAfter = insertAfterDom ? insertAfterDom : (document.body || document.head || document.documentElement); + insertAfter.appendChild(script); + } +} + +function getSourceJsonScript(filter, attributes = ':not([src], [type])') { + if (typeof filter === 'string') + filter = new RegExp(filter); + let scripts = document.querySelectorAll('script' + attributes); + for (let script of scripts) { + if (script.text.match(filter)) + return script; + } + return false; +} + +function getArticleJsonScript() { + let scripts = document.querySelectorAll('script[type="application/ld+json"]'); + let json_script; + for (let script of scripts) { + if (script.innerText.match(/"(articlebody|text)":/i)) { + json_script = script; + break; + } + } + return json_script; +} + +function restorePugpigLink(node, art_link_sel = '') { + let art_link = !art_link_sel ? node : node.querySelector(art_link_sel); + if (art_link) + art_link.onmousedown = x => window.location.href = art_link.href; +} + +function restorePugpigPage() { + let art_link_sel = 'a.pp-widget-article, a.pp-related__link'; + document.querySelectorAll(art_link_sel).forEach(e => restorePugpigLink(e)); + waitDOMElement(art_link_sel, 'A', restorePugpigLink, true); + waitDOMElement('li[class^="collection_type-"]', 'LI', node => restorePugpigLink(node, art_link_sel), true); + csDoneOnce = true; + let modal = 'section.modal'; + hideDOMStyle(modal); + let paywall = document.querySelector('div.paywall'); + if (paywall) + refreshCurrentTab(); +} + +function getArticleQuintype() { + let article_new; + let json_script = document.querySelector('script#static-page'); + if (json_script) { + try { + article_new = document.createElement('div'); + let parser = new DOMParser(); + let json = JSON.parse(json_script.text); + let slug = json.qt.data.story.slug; + if (slug && !window.location.pathname.includes(slug)) + refreshCurrentTab_bg(); + let pars = json.qt.data.story.cards; + for (let par of pars) { + let story_elements = par['story-elements']; + for (let elem of story_elements) { + let par_elem; + if (['text', 'title'].includes(elem.type) && elem.text) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(elem.text, dompurify_options) + '
', 'text/html'); + par_elem = doc.querySelector('div'); + } else if (elem.type === 'image') { + if (elem['image-s3-key']) { + par_elem = document.createElement('figure'); + let img = document.createElement('img'); + img.src = 'https://media.assettype.com/' + elem['image-s3-key']; + par_elem.appendChild(img); + if (elem.title) { + let caption = document.createElement('figcaption'); + if (elem.title.includes('' + DOMPurify.sanitize(elem.title, dompurify_options) + '
', 'text/html'); + caption.appendChild(doc.querySelector('div')); + } else + caption.innerText = elem.title; + par_elem.appendChild(caption); + } + } + } else if (elem.type === 'jsembed') { + if (elem.subtype === 'tweet') { + if (elem.metadata && elem.metadata['tweet-url']) { + par_elem = document.createElement('a'); + par_elem.href = par_elem.innerText = elem.metadata['tweet-url']; + par_elem.target = '_blank'; + } else + console.log(elem); + } + } else if (elem.type === 'youtube-video') { + if (elem['embed-url']) { + par_elem = document.createElement('iframe'); + par_elem.src = elem['embed-url']; + par_elem.style = 'width: 100%; height: 400px;'; + } + } else if (elem.type === 'file') { + if (elem.url && elem['file-name']) { + par_elem = document.createElement('a'); + par_elem.href = elem.url; + par_elem.innerText = elem['file-name']; + par_elem.target = '_blank'; + } + } else if (!['widget'].includes(elem.type)) + console.log(elem); + if (par_elem) + article_new.appendChild(par_elem); + } + } + if (!article_new.hasChildNodes()) + article_new = ''; + } catch (err) { + console.log(err); + } + } + return article_new; +} + +function filterObject(obj, filterFn, mapFn = function (val, key) { + return [key, val]; +}) { + return Object.fromEntries(Object.entries(obj). + filter(([key, val]) => filterFn(val, key)).map(([key, val]) => mapFn(val, key))); +} + +function matchKeyJson(key, keys) { + let match = false; + if (typeof keys === 'string') + match = (key === keys); + else if (Array.isArray(keys)) + match = keys.includes(key); + else if (keys instanceof RegExp) + match = keys.test(key); + return match; +} + +function findKeyJson(json, keys, min_val_len = 0) { + let source = ''; + if (Array.isArray(json)) { + for (let elem of json) + source = source || findKeyJson(elem, keys, min_val_len); + } else if (typeof json === 'object') { + for (let elem in json) { + let json_elem = json[elem]; + if (typeof json_elem === 'string' && matchKeyJson(elem, keys)) { + if (json_elem.length > min_val_len) + return json_elem; + } else if (Array.isArray(json_elem) && json_elem.length > 1 && matchKeyJson(elem, keys)) { + return json_elem; + } else + source = source || findKeyJson(json_elem, keys, min_val_len); + } + } + return source; +} + +function getNestedKeys(obj, key) { + if (key in obj) + return obj[key]; + let keys = key.split('.'); + let value = obj; + for (let i = 0; i < keys.length; i++) { + value = value[keys[i]]; + if (value === undefined) + break; + } + return value; +} + +function getJsonUrlText(article, callback, article_id = '', key = '', url_rest = false, url_slash = false) { + let json_url_dom = document.querySelector('head > link[rel="alternate"][type="application/json"][href]'); + let json_url; + if (json_url_dom) { + json_url = json_url_dom.href; + let hostname = window.location.hostname; + let regex = /www\.autohebdo(f1)?\.\w{2,3}/; + if (json_url.match(regex) && !json_url.includes(hostname)) + json_url = json_url.replace(regex, hostname); + } + if (!json_url && article_id) + json_url = window.location.origin + '/wp-json/wp/v2/posts/' + article_id; + if (url_rest) + json_url = json_url.replace('/wp-json/', '/?rest_route=/'); + else if (url_slash) + json_url = json_url.replace('/wp-json/', '//wp-json/'); + if (json_url) { + fetch(json_url) + .then(response => { + if (response.ok) { + response.json().then(json => { + try { + let json_text = parseHtmlEntities(!key ? json.content.rendered : getNestedKeys(json, key)); + if (json_text && json_text !== 'undefined') + callback(json_text, article); + } catch (err) { + console.log(err); + } + }); + } + }); + } +} + +function getJsonUrlAdd(json_text, article, art_options = {}) { + let art_type = 'div'; + let art_attrib = ''; + if (Object.keys(art_options).length) { + if (art_options.art_type) + art_type = art_options.art_type; + if (art_options.art_class) + art_attrib += ' class="' + art_options.art_class + '"'; + if (art_options.art_id) + art_attrib += ' id="' + art_options.art_id + '"'; + if (art_options.art_style) + art_attrib += ' style="' + art_options.art_style + '"'; + if (art_options.func_text) + json_text = art_options.func_text(json_text); + } + let parser = new DOMParser(); + let doc = parser.parseFromString('<' + art_type + art_attrib + '>' + DOMPurify.sanitize(json_text, dompurify_options) + '', 'text/html'); + let article_new = doc.querySelector(art_type); + if (art_options.art_append || !article.parentNode) { + if (!art_options.art_hold) + article.innerHTML = ''; + article.appendChild(article_new); + } else + article.parentNode.replaceChild(article_new, article); + if (func_post) + func_post(); +} + +function getJsonUrl(paywall_sel, paywall_action = '', article_sel, art_options = {}, article_id = '', key = '', url_rest = false, url_slash = false) { + let paywall = document.querySelectorAll(paywall_sel); + let article = document.querySelector(article_sel); + if (paywall.length && article && dompurify_loaded) { + clearPaywall(paywall, paywall_action); + getJsonUrlText(article, (json_text, article) => { + if (json_text && article) + getJsonUrlAdd(json_text, article, art_options); + }, article_id, key, url_rest, url_slash); + } +} + +function genHexString(len) { + let output = ''; + for (let i = 0; i < len; i++) + output += (Math.floor(Math.random() * 16)).toString(16); + return output; +} + +function makeRandomNumber(len) { + let result = ''; + let characters = '123456789'; + let charactersLength = characters.length; + for (let i = 0; i < len; i++) + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + return result; +} + +function randomInt(max) { + return Math.floor(Math.random() * Math.floor(max)); +} + +function randomIP(range_low = 0, range_high = 223) { + let rndmIP = []; + for (let n = 0; n < 4; n++) { + if (n === 0) + rndmIP.push(range_low + randomInt(range_high - range_low + 1)); + else + rndmIP.push(randomInt(255) + 1); + } + return rndmIP.join('.'); +} + +function pageContains(selector, text) { + let elements = document.querySelectorAll(selector); + return Array.prototype.filter.call(elements, function (element) { + return RegExp(text).test(element.textContent); + }); +} + +function findOverlap(a, b) { + if (b.length === 0) + return ""; + if (a.endsWith(b)) + return b; + return findOverlap(a, b.substring(0, b.length - 1)); +} + +function breakText(str, headers = false) { + str = str.replace(/(?:^|[A-Za-z\"\“\”\)])(\.+|\?|!)(?=[A-ZÖÜ\„\”\d][A-Za-zÀ-ÿ\„\d]{1,})/gm, "$&\n\n"); + if (headers) + str = str.replace(/(([a-z]{2,}|[\"\“]))(?=[A-Z](?=[A-Za-zÀ-ÿ]+))/gm, "$&\n\n"); + return str; +} + +function breakText_headers(str) { + str = breakText(str, true); + // exceptions: names with alternating lower/uppercase (no general fix) + let str_rep_arr = ['AstraZeneca', 'BaFin', 'BerlHG', 'BfArM', 'BilMoG', 'BioNTech', 'ChatGPT', 'DiGA', 'EuGH', 'FinTechRat', 'GlaxoSmithKline', 'IfSG', 'medRxiv', 'mmHg', 'OpenAI', 'PlosOne', 'StVO', 'TikTok']; + let str_rep_split; + let str_rep_src; + for (let str_rep of str_rep_arr) { + str_rep_split = str_rep.split(/([a-z]+)(?=[A-Z](?=[A-Za-z]+))/); + str_rep_src = str_rep_split.reduce(function (accumulator, currentValue) { + return accumulator + currentValue + ((currentValue !== currentValue.toUpperCase()) ? '\n\n' : ''); + }); + if (str_rep_src.endsWith('\n\n')) + str_rep_src = str_rep_src.slice(0, -2); + str = str.replace(new RegExp(str_rep_src, "g"), str_rep); + } + str = str.replace(/De\n\n([A-Z])/g, "De$1"); + str = str.replace(/La\n\n([A-Z])/g, "La$1"); + str = str.replace(/Le\n\n([A-Z])/g, "Le$1"); + str = str.replace(/Mc\n\n([A-Z])/g, "Mc$1"); + return str; +} + +function parseHtmlEntities(encodedString) { + let parser = new DOMParser(); + let doc = parser.parseFromString('', 'text/html'); + let dom = doc.querySelector('textarea'); + return dom.value; +} + +function encode_utf8(str) { + return unescape(encodeURIComponent(str)); +} + +function decode_utf8(str) { + return decodeURIComponent(escape(str)); +} + +function fix_dowjones_live() { + let paywall = document.querySelector('div#cx-lc-snippet'); + if (paywall) { + removeDOMElement(paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json) { + let article = document.querySelector('div[data-id="StreamBody_index_MainContainer"]'); + if (article) { + let pars = json[0].liveBlogUpdate; + for (let par of pars) { + if (par.headline && par.articleBody) { + let headline = document.createElement('p'); + headline.innerText = par.headline; + headline.style = 'font-weight: bold;'; + let author = document.createElement('a'); + if (par.author && par.author.sameAs) { + author.href = par.author.sameAs[0]; + author.innerText = par.author.name; + } + let date = document.createElement('p'); + if (par.dateModified && par.datePublished) { + date.innerText = 'Updated ' + par.dateModified.replace(/(T|:\d+\.\d+Z$)/g, ' ') + ' ET / Original ' + par.datePublished.replace(/(T|:\d+\.\d+Z$)/g, ' ') + ' ET'; + } + let body = document.createElement('p'); + body.innerText = par.articleBody; + article.after(headline, author, date, body); + } + } + } + } + } catch (err) { + console.log(err); + } + } + let fade = document.querySelectorAll('div[class*="-CardWrapper"]'); + for (let elem of fade) + elem.removeAttribute('class'); + } +} diff --git a/contentScript_once.js b/contentScript_once.js new file mode 100644 index 0000000..ee9bd74 --- /dev/null +++ b/contentScript_once.js @@ -0,0 +1,237 @@ +//'use strict'; +var ext_api = (typeof browser === 'object') ? browser : chrome; + +if (matchDomain('gitflic.ru')) { + if (window.location.pathname.startsWith('/project/magnolia1234/bpc_uploads') && document.head) { + let sheet = document.createElement('style'); + let path_short = window.location.pathname.replace('/project/magnolia1234/bpc_uploads', ''); + if (!path_short) + sheet.innerText = 'div[data-cell-type="commit"], div[data-cell-type="date"] {display: none !important;} div[data-cell-type="filename"] {flex: 0 0 100% !important;}'; + else if (path_short.match(/^\/(blob|file)/)) + sheet.innerText = 'div.project-files-tree, div.project-files-list {flex: 0 0 50% !important; max-width: 50% !important;}'; + if (sheet.innerText) + document.head.appendChild(sheet); + } +} + +else { + +window.setTimeout(function () { + let hostname = window.location.hostname.replace(/^www\./, ''); + let custom_domain = getCookieDomain(hostname); + let group; + if (hostname && ext_api.runtime) { + if (document.querySelector('head > link[href*=".medium.com/"]') || matchDomain(['gitconnected.com', 'plainenglish.io'])) + group = 'medium.com'; + else if (document.querySelector('head > meta[property="og:image"][content*="beehiiv"]')) + group = '###_beehiiv'; // no fix + else if (document.querySelector('head > meta[name="generator"][content^="Ghost"]') && !document.querySelector('script[src^="https://steadyhq.com/"]')) + group = '###_ghost'; // no fix + else if (document.querySelector('head > link[href*="/leaky-paywall"], script[src*="/leaky-paywall"], div[id^="issuem-leaky-paywall-"]')) + group = '###_wp_leaky_paywall'; + else if (document.querySelector('head > link[href^="https://substackcdn.com/"]')) + group = '###_substack_custom'; // no fix + else if (matchDomain(['monitor.co.ug', 'mwananchi.co.tz', 'mwanaspoti.co.tz', 'thecitizen.co.tz'])) + group = '###_ke_nation_media'; + else if (document.querySelector('head > link[href="//ppt.promedia.nl"]') || document.querySelector('head > script[src*="/pmgnews/scripts/promedia.js"]')) + group = '###_nl_promedia'; + else if (hostname.match(/\.com$/) && !matchDomain(['campaignlive.com']) && document.querySelector('span#hmn-logo > a[href="https://www.haymarketmedicalnetwork.com/about"], footer a[href="https://www.haymarketmediaus.com/haymarket-media-inc-privacy-policy/"]')) + group = '###_uk_haymarket_medical'; + else if (matchDomain(['asianinvestor.net', 'campaignindia.in', 'taspo.de']) || (hostname.match(/\.co(m|\.uk)$/) && document.querySelector('footer a[href^="http://www.haymarket.com"]'))) + group = '###_uk_haymarket'; + else if (matchDomain(['epochtimes-romania.com']) || hostname.match(/\.epochtimes\.(com\.br|cz|de|fr|jp)/)) + group = '###_usa_epochtimes'; + else if (hostname.match(/\.(com|net)\.au$/) && !matchDomain(['insideretail.com.au'])) { + if (document.querySelector('a[href^="https://austcommunitymedia.my.site.com/"]')) + group = '###_au_comm_media'; + else if (hostname.endsWith('.com.au')) { + if (document.querySelector('head > link[href="https://images.thewest.com.au"]')) + group = 'thewest.com.au'; + else if (document.querySelector('head > link[rel="dns-prefetch"][href="//static.ew.mmg.navigacloud.com"]')) + group = '###_au_mmg'; + else if (document.querySelector('div.c-footer__copyright > a[href^="https://nemedia.com.au"]')) + group = '###_au_nomedia'; // no fix + else if (hostname.match('farmingahead.com.au')) + group = '###_uk_aspermont'; // no fix + } + } else if (hostname.endsWith('.cl')) { + if (document.querySelector('head > meta[property="og:image"][content*="/impresa.soy-chile.cl/"]')) + group = 'elmercurio.com'; + } else if (hostname.match(/\.(de|at|ch)$/) || matchDomain(['horizont.net', 'lebensmittelzeitung.net'])) { + if (document.querySelector('head > script[src*="/dfv.containers.piwik.pro/"]')) + group = '###_de_dfv_medien'; + else if (hostname.endsWith('.de')) { + if (document.querySelector('div.navigation__personalization > a[href^="https://www.haas-mediengruppe.de/"]')) + group = '###_de_haas_medien'; + else if (document.querySelector('head > link[href*=".rndtech.de/"]')) + group = '###_de_madsack'; + else if (document.querySelector('a.mgw-logo[href^="https://mgw.de"]')) + group = '###_de_mgw'; + else if (matchDomain(['buerstaedter-zeitung.de', 'hochheimer-zeitung.de', 'lampertheimer-zeitung.de', 'lauterbacher-anzeiger.de', 'main-spitze.de', 'mittelhessen.de', 'oberhessische-zeitung.de', 'wormser-zeitung.de'])) + group = '###_de_vrm'; + else if (matchDomain('finanzbusiness.de')) + group = '###_dk_watch_media'; // custom + else if (matchDomain('schwaebische-post.de') || document.querySelector('header a[href^="https://www.ippen.media"]')) + group = '###_de_ippen_media'; + } else if (hostname.endsWith('.ch')) { + if (document.querySelector('head > link[href*="/assets.static-chmedia.ch/"]')) + group = '###_ch_media'; + else if (document.querySelector('div#__next > div.page-section li > a[href^="https://jobs.tamedia.ch/"]')) + group = '###_ch_tamedia'; + } + } else if (hostname.endsWith('.dk')) { + if (matchDomain(['doi.dk']) || document.querySelector('div#footer > div.row > div.col > a[href="https://www.dkmedier.dk"]')) + group = '###_dk_medier'; + else if (hostname.endsWith('watch.dk') && document.querySelector('head > link[as="image"][imagesrcset^="https://photos.watchmedier.dk/"]')) + group = '###_dk_watch_media'; // custom + } else if (hostname.match(/\.(es|cat)$/) || matchDomain(['diariocordoba.com', 'elperiodicodearagon.com', 'elperiodicoextremadura.com', 'elperiodicomediterraneo.com', 'emporda.info'])) { + if (document.querySelector('head > link[href*="/estaticos-cdn."]')) + group = '###_es_epiberica'; + else if (document.querySelector('div > ul > li > a[href="https://www.sportlife.es/"]')) + group = '###_es_sport_life'; + } else if (hostname.endsWith('.fi')) { + if (document.querySelector('head > link[href^="https://assets.almatalent.fi"]')) + group = '###_fi_alma_talent'; // no fix + else if (document.querySelector('head[prefix*=".kalevamedia.fi/"]')) + group = '###_fi_kaleva'; // no fix + } else if (hostname.endsWith('.fr')) { + if (document.querySelector('head > meta[name="google-play-app"][content^="app-id=com.centrefrance"]')) + group = '###_fr_gcf'; + else if (matchDomain(['cahiers-techniques-batiment.fr', 'lemoniteur.fr', 'lsa-conso.fr'])) + group = '###_fr_groupe_infopro'; + } else if (hostname.endsWith('.it')) { + if (document.querySelector('head > link[href^="//citynews.stgy.ovh/"]')) + group = '###_it_citynews'; // no fix + else if (matchDomain(['gazzettadimodena.it', 'gazzettadireggio.it', 'lanuovaferrara.it'])) + group = '###_it_gruppo_sae'; + } else if (hostname.endsWith('.nl')) { + if (document.querySelector('head > link[href*=".ndcmediagroep.nl/"]')) + group = '###_nl_mediahuis_noord'; + else if (document.querySelector('head > link[rel="dns-prefetch"][href^="https://vmn-"][href$="imgix.net"]')) + group = '###_nl_vmnmedia'; // no fix + } else if (hostname.endsWith('.no')) { + if (hostname.endsWith('watch.no') && document.querySelector('head > link[as="image"][imagesrcset^="https://photos.watchmedier.dk/"]')) + group = '###_dk_watch_media'; // custom + } else if (hostname.endsWith('.se')) { + if (document.querySelector('footer > div > div > a[href="https://www.nwtmedia.se/"]')) + group = '###_se_nwt_media'; + else if (document.querySelector('footer ul > li > a[href^="https://privacy.bonniernews.se/cookiepolicy"]')) + group = '###_se_bonnier_group'; + else if (document.querySelector('head > link[href^="https://cdn.gotamedia.se/"]')) + group = '###_se_gota_media'; // no fix + } else if (hostname.match(/\.(co\.uk|scot)$/)) { + if (matchDomain(['motortransport.co.uk'])) + group = '###_uk_dvv_media'; + else if (document.querySelector('footer > div a[href^="https://www.nationalworldplc.com"]')) + group = '###_uk_nat_world'; + else if (document.querySelector('footer li > a[href^="https://www.newsquest.co.uk/"]')) + group = '###_uk_newsquest'; + else if (document.querySelector('div#wrbm-footer-div')) + group = '###_uk_william_reed'; + else if (matchDomain(['footballleagueworld.co.uk'])) + group = '###_ca_valnet'; + } else if (hostname.match(/\.(ca|com|net|news|org)$/)) { + if (matchDomain(['latribune.ca', 'lavoixdelest.ca', 'ledroit.com', 'lenouvelliste.ca', 'lequotidien.com'])) + group = '###_ca_gcm'; + else if (matchDomain(['montrealgazette.com']) || document.querySelector('head > script[src*=".postmedia.digital/"], head > meta[content*=".postmedia.digital/"]')) + group = '###_ca_postmedia'; + else if (document.querySelector('div.asp_logo > a > img[src$="aspermont.png"]')) + group = '###_uk_aspermont'; // no fix + else if (document.querySelector('head > script[src*=".axate.io/"], head > script[src*=".agate.io/"]')) + group = '###_uk_axate.io'; + else if (matchDomain(['flightglobal.com', 'freightcarbonzero.com', 'heavyliftpfi.com', 'personneltoday.com', 'railwaygazette.com'])) + group = '###_uk_dvv_media'; + else if (document.querySelector('footer li > a[href^="https://www.newsquest.co.uk/"]')) + group = '###_uk_newsquest'; + else if (document.querySelector('div#wrbm-footer-div')) + group = '###_uk_william_reed'; + else if (document.querySelector('head > script[src="https://cdn.blueconic.net/bridgetowermedia.js"], header.site-header > div.btm-header')) + group = '###_usa_bridge_tower'; + else if (document.querySelector('head > script[type][src*="-cnhi-pw.newsmemory.com"]')) + group = '###_usa_cnhi'; + else if (document.querySelector('footer#footer li > a[href^="https://cherryroad-media.com"]')) + group = '###_usa_cherryroad'; // no fix + else if (document.querySelector('head > link[href*=".gannettdigital.com/"], head > link[href*=".gannett-cdn.com/"]')) + group = '###_usa_gannett'; + else if (document.querySelector('head > script[src*="/treg.hearstnp.com/"]')) + group = '###_usa_hearst_comm'; + else if (document.querySelector('head > script[src*=".townnews.com/leetemplates.com/')) + group = '###_usa_lee_ent'; + else if (document.querySelector('head > meta[name="tncms-access-version')) + group = '###_usa_townnews'; + else if (document.querySelector('section.bottom-nav > a[href^="https://www.mcclatchy.com/privacy-policy"]')) + group = '###_usa_mcc'; + else if (document.querySelector('head > link[rel="stylesheet"][id^="dfm-accuweather-"], footer li > a[href^="https://www.medianewsgroup.com"]')) + group = '###_usa_mng'; + else if (hostname.match(/\.com$/)) { + if (document.querySelector('div.footer-note > div.text > a[href^="https://www.valnetinc.com"]')) + group = '###_ca_valnet'; + else if (matchDomain(['amwatch.com', 'medwatch.com', 'shippingwatch.com'])) + group = '###_dk_watch_media'; // custom + else if (matchDomain(['journalauto.com', 'journaldupneu.com', 'j2rauto.com'])) + group = '###_fr_synerj'; + else if (matchDomain(['argusdelassurance.com'])) + group = '###_fr_groupe_infopro'; + else if (document.querySelector('[class*="footer" i] a[href^="https://www.delinian.com/privacy-policy"]')) + group = '###_uk_delinian'; // custom + else if (matchDomain(['oed.com']) || (hostname.startsWith('oxford') && document.querySelector('div[id^="footer"] a[href="http://www.oup.com/"]'))) + group = '###_uk_oup'; + else if (document.querySelector('head > meta[property][content^="https://cdn.forumcomm.com/"]')) + group = '###_usa_forum_comm'; + else if (document.querySelector('li > a[href^="https://www.bnpmedia.com/"]')) + group = '###_usa_bnp_media'; + else if (matchDomain(['cfo.com', 'pharmavoice.com', 'proformative.com', 'socialmediatoday.com']) || (hostname.endsWith('dive.com') && document.querySelector('script[src^="/static/js/dist/contentGate.bundle.js"], div.baseline-footer > a[href="http://www.industrydive.com"]'))) + group = '###_usa_industrydive'; + else if (matchDomain(['centralmaine.com', 'pressherald.com', 'sunjournal.com'])) + group = '###_usa_maine_trust'; + else if (document.querySelector('head > meta[name="peim_article_access_type"]')) + group = '###_usa_pei'; + else if (matchDomain(['dayton.com', 'daytondailynews.com', 'journal-news.com', 'springfieldnewssun.com'])) + group = 'ajc.com'; // Cox First Media + else if (matchDomain(['accountingtoday.com', 'benefitnews.com', 'bondbuyer.com', 'dig-in.com', 'financial-planning.com', 'nationalmortgagenews.com'])) + group = 'americanbanker.com'; // Arizent + } + } else { + if (matchDomain(['insideretail.asia', 'insideretail.co.nz', 'insideretail.com.au', 'insideretail.us'])) + group = '###_au_inside_retail'; + } + if (group) + console.log(group); + ext_api.runtime.sendMessage({ + request: 'custom_domain', + data: { + domain: custom_domain, + group: group + } + }); + } +}, 1000); + +} + +function matchDomain(domains, hostname) { + var matched_domain = false; + if (!hostname) + hostname = window.location.hostname; + if (typeof domains === 'string') + domains = [domains]; + domains.some(domain => (hostname === domain || hostname.endsWith('.' + domain)) && (matched_domain = domain)); + return matched_domain; +} + +function getCookieDomain(hostname) { + let domain = hostname; + let n = 0; + let parts = hostname.split('.'); + let str = '_gd' + (new Date()).getTime(); + try { + while (n < (parts.length - 1) && document.cookie.indexOf(str + '=' + str) == -1) { + domain = parts.slice(-1 - (++n)).join('.'); + document.cookie = str + "=" + str + ";domain=" + domain + ";"; + } + document.cookie = str + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=" + domain + ";"; + } catch (e) { + console.log(e); + } + return domain; +} diff --git a/contentScript_once_var.js b/contentScript_once_var.js new file mode 100644 index 0000000..7220d10 --- /dev/null +++ b/contentScript_once_var.js @@ -0,0 +1,106 @@ +//'use strict'; +var ext_api = (typeof browser === 'object') ? browser : chrome; + +var hostname = window.location.hostname; +var de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'maz-online.de', 'neuepresse.de', 'ostsee-zeitung.de', 'rnd.de', 'saechsische.de']; + +if (hostname.match(/\.de$/)) { + +if (matchDomain(de_madsack_domains) || document.querySelector('head > link[href*=".rndtech.de/"]')) { + function madsack_main() { + for (let n = 0; n < 25; n++) { + window.setTimeout(function () { + if (window.Fusion) { + window.Fusion.globalContent.isPaid = false; + } + }, n * 50); + } + } + insert_script(madsack_main); +} + +} + +if (matchDomain('dagsavisen.no')) { + function dagsavisen_main() { + for (let n = 0; n < 25; n++) { + window.setTimeout(function () { + if (window.Fusion && window.Fusion.globalContent.content_restrictions) { + window.Fusion.globalContent.content_restrictions.content_code = 0; + } + }, n * 50); + } + } + insert_script(dagsavisen_main); +} + +else if (matchDomain(['journaldemontreal.com', 'journaldequebec.com'])) { + for (let n = 0; n < 50; n++) { + window.setTimeout(function () { + let article = document.querySelector('div.article-main-txt.composer-content'); + if (article) + article.classList.remove('composer-content'); + }, n * 50); + } +} + +else if (matchDomain('nzherald.co.nz')) { + function nzherald_main() { + for (let n = 0; n < 25; n++) { + window.setTimeout(function () { + if (window.Fusion) { + window.Fusion.globalContent.isPremium = false; + } + }, n * 50); + } + } + insert_script(nzherald_main); +} + +function matchDomain(domains, hostname) { + var matched_domain = false; + if (!hostname) + hostname = window.location.hostname; + if (typeof domains === 'string') + domains = [domains]; + domains.some(domain => (hostname === domain || hostname.endsWith('.' + domain)) && (matched_domain = domain)); + return matched_domain; +} + +function removeDOMElement(...elements) { + for (let element of elements) { + if (element) + element.remove(); + } +} + +function waitDOMElement(selector, tagName = '', callback, multiple = false) { + new window.MutationObserver(function (mutations) { + for (let mutation of mutations) { + for (let node of mutation.addedNodes) { + if (!tagName || (node.tagName === tagName)) { + if (node.matches(selector)) { + callback(node); + if (!multiple) + this.disconnect(); + } + } + } + } + }).observe(document, { + subtree: true, + childList: true + }); +} + +function insert_script(func, insertAfterDom) { + let bpc_script = document.querySelector('script#bpc_script'); + if (!bpc_script) { + let script = document.createElement('script'); + script.setAttribute('id', 'bpc_script'); + script.appendChild(document.createTextNode('(' + func + ')();')); + let insertAfter = insertAfterDom ? insertAfterDom : (document.body || document.head || document.documentElement); + if (insertAfter) + insertAfter.appendChild(script); + } +} diff --git a/custom/manifest.json b/custom/manifest.json new file mode 100644 index 0000000..14e39bb --- /dev/null +++ b/custom/manifest.json @@ -0,0 +1,39 @@ +{ + "background": { + "service_worker": "background.js" + }, + "content_security_policy": { + "extension_pages": "script-src 'self'; object-src 'self'" + }, + "action": { + "default_popup": "options/popup.html" + }, + "description": "Bypass Paywalls of news sites", + "homepage_url": "https://github.com/bpc-clone/bypass-paywalls-chrome-clean", + "icons": { + "128": "bypass.png" + }, + "manifest_version": 3, + "minimum_chrome_version": "109", + "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvLxf4oOeSoz8qKVzKGQWW5zW44hWCoOoQRGXTrObUpyoGfGzhFO8aZHQmBcLrAZMA4O6EA7GaXnHkOPCLKM11seZ4J2azb1gSswApfAlaoeOLnhDnp/Jpzz7Bt6o4HL+nhKRJUOZ9z+GXAyOkOps5O38TwJN5R6z8tLkleRgfYscp19YU/vq1x9PrbXIHJTRB7qtb/iJmiKATKisXGmFY3Nbs5m379TGqcJFBM9bI+8bSJtS4e7t0LHOwSLDq3IVRaWVsFd9P19WEDNTxuzr9+rczOrw1vgmiisNOcElse8cyVIoq4bjepvfHM/9nzDgKwQsNG5OTzujwHu2UUN4cwIDAQAB", + "name": "Bypass Paywalls Clean", + "update_url": "https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=updates.xml", + "short_name": "Bypass Paywall", + "options_ui": { + "open_in_tab": true, + "page": "options/options.html" + }, + "incognito": "split", + "permissions": [ + "cookies", + "storage", + "activeTab", + "declarativeNetRequestWithHostAccess", + "scripting", + "offscreen" + ], + "host_permissions": [ + "*://*/*" + ], + "version": "4.0.8.7" +} diff --git a/custom/mv2/manifest.json b/custom/mv2/manifest.json new file mode 100644 index 0000000..683677c --- /dev/null +++ b/custom/mv2/manifest.json @@ -0,0 +1,33 @@ + { + "background": { + "scripts": ["sites.js", "background.js"] + }, + "content_security_policy": "script-src 'self'; object-src 'self'", + "browser_action": { + "default_popup": "options/popup.html" + }, + "description": "Bypass Paywalls of news sites", + "homepage_url": "https://github.com/bpc-clone/bypass-paywalls-chrome-clean", + "icons": { + "128": "bypass.png" + }, + "manifest_version": 2, + "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvLxf4oOeSoz8qKVzKGQWW5zW44hWCoOoQRGXTrObUpyoGfGzhFO8aZHQmBcLrAZMA4O6EA7GaXnHkOPCLKM11seZ4J2azb1gSswApfAlaoeOLnhDnp/Jpzz7Bt6o4HL+nhKRJUOZ9z+GXAyOkOps5O38TwJN5R6z8tLkleRgfYscp19YU/vq1x9PrbXIHJTRB7qtb/iJmiKATKisXGmFY3Nbs5m379TGqcJFBM9bI+8bSJtS4e7t0LHOwSLDq3IVRaWVsFd9P19WEDNTxuzr9+rczOrw1vgmiisNOcElse8cyVIoq4bjepvfHM/9nzDgKwQsNG5OTzujwHu2UUN4cwIDAQAB", + "name": "Bypass Paywalls Clean", + "update_url": "https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=updates.xml", + "short_name": "Bypass Paywall", + "options_ui": { + "open_in_tab": true, + "page": "options/options.html" + }, + "incognito": "split", + "permissions": [ + "cookies", + "storage", + "activeTab", + "webRequest", + "webRequestBlocking", + "*://*/*" + ], + "version": "4.0.8.7" +} diff --git a/custom/sites_custom.json b/custom/sites_custom.json new file mode 100644 index 0000000..8ecba62 --- /dev/null +++ b/custom/sites_custom.json @@ -0,0 +1,1368 @@ +{ + "###_remove_sites": { + "cs_code": "abcmais.com, bt.no, businessnews.com.au, diariodenavarra.es, dn.se, jota.info, repubblica.it, schwaebische-post.de, telerama.fr, ###_ch_tamedia, group_de_noz_mhn", + "domain": "###" + }, + "Abajournal.com": { + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "domain": "abajournal.com" + }, + "Abendzeitung-muenchen.de": { + "add_ext_link": "section.artdetail_paywall|article>header", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "abendzeitung-muenchen.de" + }, + "Acadienouvelle.com": { + "allow_cookies": 1, + "block_regex": "\\.acadienouvelle\\.com\\/script\\.js", + "domain": "acadienouvelle.com" + }, + "Actu-environnement.com": { + "allow_cookies": 1, + "domain": "actu-environnement.com", + "useragent": "googlebot" + }, + "Adformatie.nl": { + "allow_cookies": 1, + "domain": "adformatie.nl", + "useragent": "googlebot" + }, + "Aftenposten.no": { + "add_ext_link": "div.paywall.fullPageWidth|article>p.paywall", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.hyperion-css-1cc2qe9\", \"rm_elem\":1, \"elems\":[{\"cond\":\"body\", \"set_attrib\": \"style|overflow: auto !important\"}]}, {\"cond\":\"div[class^='advertory-'],button[aria-controls='summary-details']\", \"rm_elem\":1}, {\"cond\":\"div#summary-details\", \"rm_attrib\":\"class\"}]", + "domain": "aftenposten.no" + }, + "Aftermath.site": { + "allow_cookies": 1, + "domain": "aftermath.site", + "ld_json_next": "div[class^='ContentGate_wrapper']|div[class^='PostContent_wrapper']" + }, + "Aftonbladet.se": { + "add_ext_link": "iframe[src^='https://salesposter.']|article>p", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "aftonbladet.se" + }, + "Airmail.news": { + "add_ext_link": "div.paywall-card|div.article-text", + "add_ext_link_type": "archive.is", + "allow_cookies": 1, + "domain": "airmail.news", + "ld_archive_is": "div.paywall-card|article" + }, + "Algonquinbeyond.com": { + "allow_cookies": 1, + "domain": "algonquinbeyond.com", + "ld_json_url": "div[data-elementor-type='section']|div[data-elementor-type='single-post']" + }, + "Aoc.media": { + "allow_cookies": 1, + "block_regex": "\\.poool\\.fr", + "domain": "aoc.media" + }, + "Arkansasonline.com": { + "add_ext_link": "div.bee-page-container|div.article__body", + "add_ext_link_type": "google_search_tool", + "domain": "arkansasonline.com" + }, + "Arktimes.com": { + "allow_cookies": 1, + "block_regex": "\\/arktimes\\.com\\/wp-content\\/plugins\\/.+\\/memberships-gate-metering\\.js", + "domain": "arktimes.com" + }, + "Artsprofessional.co.uk": { + "allow_cookies": 1, + "block_regex": "\\.artsprofessional\\.co\\.uk\\/.+\\/js\\/content_paywall\\.js", + "domain": "artsprofessional.co.uk" + }, + "Athensreviewofbooks.com": { + "allow_cookies": 1, + "domain": "athensreviewofbooks.com", + "ld_json": "div.freeUser|div.itemBody" + }, + "Augsburger-allgemeine.de": { + "add_ext_link": "div.piano-inline-paywall|div#page-body", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "augsburger-allgemeine.de" + }, + "Beauxarts.com": { + "add_ext_link": "div[class^='cta-abonnement-']|div.tags", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "beauxarts.com" + }, + "Bisnisindonesia.id": { + "allow_cookies": 1, + "domain": "bisnisindonesia.id", + "ld_json_next": "div.z-50:not(.modal-container)|article" + }, + "Bizwest.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.fp-paywall\", \"rm_elem\":1, \"elems\":[{\"cond\":\"div.fp-content\", \"rm_attrib\":\"class\"}]}]", + "domain": "bizwest.com" + }, + "Bm-online.de": { + "add_ext_link": "div.plenigo-teaser|div.entry-content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "bm-online.de" + }, + "Booksandpublishing.com.au": { + "allow_cookies": 1, + "domain": "booksandpublishing.com.au", + "ld_json_url": "article form#loginform|div.paywallblurtext" + }, + "Boredpanda.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.open-list-items\", \"rm_class\":\"open-list-items\"}, {\"cond\":\"div#show-all-images-block-premium\", \"rm_elem\":1}]", + "domain": "boredpanda.com" + }, + "Bostonmagazine.com": { + "allow_cookies": 1, + "domain": "bostonmagazine.com", + "useragent": "googlebot" + }, + "Brainly.com": { + "domain": "brainly.com" + }, + "Brandonsun.com": { + "allow_cookies": 1, + "block_regex": "account\\.brandonsun\\.com\\/api\\/v\\d\\/auth\\/identify", + "domain": "brandonsun.com" + }, + "Brusselstimes.com": { + "allow_cookies": 1, + "block_regex": "\\.piano\\.io\\/xbuilder\\/experience\\/execute", + "cs_code": "[{\"cond\":\"div[style*='height: 0;']\", \"rm_attrib\":\"style\"}]", + "domain": "brusselstimes.com" + }, + "Btc-echo.de": { + "allow_cookies": 1, + "domain": "btc-echo.de", + "ld_json_url": "div.btc-echo-plus-paywall|div.entry-content>p" + }, + "Businessinsider.de": { + "add_ext_link": "div.piano-article__paywall|div.piano-article__content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "domain": "businessinsider.de" + }, + "Businesslive.co.za": { + "add_ext_link": "div#comment-shield|div.article-info-container", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "businesslive.co.za" + }, + "Cafe.com (articles only)": { + "allow_cookies": 1, + "domain": "cafe.com", + "ld_json_url": "div.login-module|div.article-bottom-content-text-content" + }, + "Cannabiz.com.au": { + "allow_cookies": 1, + "domain": "cannabiz.com.au", + "ld_json_url": "div#paywall-wrapper|div.entry-content" + }, + "Catholicherald.co.uk": { + "allow_cookies": 1, + "block_regex": "\\.catholicherald\\.co\\.uk\\/c\\/assets\\/pigeon\\.js", + "domain": "catholicherald.co.uk" + }, + "Causette.fr": { + "allow_cookies": 1, + "domain": "causette.fr", + "ld_json_url": "div.ihc-locker-wrap|div.entry-content" + }, + "Chicago.suntimes.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "chicago.suntimes.com" + }, + "Christianitytoday.com": { + "allow_cookies": 1, + "domain": "christianitytoday.com", + "useragent": "googlebot" + }, + "Churchtimes.co.uk": { + "allow_cookies": 1, + "block_js_inline": "\\.churchtimes\\.co\\.uk\\/articles\\/", + "domain": "churchtimes.co.uk", + "useragent": "googlebot" + }, + "Clareecho.ie": { + "allow_cookies": 1, + "block_regex": "\\.flip-pay\\.com\\/", + "cs_code": "[{\"cond\":\"div.td-post-content\", \"rm_class\": \"td-post-content\"}]", + "domain": "clareecho.ie" + }, + "Cnv-medien.de": { + "allow_cookies": 1, + "block_js_inline": "\\.cnv-medien\\.de\\/.+\\.html", + "domain": "cnv-medien.de" + }, + "Connexionfrance.com": { + "domain": "connexionfrance.com" + }, + "Craftscouncil.org.uk": { + "allow_cookies": 1, + "block_regex": "\\/steadyhq\\.com", + "domain": "craftscouncil.org.uk" + }, + "Dailydispatch.co.za": { + "add_ext_link": "div.premium-alert|div#article p", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "dailydispatch.co.za" + }, + "Dailyherald.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "dailyherald.com" + }, + "Dailysceptic.org": { + "allow_cookies": 1, + "domain": "dailysceptic.org", + "ld_json_url": "div.content-inner > div[style='color:gray']|div.content-inner|1" + }, + "Dasinvestment.com (regwall)": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.premium-content\", \"rm_elem\":1, \"elems\": [{\"cond\":\"div.hidden.showAfterLogin:not([style])\", \"rm_class\":\"hidden\"}]}]", + "domain": "dasinvestment.com" + }, + "Delinian Group (flex)": { + "add_ext_link": "div.paywall,div.call_to_action,div[style*='linear-gradient']|main", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "###_uk_delinian" + }, + "Di.se": { + "add_ext_link": "div.tapet-paywall-wrapper,iframe[src^='/walls/']|div.article__body", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "di.se" + }, + "Diabeteshealth.co.in (refresh)": { + "allow_cookies": 1, + "domain": "diabeteshealth.co.in", + "ld_json": "div.paywall-banner|div[class^='text-story-m_gap']" + }, + "Die-tagespost.de": { + "add_ext_link": "div#paywallanchor|section.product-teaser", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "die-tagespost.de" + }, + "Digiday.jp": { + "allow_cookies": 1, + "domain": "digiday.jp", + "ld_json_url": "div#piano-paywall|div.piano-paywall-overview" + }, + "Document.no": { + "allow_cookies": 1, + "domain": "document.no", + "ld_json_url": "section.paywall-container|article>p" + }, + "Ecran-total.fr": { + "allow_cookies": 1, + "domain": "ecran-total.fr", + "ld_json_url": "div.not-connected-disclaimer|div.post-inner" + }, + "Edweek.org (not Market Brief)": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "edweek.org" + }, + "Ekuriren.se": { + "add_ext_link": "iris-article-paywall-wrapper|iris-article-facts-default", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "ekuriren.se" + }, + "Elfinancierocr.com": { + "allow_cookies": 1, + "block_regex": "(\\.tinypass\\.com|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)", + "cs_code": "[{\"cond\":\"div.article-body-wrapper__styled[style]\", \"rm_attrib\":\"style\"}, {\"cond\":\"div.post\", \"rm_elem\":1}]", + "domain": "elfinancierocr.com" + }, + "Elordenmundial.com": { + "add_ext_link": "div.payment-wall|div.entry-content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "elordenmundial.com" + }, + "Engineersireland.ie": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.free-wrapper\", \"rm_elem\":1, \"elems\":[{\"cond\":\"div.article-body[style]\", \"rm_attrib\":\"style\"}]}]", + "domain": "engineersireland.ie" + }, + "Eurotransport.de (refresh)": { + "allow_cookies": 1, + "domain": "eurotransport.de", + "ld_json": "div.blur|div.va-article-text" + }, + "Eviemagazine.com": { + "allow_cookies": 1, + "block_regex": "\\.eviemagazine\\.com\\/api\\/trpc\\/post\\.paywall", + "domain": "eviemagazine.com" + }, + "Farmersjournal.ie": { + "amp_redirect": "div#memberplusModal.in", + "domain": "farmersjournal.ie" + }, + "Finance.si": { + "add_ext_link": "div[id^='hardlock_'],div.regblock|div#article_main", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "finance.si" + }, + "Finansavisen.no": { + "allow_cookies": 1, + "domain": "finansavisen.no", + "useragent": "googlebot" + }, + "Flz.de": { + "allow_cookies": 1, + "domain": "flz.de", + "useragent": "googlebot" + }, + "Fnarena.com": { + "allow_cookies": 1, + "domain": "fnarena.com", + "ld_json_url": "form.formLogin|div.entry-content|1" + }, + "Fokus.se": { + "allow_cookies": 1, + "block_regex": "\\.fokus\\.se\\/app\\/.+\\/sesamy-fpg\\.js", + "domain": "fokus.se" + }, + "Fraenkischertag.de": { + "add_ext_link": "section#productTeaser|div.article_main", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "fraenkischertag.de" + }, + "Frieze.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "frieze.com" + }, + "Gelocal.it": { + "add_ext_link": "iframe#__limio_frame|div.story__content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div#account-pw-container\", \"rm_elem\":1}]", + "domain": "gelocal.it" + }, + "Golf.com": { + "allow_cookies": 1, + "block_regex": "\\/golf\\.com\\/wp-content\\/.+\\/wsumApp\\.js", + "domain": "golf.com" + }, + "Gothamist.com (regwall)": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.leadin\", \"rm_class\":\"leadin\"}, {\"cond\":\"div.wall-wrapper\", \"rm_elem\":1}]", + "domain": "gothamist.com" + }, + "Gplanet.co.il (not lectures)": { + "allow_cookies": 1, + "domain": "gplanet.co.il", + "ld_json": "div.subscription-form|div.content-inner" + }, + "Gramophone.co.uk (reviews)": { + "allow_cookies": 1, + "block_regex": "\\.gramophone\\.co\\.uk\\/script\\.js", + "domain": "gramophone.co.uk", + "useragent": "googlebot" + }, + "Group_cat_epa": { + "allow_cookies": 1, + "block_regex": "\\.elpuntavui\\.cat\\/media\\/epa\\/js\\/epapaywall\\.js", + "domain": "group_cat_epa", + "group": "elpuntavui.cat,lesportiudecatalunya.cat" + }, + "Group_ch_agrarmedien": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"[class*='advert']\", \"rm_elem\":1}]", + "domain": "group_ch_agrarmedien", + "group": "bauernzeitung.ch,diegruene.ch", + "useragent": "googlebot" + }, + "Group_ch_freiaemter": { + "allow_cookies": 1, + "block_regex": "\\.ch\\/apps\\/.+\\/common_functions\\.min\\.js", + "domain": "group_ch_freiaemter", + "group": "bremgarterbezirksanzeiger.ch,derfreiaemter.ch,wohleranzeiger.ch", + "ld_json_source": "div#paywall_header,div#paywall_content|div.content|var article=|content" + }, + "Group_de_ozg": { + "allow_cookies": 1, + "domain": "group_de_ozg", + "group": "borkumer-zeitung.de,ga-online.de,on-online.de,oz-online.de", + "ld_json": "div.paywall|div.pointer-events-none" + }, + "Group_es_serra (regwall)": { + "allow_cookies": 1, + "block_js_inline": "^", + "domain": "group_es_serra", + "group": "menorca.info,ultimahora.es" + }, + "Group_fi_sanoma": { + "add_ext_link": "article.paywall|section.article-body", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "group_fi_sanoma", + "group": "aamulehti.fi,hs.fi,is.fi" + }, + "Group_fr_gothamcity": { + "allow_cookies": 1, + "domain": "group_fr_gothamcity", + "group": "gothamcity.fr,gothamcity.ch", + "ld_json_url": "div.wp-block-group|div.excerpt" + }, + "Group_fr_sogemedia": { + "allow_cookies": 1, + "block_regex": "\\.qiota\\.com", + "domain": "group_fr_sogemedia", + "group": "lasemainedespyrenees.fr,lavoixdelain.fr,lobservateur.fr", + "ld_json_url": "div.article-premium|article|1|1" + }, + "Group_int_autohebdo": { + "allow_cookies": 1, + "domain": "group_int_autohebdo", + "group": "autohebdo.de,autohebdo.it,autohebdo.jp,autohebdo.nl,autohebdo.pl,autohebdof1.com", + "ld_json_url": "div.box-info.yellow|div.editor|1" + }, + "Group_media_source_inc": { + "allow_cookies": 1, + "block_regex": "\\.com\\/.+\\/js\\/metering\\.js", + "domain": "group_media_source_inc", + "group": "hbook.com,libraryjournal.com,slj.com" + }, + "Group_nl_mediahuis_region": { + "add_ext_link": "div[class*='style_popover']|article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"body[class^='style_disable-scroll-popup_']\", \"set_attrib\":\"style|position: static !important; overflow: visible !important\"}]", + "domain": "group_nl_mediahuis_region", + "group": "gooieneemlander.nl,haarlemsdagblad.nl,ijmuidercourant.nl,leidschdagblad.nl,limburger.nl,noordhollandsdagblad.nl" + }, + "Group_no_lydogbilde": { + "cs_code": "[{\"cond\":\"div.paywallbox\", \"rm_elem\":1, \"elems\":[{\"cond\":\"div.thecontent\", \"rm_class\":\"thecontent\"}, {\"cond\":\"div#MoreLink_fade-out-div\", \"rm_elem\":1}, {\"cond\":\"div#MoreLink_content-container[style]\", \"rm_attrib\":\"style\"}]}]", + "domain": "group_no_lydogbilde", + "group": "lydogbillede.dk,lydogbilde.no" + }, + "Group_uk_dcthomson": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "cs_code": "[{\"cond\":\"div[rel='advert']\", \"rm_elem\":1}]", + "domain": "group_uk_dcthomson", + "group": "energyvoice.com,pressandjournal.co.uk,thecourier.co.uk" + }, + "Group_uk_incisive_media": { + "add_ext_link": "div#d-wrapper|div.article-content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "group_uk_incisive_media", + "group": "businessgreen.com,internationalinvestment.net,investmentweek.co.uk,professionaladviser.com,professionalpensions.com" + }, + "Group_uk_key_publishing": { + "allow_cookies": 1, + "domain": "group_uk_key_publishing", + "group": "key.aero,keymodelworld.com", + "useragent": "googlebot" + }, + "Group_uk_solar_media": { + "allow_cookies": 1, + "block_regex": "\\.wallkit\\.net\\/js\\/", + "cs_code": "[{\"cond\":\"div.wkwp-paywall\", \"rm_attrib\":\"class\"}, {\"cond\":\"div.wkwp-paywall-block\", \"rm_elem\":1}]", + "domain": "group_uk_solar_media", + "group": "energy-storage.news,pv-tech.org" + }, + "Group_usa_allcity_network": { + "allow_cookies": 1, + "domain": "group_usa_allcity_network", + "group": "allchgo.com,alldlls.com,allphly.com,gophnx.com,thednvr.com", + "ld_json_url": "div.mepr-unauthorized-message|div.mepr-unauthorized-excerpt||||spiny.markup.content" + }, + "Group_usa_colorado_gazette": { + "allow_cookies": 1, + "block_regex": "loader-cdn\\.azureedge\\.net", + "domain": "group_usa_colorado_gazette", + "group": "coloradopolitics.com,denvergazette.com,gazette.com" + }, + "Group_van_magazine": { + "allow_cookies": 1, + "domain": "group_van_magazine", + "group": "van-magazine.com,van-magazin.de", + "ld_json_url": "div.newspack-metered-paywall-block|div.entry-content" + }, + "Gutepillen-schlechtepillen.de": { + "allow_cookies": 1, + "domain": "gutepillen-schlechtepillen.de", + "ld_json_url": "aside.abonotice|div.single_content|1" + }, + "Hartenergy.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "hartenergy.com" + }, + "Hbrtaiwan.com": { + "domain": "hbrtaiwan.com" + }, + "Hcn.org": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "hcn.org" + }, + "Heidi.news": { + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "domain": "heidi.news", + "useragent": "googlebot" + }, + "Himalmag.com": { + "allow_cookies": 1, + "domain": "himalmag.com", + "ld_json": "div#metered-paywall-banner|div[class*='paywall-story-']" + }, + "Hochparterre.ch": { + "add_ext_link": "div.paywall|div.article__content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "hochparterre.ch" + }, + "Huisartsvandaag.nl": { + "allow_cookies": 1, + "domain": "huisartsvandaag.nl", + "ld_json_url": "div.article__paywall|div.article__body" + }, + "Humanite.fr": { + "add_ext_link": "div.message-paywall|article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "humanite.fr" + }, + "Ibj.com": { + "add_ext_link": "div.audio-intro-popup|div.entry-content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "ibj.com" + }, + "If.com.au": { + "allow_cookies": 1, + "domain": "if.com.au", + "ld_json_url": "div.sign-up-modal|div.entry-content" + }, + "Ilglobo.com": { + "allow_cookies": 1, + "domain": "ilglobo.com", + "useragent": "googlebot" + }, + "Ilsecoloxix.it": { + "add_ext_link": "iframe#__limio_frame|p.story__hero__summary", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "ilsecoloxix.it" + }, + "Impactalpha.com": { + "allow_cookies": 1, + "domain": "impactalpha.com", + "ld_json_url": "div#piano-container-end|div.entry__content" + }, + "Insidermonkey.com": { + "allow_cookies": 1, + "block_host_perm_add": "cloudfront.net", + "block_regex": "\\.cloudfront\\.net\\/imonkey-blog-.+\\.min.js", + "domain": "insidermonkey.com" + }, + "Internationalepolitik.de": { + "allow_cookies": 1, + "domain": "internationalepolitik.de" + }, + "Investmentnews.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "investmentnews.com" + }, + "Ipe.com": { + "allow_cookies": 1, + "domain": "ipe.com", + "useragent": "googlebot" + }, + "Iraqoilreport.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.alertmsg\", \"rm_elem\":1, \"elems\":[{\"cond\":\"article>p\", \"rm_elem\":1}]}]", + "domain": "iraqoilreport.com", + "ld_json_url": "div.alertmsg>a|article|1|1" + }, + "Jewishinsider.com (regwall)": { + "allow_cookies": 1, + "block_regex": "\\/jewishinsider\\.com\\/wp-content\\/themes\\/jewish-insider\\/js\\/owl\\.carousel\\.min\\.js", + "domain": "jewishinsider.com" + }, + "Joc.com": { + "allow_cookies": 1, + "domain": "joc.com", + "ld_json_next": "div[class^='DefaultVariant_wrapper']|div.article-contents" + }, + "Jornaldocomercio.com": { + "allow_cookies": 1, + "block_regex": "\\.jornaldocomercio\\.com\\/.+\\/json\\/paywall\\.json", + "domain": "jornaldocomercio.com" + }, + "Kapital.no": { + "allow_cookies": 1, + "domain": "kapital.no", + "useragent": "googlebot" + }, + "Keymilitary.com": { + "allow_cookies": 1, + "domain": "keymilitary.com", + "useragent": "googlebot" + }, + "Kinotico.es (refresh)": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"article[class]\", \"rm_attrib\":\"class\", \"elems\": [{\"cond\":\"div[class*='bg-black/40']\", \"rm_elem\":1}]}]", + "domain": "kinotico.es", + "ld_json_next": "article div.shadow|article div.pt-5" + }, + "Kristeligt-dagblad.dk": { + "allow_cookies": 1, + "domain": "kristeligt-dagblad.dk", + "useragent": "googlebot" + }, + "Ktipp.ch": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.paywall\", \"rm_attrib\":\"class\", \"elems\": [{\"cond\":\"div.login-box-cover, div.article-text, div.related-interests\", \"rm_elem\":1}]}]", + "domain": "ktipp.ch" + }, + "Kvartal.se": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"sesamy-content-container.fade\", \"rm_attrib\":\"class\"}]", + "domain": "kvartal.se", + "ld_json_url": "div.sesamy-locked-content|div.sesamy-preview>p" + }, + "Lapost.com": { + "allow_cookies": 1, + "block_js_inline": "\\.lapost\\.com\\/", + "cs_code": "[{\"cond\":\"div.article-content\", \"rm_attrib\":\"style\"}]", + "domain": "lapost.com" + }, + "Largus.fr": { + "add_ext_link": "div.largus-paywall|article>p", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "largus.fr" + }, + "Lasvegasadvisor.com": { + "allow_cookies": 1, + "block_regex": "\\.lasvegasadvisor\\.com\\/(opt\\/.+|js\\/access\\.min)\\.js", + "domain": "lasvegasadvisor.com" + }, + "Lavialibera.it": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.text-preview\", \"rm_attrib\":\"class\"}, {\"cond\":\"div.save_modal\", \"rm_elem\":1}]", + "domain": "lavialibera.it" + }, + "Lavozdegalicia.es": { + "add_ext_link": "div#paywall_box|article p", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"body.blocked\", \"rm_class\":\"blocked\"}, {\"cond\":\"hr.pw-separator\", \"rm_class\":\"pw-separator\"}]", + "domain": "lavozdegalicia.es" + }, + "Legalbites.in": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div#subscription_paid_message\", \"rm_elem\":1, \"elems\":[{\"cond\":\"div.hide.paywall-content\", \"rm_attrib\": \"class\"}, {\"cond\": \"div.restricted_message>div.story\", \"rm_elem\":1}]}]", + "domain": "legalbites.in" + }, + "Lesaffaires.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "lesaffaires.com" + }, + "Limesonline.com": { + "add_ext_link": "div#account-pw-container|div.story__content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "limesonline.com" + }, + "Lkz.de": { + "add_ext_link": "div#nfy-piano-experience-inline|footer", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "block_regex": "\\.piano\\.io\\/xbuilder\\/experience\\/execute", + "domain": "lkz.de" + }, + "Luxurydaily.com": { + "allow_cookies": 1, + "domain": "luxurydaily.com", + "ld_json_url": "div.call-to-action|div.body|||meta[name='id']" + }, + "Madraspaper.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.entry-content>p:not(:first-child)\", \"rm_elem\":1}]", + "domain": "madraspaper.com", + "ld_json_url": "div.entry-content>h4|div.entry-content>p" + }, + "Main-echo.de": { + "add_ext_link": "me-card[theme='paywall']|footer", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "main-echo.de" + }, + "Mainpost.de": { + "add_ext_link": "section.product-teaser|article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "mainpost.de" + }, + "Makorrishon.co.il": { + "allow_cookies": 1, + "domain": "makorrishon.co.il", + "useragent": "googlebot" + }, + "Manilatimes.net": { + "allow_cookies": 1, + "domain": "manilatimes.net", + "ld_json": "div.website-packages|div.article-body-content" + }, + "Marketnews.com (news only)": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.body-description\", \"rm_attrib\":\"class\"}]", + "domain": "marketnews.com" + }, + "Marketscreener.com (free articles only)": { + "domain": "marketscreener.com" + }, + "Mediapart.fr": { + "add_ext_link": "div#paywall_no_variance|main", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "mediapart.fr" + }, + "Medieninsider.com": { + "allow_cookies": 1, + "domain": "medieninsider.com", + "useragent": "googlebot" + }, + "Medpagetoday.com": { + "allow_cookies": 1, + "domain": "medpagetoday.com", + "remove_cookies": 1 + }, + "Milesplit.com": { + "allow_cookies": 1, + "domain": "milesplit.com", + "useragent": "facebookbot" + }, + "Military.com": { + "domain": "military.com" + }, + "Mining-journal.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"p.linear-gradient\", \"rm_attrib\":\"class\"}]", + "domain": "mining-journal.com", + "ld_json": "div.subscription-block|div.article-content>p|1" + }, + "Modernrailways.com": { + "allow_cookies": 1, + "domain": "modernrailways.com", + "useragent": "googlebot" + }, + "Mosaicmagazine.com": { + "allow_cookies": 1, + "block_regex": "\\/mosaicmagazine\\.com\\/.+\\/evolok\\/", + "domain": "mosaicmagazine.com" + }, + "Museumsassociation.org": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"body.paywall\", \"rm_class\":\"paywall\", \"elems\":[{\"cond\":\"body[style]\", \"rm_attrib\":\"style\"}, {\"cond\":\"div#paywall-wrapper,div.advertising\", \"rm_elem\":1}]}]", + "domain": "museumsassociation.org" + }, + "Myanmar-now.org": { + "allow_cookies": 1, + "domain": "myanmar-now.org", + "ld_json": "div.ppress-paywall-message-wrap|div.entry-content|1" + }, + "Mz.de": { + "add_ext_link": "div.fp-paywall|article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "mz.de" + }, + "Nachrichten.at": { + "add_ext_link": "div.plusTextFadeoutOverlay|header>h2", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "nachrichten.at" + }, + "Nacion.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "cs_code": "[{\"cond\":\"div.post\", \"rm_elem\":1, \"elems\": [{\"cond\":\"div.article-body-wrapper__styled[style]\", \"rm_attrib\":\"style\"}]}]", + "domain": "nacion.com" + }, + "Narcity.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.body-description[style]\", \"rm_attrib\":\"style\"}, {\"cond\":\"div#login-wall, div#overlay, div.brid-container, div.brandsnippet-article, div[class$='ad-wrapper']\", \"rm_elem\":1}]", + "domain": "narcity.com" + }, + "Nationalobserver.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "nationalobserver.com" + }, + "Naturalgasworld.com": { + "allow_cookies": 1, + "domain": "naturalgasworld.com", + "useragent": "googlebot" + }, + "Newbostonpost.com": { + "allow_cookies": 1, + "block_regex": "\\/newbostonpost\\.com\\/.+\\/paywall\\/js\\/main\\.js", + "domain": "newbostonpost.com" + }, + "Newoxfordreview.org": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.not-viewable\", \"rm_class\":\"not-viewable\"}]", + "domain": "newoxfordreview.org" + }, + "Newspicks.com": { + "allow_cookies": 1, + "domain": "newspicks.com", + "useragent": "googlebot" + }, + "Nnn.de": { + "allow_cookies": 1, + "domain": "nnn.de", + "useragent": "googlebot" + }, + "Nordjyske.dk": { + "allow_cookies": 1, + "domain": "nordjyske.dk", + "useragent": "googlebot" + }, + "Nordsee-zeitung.de": { + "add_ext_link": "div.UserLoggedInContainer|article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "nordsee-zeitung.de" + }, + "Nouvelobs.com": { + "add_ext_link": "div.paywall|main>article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "nouvelobs.com" + }, + "Novethic.fr": { + "allow_cookies": 1, + "domain": "novethic.fr", + "ld_json_url": "div#paywall|div.entry-content" + }, + "Nu.nl (regwall)": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"article#LOGIN\", \"rm_elem\":1}, {\"cond\":\"div.authorized-content\", \"rm_class\":\"authorized-content\"}, {\"cond\":\"div.semi-authorized-content\", \"rm_class\":\"semi-authorized-content\"}]", + "domain": "nu.nl" + }, + "Nypost.com": { + "add_ext_link": "head>meta[content*='Sports Plus']|div.single__footer", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "block_regex": "\\.nypost\\.com\\/zephr\\/feature", + "domain": "nypost.com" + }, + "Odt.co.nz": { + "allow_cookies": 1, + "block_regex": "\\.odt\\.co\\.nz\\/bwtw\\/api\\/TheWall", + "cs_code": "[{\"cond\":\"div[property='content:encoded']\", \"rm_attrib\":\"property\"}]", + "domain": "odt.co.nz" + }, + "Opovo.com.br": { + "allow_cookies": 1, + "block_regex": "\\.opovo\\.com\\.br\\/.+\\/js\\/auth\\/auth_new_menu.min\\.js", + "domain": "opovo.com.br" + }, + "Overwaar.de": { + "allow_cookies": 1, + "domain": "overwaar.de", + "ld_json_url": "div#paywall-wrapper|div.custom-content-wrapper div.fl-col-content" + }, + "Pbn.com": { + "allow_cookies": 1, + "domain": "pbn.com", + "ld_json_url": "div.emoxie-pay-wall|div.restricted-content" + }, + "Pebmed.com.br": { + "allow_cookies": 1, + "block_regex": "\\/pebmed\\.com\\.br\\/wp-content\\/.+\\/paywall\\/dist\\/js\\/app\\.js", + "domain": "pebmed.com.br" + }, + "Perspectivemedia.com": { + "allow_cookies": 1, + "block_regex": "\\.perspectivemedia\\.com\\/wp-admin\\/admin-ajax\\.php", + "cs_code": "[{\"cond\":\"div.hustle-ui\", \"rm_elem\":1}]", + "domain": "perspectivemedia.com" + }, + "Pharmaceutical-journal.com": { + "allow_cookies": 1, + "domain": "pharmaceutical-journal.com", + "useragent": "googlebot" + }, + "Phillymag.com": { + "allow_cookies": 1, + "domain": "phillymag.com", + "useragent": "googlebot" + }, + "Physicsworld.com": { + "domain": "physicsworld.com" + }, + "Ploetzblog.de": { + "allow_cookies": 1, + "block_regex": "\\/steadyhq\\.com", + "domain": "ploetzblog.de" + }, + "Pokerindustrypro.com": { + "allow_cookies": 1, + "domain": "pokerindustrypro.com", + "useragent": "googlebot" + }, + "Policinginsight.com": { + "allow_cookies": 1, + "domain": "policinginsight.com", + "ld_json_url": "div#pi-content-gating|article|1|1" + }, + "Politiken.dk": { + "add_ext_link": "div[data-element-promotion]|p.drop-cap", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"aside.bg-paper-200\", \"rm_elem\":1}]", + "domain": "politiken.dk" + }, + "Prensa.com": { + "allow_cookies": 1, + "block_host_perm_add": "corprensa.com", + "block_regex": "\\.corprensa.com\\/.+\\/evolok", + "domain": "prensa.com" + }, + "Privataaffarer.se": { + "allow_cookies": 1, + "domain": "privataaffarer.se", + "useragent": "googlebot" + }, + "Publishersweekly.com": { + "allow_cookies": 1, + "block_regex": "\\.omeda\\.com", + "cs_code": "[{\"cond\":\"div#content div.loggedOutOnly\", \"rm_elem\":1}, {\"cond\":\"div#content div.loggedInOnly\", \"rm_attrib\": \"class|style\"}]", + "domain": "publishersweekly.com" + }, + "Pv-digest.de": { + "allow_cookies": 1, + "domain": "pv-digest.de", + "useragent": "googlebot" + }, + "Qpbriefing.com": { + "allow_cookies": 1, + "domain": "qpbriefing.com", + "ld_json_next": "div.locked|div.contenter" + }, + "Quadrant.org.au": { + "allow_cookies": 1, + "domain": "quadrant.org.au", + "ld_json_source": "div.subscribe-col|div.fusion-content-tb|var ajax_object=|current_term.post_content|1" + }, + "Quest.nl": { + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "domain": "quest.nl" + }, + "Quickmath.com": { + "domain": "quickmath.com" + }, + "Racketmn.com": { + "allow_cookies": 1, + "block_regex": "\\/racketmn\\.com\\/_next\\/.+\\/%5BsiteSlug.+\\.js", + "domain": "racketmn.com" + }, + "Rawstory.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "rawstory.com" + }, + "Rd.nl": { + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "domain": "rd.nl" + }, + "Researchprofessionalnews.com": { + "allow_cookies": 1, + "domain": "researchprofessionalnews.com", + "ld_json_url": "section.single-locked-message|section.single-locked-content" + }, + "Riffreporter.de": { + "add_ext_link": ".paywall|article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "riffreporter.de" + }, + "Riotimesonline.com": { + "allow_cookies": 1, + "block_regex": "\\.riotimesonline\\.com\\/wp-content\\/.+\\/plugins\\/rcp-view-limit", + "domain": "riotimesonline.com" + }, + "Rockdelux.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.bg-paywall\", \"rm_elem\":1, \"elems\": [{\"cond\":\"body\", \"rm_attrib\":\"class|style\"}, {\"cond\":\"div#body\", \"rm_attrib\":\"style\"}]}]", + "domain": "rockdelux.com" + }, + "Rotowire.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.pw-content\", \"rm_attrib\":\"class\", \"elems\": [{\"cond\":\"div.paywall-full,div.article-preview-fader\", \"rm_elem\":1}]}]", + "domain": "rotowire.com" + }, + "Screendaily.com": { + "domain": "screendaily.com" + }, + "Shrm.org": { + "allow_cookies": 1, + "block_regex": "\\.shrm\\.org\\/.+\\/js\\/paywall.+\\.js", + "domain": "shrm.org", + "useragent": "googlebot" + }, + "Siliconrepublic.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "siliconrepublic.com" + }, + "Sinarharian.com.my": { + "allow_cookies": 1, + "domain": "sinarharian.com.my", + "ld_json": "div.wrap-new-exclusive-banner|article" + }, + "Skepticalinquirer.org": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.google-bot\", \"rm_class\":\"google-bot\"}]", + "domain": "skepticalinquirer.org" + }, + "Sn.at": { + "add_ext_link": "div.article-sections__paywall|div.article-body-text", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "sn.at" + }, + "Solarserver.de": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.paywall-box\", \"rm_elem\":1, \"elems\":[{\"cond\":\"div.paywall\", \"rm_attrib\":\"style\"}, {\"cond\":\"div.paywall-blurred\", \"rm_attrib\":\"class\"}]}]", + "domain": "solarserver.de" + }, + "Solicitorsjournal.com": { + "allow_cookies": 1, + "block_regex": "\\.solicitorsjournal\\.com\\/_next\\/static\\/chunks\\/\\d..+\\.js/", + "domain": "solicitorsjournal.com" + }, + "Southwarknews.co.uk": { + "allow_cookies": 1, + "domain": "southwarknews.co.uk", + "ld_json": "div.mepr-unauthorized-message|div.mepr-unauthorized-excerpt" + }, + "Spectator.org": { + "allow_cookies": 1, + "block_regex": "\\/spectator\\.org\\/.+\\/evolok", + "domain": "spectator.org" + }, + "Spectrejournal.com": { + "allow_cookies": 1, + "block_regex": "\\/spectrejournal\\.com\\/wp-content\\/plugins\\/elementor\\/.+\\/dialog\\.min\\.js", + "domain": "spectrejournal.com" + }, + "Speld.nl": { + "domain": "speld.nl" + }, + "Splainer.in": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\".subscription-prompt\",\"rm_elem\":1,\"elems\":[{\"cond\":\".hide-section\",\"rm_class\":\"hide-section\"}]}]", + "domain": "splainer.in" + }, + "Splinter.com": { + "allow_cookies": 1, + "block_regex": "\\.splinter\\.com\\/wp-content\\/themes\\/pastemagazine\\/js\\/pm_custom\\.js", + "domain": "splinter.com" + }, + "Spokesman.com": { + "allow_cookies": 1, + "block_regex": "loader-cdn\\.azureedge\\.net", + "domain": "spokesman.com" + }, + "Sportsbusinessjournal.com": { + "domain": "sportsbusinessjournal.com" + }, + "Standcolumbia.org": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.stu-blur-overlay\", \"rm_elem\":1}, {\"cond\":\"div.stu-lock-content\", \"rm_attrib\":\"class\"}]", + "domain": "standcolumbia.org" + }, + "Stimme.de": { + "add_ext_link": "div.fadeOut|div.art-text>p", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "stimme.de" + }, + "Strategies.fr": { + "allow_cookies": 1, + "block_regex": "\\.qiota\\.com", + "domain": "strategies.fr" + }, + "Stratford-herald.com": { + "allow_cookies": 1, + "amp_redirect": "div#article_panel_paywall", + "amp_unhide": 1, + "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js", + "cs_code": "[{\"cond\":\"div.PremNotice\", \"rm_elem\":1}]", + "domain": "stratford-herald.com" + }, + "Stripes.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "stripes.com" + }, + "Subscriptioninsider.com": { + "add_ext_link": "div.mp_wrapper|main h1", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "subscriptioninsider.com" + }, + "Supchina.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "supchina.com" + }, + "Talkingpointsmemo.com": { + "allow_cookies": 1, + "domain": "talkingpointsmemo.com", + "ld_json_url": "div.NewsletterArticle__Paywall|div.js_prime-article-content|1" + }, + "Taxscan.in": { + "allow_cookies": 1, + "domain": "taxscan.in", + "ld_json": "div.pmpro_content_message|div.the-content>p" + }, + "Teachingprofessor.com": { + "allow_cookies": 1, + "domain": "teachingprofessor.com", + "ld_json_url": "div#post-paywall|div.elementor-widget-theme-post-content>div" + }, + "Telecompaper.com": { + "add_ext_link": "div.register-container,div.modal|div.main-content>div", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"body.blue-background\", \"rm_class\":\"blue-background\"}]", + "domain": "telecompaper.com" + }, + "Tetu.com": { + "allow_cookies": 1, + "block_regex": "\\.qiota\\.com", + "domain": "tetu.com", + "ld_json_url": "div.qiota-for-free-article|div.article-content" + }, + "The-fence.com": { + "allow_cookies": 1, + "block_regex": "\\.hadrianpaywall\\.com", + "domain": "the-fence.com" + }, + "The-past.com": { + "domain": "the-past.com" + }, + "The42.ie": { + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "domain": "the42.ie" + }, + "Thebanker.com": { + "add_ext_link": "div.barrier|h1.article__header__title", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "thebanker.com" + }, + "Thecaterer.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\".locked-content\",\"rm_attrib\":\"class\"}]", + "domain": "thecaterer.com", + "useragent": "googlebot" + }, + "Thecore.in (regwall)": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.restricted_message\", \"elems\": [{\"cond\":\"div.story,div#subscription_paid_message,div#footer_login_wall\", \"rm_elem\":1}, {\"cond\":\"div.paywall-content\", \"rm_attrib\":\"class\"}]}]", + "domain": "thecore.in" + }, + "Thedailymash.co.uk": { + "allow_cookies": 1, + "block_regex": "\\.flip-pay\\.com", + "domain": "thedailymash.co.uk" + }, + "Theday.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "theday.com" + }, + "Thedriftmag.com": { + "allow_cookies": 1, + "block_regex": "\\.thedriftmag\\.com\\/wp-content\\/plugins\\/drift-paywall-plugin", + "domain": "thedriftmag.com" + }, + "Thefashionlaw.com": { + "allow_cookies": 1, + "block_regex": "\\.thefashionlaw\\.com\\/evolok\\/.+\\/ev-widgets\\.min\\.js", + "domain": "thefashionlaw.com" + }, + "Thefederal.com": { + "allow_cookies": 1, + "amp_redirect": "div#premium_access_message_text", + "cs_code": "[{\"cond\":\"div.access-message\", \"rm_elem\":1, \"elems\":[{\"cond\":\"div.hide.paywall-content\", \"rm_attrib\":\"class\"}]}]", + "domain": "thefederal.com" + }, + "Theijf.org (refresh)": { + "allow_cookies": 1, + "domain": "theijf.org", + "ld_json_next": "div.animate-slideIn|div.post-content" + }, + "Theloadstar.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.post-info\", \"elems\":[{\"cond\":\"article>p\", \"rm_elem\":1}]}]", + "domain": "theloadstar.com", + "ld_json_url": "div#register_wrapper,div[id$='_req_container']|article|1|1|||1" + }, + "Themonthly.com.au": { + "domain": "themonthly.com.au" + }, + "Thenationalpulse.com": { + "allow_cookies": 1, + "block_regex": "\\/thenationalpulse\\.com\\/wp-content\\/.+\\/assets\\/js\\/national-pulse\\.js", + "domain": "thenationalpulse.com" + }, + "Theqt.online": { + "allow_cookies": 1, + "domain": "theqt.online", + "ld_json_url": "section.elementor-section|div.post_center_side_text" + }, + "Theschooloflife.com": { + "allow_cookies": 1, + "block_regex": "\\.theschooloflife\\.com\\/app\\/plugins\\/.+\\/woocommerce\\.min\\.js", + "domain": "theschooloflife.com" + }, + "Thetablet.org": { + "allow_cookies": 1, + "block_js_inline": "\\/thetablet\\.org\\/", + "cs_code": "[{\"cond\":\"body.gated-content\", \"rm_class\":\"gated-content\"}]", + "domain": "thetablet.org" + }, + "Tidningenridsport.se": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.locked\", \"rm_elem\":1, \"elems\": [{\"cond\":\"div.mctos\", \"rm_attrib\":\"class|style\"}, {\"cond\":\"body.cli-barmodal-open\", \"rm_class\":\"cli-barmodal-open\"}]}]", + "domain": "tidningenridsport.se" + }, + "Tijorifinance.com": { + "allow_cookies": 1, + "domain": "tijorifinance.com", + "useragent": "googlebot" + }, + "Timeslive.co.za": { + "add_ext_link": "div.premium-alert|div#article p", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "timeslive.co.za" + }, + "Toledoblade.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "toledoblade.com" + }, + "Totalfootballanalysis.com": { + "allow_cookies": 1, + "domain": "totalfootballanalysis.com", + "ld_json": "div.jpw-truncate-btn|div.entry-content" + }, + "Tribunedelyon.fr": { + "allow_cookies": 1, + "block_regex": "\\.poool\\.fr", + "domain": "tribunedelyon.fr" + }, + "Tvnewscheck.com": { + "allow_cookies": 1, + "domain": "tvnewscheck.com", + "ld_json_url": "div.singlepage div.mp_login_form|div.post-details" + }, + "Utilityweek.co.uk": { + "allow_cookies": 1, + "domain": "utilityweek.co.uk", + "useragent": "googlebot" + }, + "Velikeprice.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div#free_posts_info, div#post-banners-body\", \"rm_elem\":1}]", + "domain": "velikeprice.com", + "ld_json_url": "div#subscription-info-content|div#post-main-body|1" + }, + "Ville-rail-transports.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.art_payant_shadow\", \"rm_elem\":1}]", + "domain": "ville-rail-transports.com", + "ld_json_url": "div.art-paye-zone|div.content-text|1" + }, + "Visegradinsight.eu": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.fade\", \"rm_class\":\"fade\"}]", + "domain": "visegradinsight.eu", + "ld_json_url": "div.pmpro_content_message,div.hidden-post>*:nth-child(n+3)|div.hidden-post|1|1" + }, + "Volksstimme.de": { + "add_ext_link": "div.fp-paywall|article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "volksstimme.de" + }, + "Washingtontimes.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "washingtontimes.com" + }, + "Watch Media Group (flex)": { + "add_ext_link": "article[data-sentry-component='Card']|article figure", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "###_dk_watch_media" + }, + "Westcoastpreps.com": { + "allow_cookies": 1, + "domain": "westcoastpreps.com", + "ld_json_url": "div.mepr-unauthorized-message,div.mepr-login-form-wrap|div.mepr-unauthorized-excerpt||||spiny.markup.content" + }, + "Wissenschaft.de": { + "add_ext_link": "div.plenigo-teaser|div.entry-content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "wissenschaft.de" + }, + "Wiwo.de": { + "add_ext_link": "app-paywall,app-blind-text|app-authors", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "wiwo.de" + }, + "Xiaohu.ai": { + "allow_cookies": 1, + "domain": "xiaohu.ai", + "ld_json": "div.jpw-truncate-btn|div.content-inner " + }, + "Zeitzeichen.net": { + "allow_cookies": 1, + "block_regex": "\\/zeitzeichen\\.net\\/sites\\/default\\/files\\/js\\/js_.+\\.js", + "domain": "zeitzeichen.net" + } +} diff --git a/lib/empty.js b/lib/empty.js new file mode 100644 index 0000000..e69de29 diff --git a/lib/purify.min.js b/lib/purify.min.js new file mode 100644 index 0000000..936a115 --- /dev/null +++ b/lib/purify.min.js @@ -0,0 +1,4 @@ +// DOMPurify dummy file (for Chrome/Chromium) +function DOMPurify() {} +DOMPurify.sanitize = (x, y = '') => x; +DOMPurify.removed = []; diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..56ff34e --- /dev/null +++ b/manifest.json @@ -0,0 +1,940 @@ +{ + "background": { + "service_worker": "background.js" + }, + "content_security_policy": { + "extension_pages": "script-src 'self'; object-src 'self'" + }, + "action": { + "default_popup": "options/popup.html" + }, + "description": "Bypass Paywalls of news sites", + "homepage_url": "https://gitflic.ru/project/magnolia1234/bypass-paywalls-chrome-clean", + "icons": { + "128": "bypass.png" + }, + "manifest_version": 3, + "minimum_chrome_version": "109", + "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvLxf4oOeSoz8qKVzKGQWW5zW44hWCoOoQRGXTrObUpyoGfGzhFO8aZHQmBcLrAZMA4O6EA7GaXnHkOPCLKM11seZ4J2azb1gSswApfAlaoeOLnhDnp/Jpzz7Bt6o4HL+nhKRJUOZ9z+GXAyOkOps5O38TwJN5R6z8tLkleRgfYscp19YU/vq1x9PrbXIHJTRB7qtb/iJmiKATKisXGmFY3Nbs5m379TGqcJFBM9bI+8bSJtS4e7t0LHOwSLDq3IVRaWVsFd9P19WEDNTxuzr9+rczOrw1vgmiisNOcElse8cyVIoq4bjepvfHM/9nzDgKwQsNG5OTzujwHu2UUN4cwIDAQAB", + "name": "Bypass Paywalls Clean", + "update_url": "https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=updates.xml", + "short_name": "Bypass Paywall", + "options_ui": { + "open_in_tab": true, + "page": "options/options.html" + }, + "incognito": "split", + "permissions": [ + "cookies", + "storage", + "activeTab", + "declarativeNetRequestWithHostAccess", + "scripting", + "offscreen" + ], + "optional_host_permissions": [ + "*://*/*" + ], + "host_permissions": [ + "*://*.24heures.ch/*", + "*://*.360dx.com/*", + "*://*.60millions-mag.com/*", + "*://*.aachener-zeitung.de/*", + "*://*.aargauerzeitung.ch/*", + "*://*.abc.es/*", + "*://*.abcmais.com/*", + "*://*.abendblatt.de/*", + "*://*.abqjournal.com/*", + "*://*.abril.com.br/*", + "*://*.actu.fr/*", + "*://*.ad.nl/*", + "*://*.adage.com/*", + "*://*.adelaidenow.com.au/*", + "*://*.adweek.com/*", + "*://*.aerokurier.de/*", + "*://*.aerztezeitung.de/*", + "*://*.afr.com/*", + "*://*.ajc.com/*", + "*://*.al.com/*", + "*://*.allgemeine-zeitung.de/*", + "*://*.alternatives-economiques.fr/*", + "*://*.ambito.com/*", + "*://*.americanaffairsjournal.org/*", + "*://*.americanbanker.com/*", + "*://*.americanpurpose.com/*", + "*://*.americastestkitchen.com/*", + "*://*.apollo-magazine.com/*", + "*://*.ara.cat/*", + "*://*.arabalears.cat/*", + "*://*.architecturaldigest.com/*", + "*://*.arcinfo.ch/*", + "*://*.artforum.com/*", + "*://*.artnet.com/*", + "*://*.artsenkrant.com/*", + "*://*.atavist.com/*", + "*://*.atlantico.fr/*", + "*://*.auto-motor-und-sport.de/*", + "*://*.auto-swiat.pl/*", + "*://*.autocar.co.uk/*", + "*://*.autohebdo.fr/*", + "*://*.automobilwoche.de/*", + "*://*.autonews.com/*", + "*://*.autoplus.fr/*", + "*://*.autosport.com/*", + "*://*.axios.com/*", + "*://*.azcentral.com/*", + "*://*.backpacker.com/*", + "*://*.balkaninsight.com/*", + "*://*.baltimoresun.com/*", + "*://*.barandbench.com/*", + "*://*.bazonline.ch/*", + "*://*.bd.nl/*", + "*://*.beleggersbelangen.nl/*", + "*://*.belfasttelegraph.co.uk/*", + "*://*.bendigoadvertiser.com.au/*", + "*://*.benzinga.com/*", + "*://*.beobachter.ch/*", + "*://*.berliner-zeitung.de/*", + "*://*.berlingske.dk/*", + "*://*.bernerzeitung.ch/*", + "*://*.betamtb.com/*", + "*://*.betternutrition.com/*", + "*://*.betterprogramming.pub/*", + "*://*.bhaskar.com/*", + "*://*.bicycling.com/*", + "*://*.bild.de/*", + "*://*.billboard.com/*", + "*://*.bizjournals.com/*", + "*://*.blick.ch/*", + "*://*.bloomberg.com/*", + "*://*.bloombergadria.com/*", + "*://*.bnd.com/*", + "*://*.bndestem.nl/*", + "*://*.boersen-zeitung.de/*", + "*://*.bonappetit.com/*", + "*://*.bordermail.com.au/*", + "*://*.bostonglobe.com/*", + "*://*.bostonherald.com/*", + "*://*.braunschweiger-zeitung.de/*", + "*://*.brill.com/*", + "*://*.brisbanetimes.com.au/*", + "*://*.britannica.com/*", + "*://*.bt.no/*", + "*://*.buffalonews.com/*", + "*://*.business-standard.com/*", + "*://*.businessam.be/*", + "*://*.businessdailyafrica.com/*", + "*://*.businessdesk.co.nz/*", + "*://*.businessinsider.com.pl/*", + "*://*.businessinsider.com/*", + "*://*.businessinsider.jp/*", + "*://*.businessinsider.nl/*", + "*://*.businessoffashion.com/*", + "*://*.businesspost.ie/*", + "*://*.businesstimes.com.sg/*", + "*://*.cairnspost.com.au/*", + "*://*.calgaryherald.com/*", + "*://*.cambiocolombia.com/*", + "*://*.canarias7.es/*", + "*://*.canberratimes.com.au/*", + "*://*.capital.bg/*", + "*://*.capital.fr/*", + "*://*.capitalgazette.com/*", + "*://*.cartacapital.com.br/*", + "*://*.causeur.fr/*", + "*://*.cen.acs.org/*", + "*://*.centralwesterndaily.com.au/*", + "*://*.centrepresseaveyron.fr/*", + "*://*.challenges.fr/*", + "*://*.charentelibre.fr/*", + "*://*.charliehebdo.fr/*", + "*://*.charlotteobserver.com/*", + "*://*.chicagobusiness.com/*", + "*://*.chicagotribune.com/*", + "*://*.chronicle.com/*", + "*://*.cicero.de/*", + "*://*.cincinnati.com/*", + "*://*.citywire.com/*", + "*://*.clarin.com/*", + "*://*.cleaneatingmag.com/*", + "*://*.cleveland.com/*", + "*://*.clicrbs.com.br/*", + "*://*.climbing.com/*", + "*://*.cnbc.com/*", + "*://*.cnn.com/*", + "*://*.cntraveler.com/*", + "*://*.codesports.com.au/*", + "*://*.columbian.com/*", + "*://*.commentary.org/*", + "*://*.commercialappeal.com/*", + "*://*.computerweekly.com/*", + "*://*.connaissancedesarts.com/*", + "*://*.correiodopovo.com.br/*", + "*://*.corriere.it/*", + "*://*.corriereadriatico.it/*", + "*://*.corrieredellosport.it/*", + "*://*.cosmopolitan.com/*", + "*://*.cosmopolitan.fr/*", + "*://*.countryliving.com/*", + "*://*.courant.com/*", + "*://*.courier-journal.com/*", + "*://*.couriermail.com.au/*", + "*://*.courrierinternational.com/*", + "*://*.crainscleveland.com/*", + "*://*.crainsdetroit.com/*", + "*://*.crainsgrandrapids.com/*", + "*://*.crainsnewyork.com/*", + "*://*.crikey.com.au/*", + "*://*.cronista.com/*", + "*://*.crusoe.com.br/*", + "*://*.csmonitor.com/*", + "*://*.ctpost.com/*", + "*://*.curbed.com/*", + "*://*.cw.com.tw/*", + "*://*.cyclingnews.com/*", + "*://*.dagensmedicin.se/*", + "*://*.dagsavisen.no/*", + "*://*.dailyadvertiser.com.au/*", + "*://*.dailyliberal.com.au/*", + "*://*.dailymail.co.uk/*", + "*://*.dailypress.com/*", + "*://*.dailytelegraph.com.au/*", + "*://*.dailywire.com/*", + "*://*.dallasnews.com/*", + "*://*.decanter.com/*", + "*://*.defector.com/*", + "*://*.delish.com/*", + "*://*.democratandchronicle.com/*", + "*://*.demorgen.be/*", + "*://*.denik.cz/*", + "*://*.denverpost.com/*", + "*://*.derbund.ch/*", + "*://*.desmoinesregister.com/*", + "*://*.destentor.nl/*", + "*://*.detroitnews.com/*", + "*://*.df.cl/*", + "*://*.dhnet.be/*", + "*://*.diariocorreo.pe/*", + "*://*.diariodemallorca.es/*", + "*://*.diariodenavarra.es/*", + "*://*.diariosur.es/*", + "*://*.diariovasco.com/*", + "*://*.digiday.com/*", + "*://*.digitimes.com/*", + "*://*.diplomatique.org.br/*", + "*://*.discovermagazine.com/*", + "*://*.dispatch.com/*", + "*://*.dn.no/*", + "*://*.dn.pt/*", + "*://*.dn.se/*", + "*://*.dnevnik.bg/*", + "*://*.doorbraak.be/*", + "*://*.dvhn.nl/*", + "*://*.dwell.com/*", + "*://*.eastbaytimes.com/*", + "*://*.eastwest.eu/*", + "*://*.echo-online.de/*", + "*://*.economictimes.com/*", + "*://*.economist.com/*", + "*://*.ed.nl/*", + "*://*.editorialedomani.it/*", + "*://*.elcomercio.es/*", + "*://*.elcomercio.pe/*", + "*://*.elconfidencial.com/*", + "*://*.elcorreo.com/*", + "*://*.eldeber.com.bo/*", + "*://*.eldia.es/*", + "*://*.eldiario.es/*", + "*://*.eldiariomontanes.es/*", + "*://*.elespanol.com/*", + "*://*.elespectador.com/*", + "*://*.elle.com/*", + "*://*.elle.fr/*", + "*://*.elledecor.com/*", + "*://*.elmercurio.com/*", + "*://*.elmundo.es/*", + "*://*.elnortedecastilla.es/*", + "*://*.elnuevoherald.com/*", + "*://*.elobservador.com.uy/*", + "*://*.elpais.com.uy/*", + "*://*.elpais.com/*", + "*://*.elperiodico.com/*", + "*://*.eltiempo.com/*", + "*://*.eltribuno.com/*", + "*://*.eluniversal.com.mx/*", + "*://*.eluniverso.com/*", + "*://*.em.com.br/*", + "*://*.enotes.com/*", + "*://*.epe.es/*", + "*://*.epicurious.com/*", + "*://*.epoch.org.il/*", + "*://*.espn.com/*", + "*://*.esprit.presse.fr/*", + "*://*.esquire.com/*", + "*://*.estadao.com.br/*", + "*://*.etc.se/*", + "*://*.euobserver.com/*", + "*://*.european-rubber-journal.com/*", + "*://*.europower.no/*", + "*://*.exame.com/*", + "*://*.examiner.com.au/*", + "*://*.expansion.com/*", + "*://*.expressnews.com/*", + "*://*.expresso.pt/*", + "*://*.farodevigo.es/*", + "*://*.fastcompany.com/*", + "*://*.faz.net/*", + "*://*.femmesdaujourdhui.be/*", + "*://*.fieldandstream.com/*", + "*://*.financialexpress.com/*", + "*://*.financialpost.com/*", + "*://*.firstthings.com/*", + "*://*.fiskeribladet.no/*", + "*://*.flair.be/*", + "*://*.flair.nl/*", + "*://*.flugrevue.de/*", + "*://*.fnlondon.com/*", + "*://*.forbes.com.au/*", + "*://*.forbes.com/*", + "*://*.forbes.pl/*", + "*://*.forbes.ua/*", + "*://*.foreignaffairs.com/*", + "*://*.foreignpolicy.com/*", + "*://*.fortune.com/*", + "*://*.foxnews.com/*", + "*://*.fr.de/*", + "*://*.freep.com/*", + "*://*.freitag.de/*", + "*://*.fresnobee.com/*", + "*://*.ft.com/*", + "*://*.ftm.eu/*", + "*://*.ftm.nl/*", + "*://*.ga.de/*", + "*://*.gazetadopovo.com.br/*", + "*://*.gazzetta.it/*", + "*://*.gbnews.com/*", + "*://*.geelongadvertiser.com.au/*", + "*://*.gelderlander.nl/*", + "*://*.genomeweb.com/*", + "*://*.gestion.pe/*", + "*://*.glassdoor.com/*", + "*://*.globes.co.il/*", + "*://*.globo.com/*", + "*://*.glossy.co/*", + "*://*.goldcoastbulletin.com.au/*", + "*://*.goodhousekeeping.com/*", + "*://*.gq.com/*", + "*://*.granta.com/*", + "*://*.groene.nl/*", + "*://*.grubstreet.com/*", + "*://*.gva.be/*", + "*://*.haaretz.co.il/*", + "*://*.haaretz.com/*", + "*://*.handelsblatt.com/*", + "*://*.handelszeitung.ch/*", + "*://*.harpers.org/*", + "*://*.harpersbazaar.com/*", + "*://*.harzkurier.de/*", + "*://*.haz.de/*", + "*://*.hbr.org/*", + "*://*.hbvl.be/*", + "*://*.hd.se/*", + "*://*.heise.de/*", + "*://*.heraldsun.com.au/*", + "*://*.hilltimes.com/*", + "*://*.hindustantimes.com/*", + "*://*.historyextra.com/*", + "*://*.historytoday.com/*", + "*://*.hln.be/*", + "*://*.housebeautiful.com/*", + "*://*.houstonchronicle.com/*", + "*://*.hoy.es/*", + "*://*.huffingtonpost.it/*", + "*://*.humo.be/*", + "*://*.hydrogeninsight.com/*", + "*://*.ideal.es/*", + "*://*.ikz-online.de/*", + "*://*.ilfattoquotidiano.it/*", + "*://*.ilfoglio.it/*", + "*://*.ilgazzettino.it/*", + "*://*.ilgiorno.it/*", + "*://*.illawarramercury.com.au/*", + "*://*.ilmanifesto.it/*", + "*://*.ilmattino.it/*", + "*://*.ilmessaggero.it/*", + "*://*.ilrestodelcarlino.it/*", + "*://*.ilsole24ore.com/*", + "*://*.iltelegrafolivorno.it/*", + "*://*.iltirreno.it/*", + "*://*.inc.com/*", + "*://*.inc42.com/*", + "*://*.independent.co.uk/*", + "*://*.independent.ie/*", + "*://*.indianexpress.com/*", + "*://*.indiatimes.com/*", + "*://*.indiatoday.in/*", + "*://*.indystar.com/*", + "*://*.inews.co.uk/*", + "*://*.informacion.es/*", + "*://*.infzm.com/*", + "*://*.inkl.com/*", + "*://*.inquirer.com/*", + "*://*.insidehighered.com/*", + "*://*.intelligentinvestor.com.au/*", + "*://*.interestingengineering.com/*", + "*://*.internazionale.it/*", + "*://*.intrafish.com/*", + "*://*.intrafish.no/*", + "*://*.investorschronicle.co.uk/*", + "*://*.investsmart.com.au/*", + "*://*.ipolitics.ca/*", + "*://*.irishexaminer.com/*", + "*://*.irishnews.com/*", + "*://*.irishtimes.com/*", + "*://*.italian.tech/*", + "*://*.italiaoggi.it/*", + "*://*.jacksonville.com/*", + "*://*.jacobin.de/*", + "*://*.japantimes.co.jp/*", + "*://*.jazzwise.com/*", + "*://*.jeuneafrique.com/*", + "*://*.jgnt.co/*", + "*://*.journaldemillau.fr/*", + "*://*.journaldemontreal.com/*", + "*://*.journaldequebec.com/*", + "*://*.journaldunet.com/*", + "*://*.journalnow.com/*", + "*://*.journalstar.com/*", + "*://*.jpost.com/*", + "*://*.jsonline.com/*", + "*://*.kansas.com/*", + "*://*.kansascity.com/*", + "*://*.kathimerini.gr/*", + "*://*.kentucky.com/*", + "*://*.kn-online.de/*", + "*://*.knack.be/*", + "*://*.knoxnews.com/*", + "*://*.kompas.id/*", + "*://*.komputerswiat.pl/*", + "*://*.krautreporter.de/*", + "*://*.ksta.de/*", + "*://*.kurier.at/*", + "*://*.kw.be/*", + "*://*.la-croix.com/*", + "*://*.labusinessjournal.com/*", + "*://*.lacote.ch/*", + "*://*.ladepeche.fr/*", + "*://*.ladiaria.com.uy/*", + "*://*.lagaceta.com.ar/*", + "*://*.lalibre.be/*", + "*://*.lamontagne.fr/*", + "*://*.lanacion.com.ar/*", + "*://*.lanazione.it/*", + "*://*.lanouvellerepublique.fr/*", + "*://*.lanuovasardegna.it/*", + "*://*.laprovincia.es/*", + "*://*.larepubliquedespyrenees.fr/*", + "*://*.larioja.com/*", + "*://*.lasprovincias.es/*", + "*://*.lastampa.it/*", + "*://*.latercera.com/*", + "*://*.latimes.com/*", + "*://*.lavanguardia.com/*", + "*://*.lavenir.net/*", + "*://*.laverdad.es/*", + "*://*.lavoz.com.ar/*", + "*://*.lavozdigital.es/*", + "*://*.lc.nl/*", + "*://*.le1hebdo.fr/*", + "*://*.lecho.be/*", + "*://*.lecourrierdesstrateges.fr/*", + "*://*.ledevoir.com/*", + "*://*.lefigaro.fr/*", + "*://*.legrandcontinent.eu/*", + "*://*.lehighvalleylive.com/*", + "*://*.lejdd.fr/*", + "*://*.lemagit.fr/*", + "*://*.lemonde.fr/*", + "*://*.lenouveleconomiste.fr/*", + "*://*.lenouvelliste.ch/*", + "*://*.leparisien.fr/*", + "*://*.lepoint.fr/*", + "*://*.lequipe.fr/*", + "*://*.lequotidiendumedecin.fr/*", + "*://*.lequotidiendupharmacien.fr/*", + "*://*.lerevenu.com/*", + "*://*.lescienze.it/*", + "*://*.lesechos.fr/*", + "*://*.lesinrocks.com/*", + "*://*.lesoleil.com/*", + "*://*.letelegramme.fr/*", + "*://*.levante-emv.com/*", + "*://*.levif.be/*", + "*://*.lexpress.fr/*", + "*://*.libelle.be/*", + "*://*.libelle.nl/*", + "*://*.liberation.fr/*", + "*://*.linda.nl/*", + "*://*.lindependant.fr/*", + "*://*.linforme.com/*", + "*://*.literaryreview.co.uk/*", + "*://*.livelaw.in/*", + "*://*.livemint.com/*", + "*://*.ln-online.de/*", + "*://*.lne.es/*", + "*://*.loebclassics.com/*", + "*://*.loeildelaphotographie.com/*", + "*://*.lopinion.fr/*", + "*://*.losandes.com.ar/*", + "*://*.lrb.co.uk/*", + "*://*.luzernerzeitung.ch/*", + "*://*.lvz.de/*", + "*://*.macrobusiness.com.au/*", + "*://*.madison.com/*", + "*://*.magazyn-kuchnia.pl/*", + "*://*.mailonsunday.co.uk/*", + "*://*.mainichi.jp/*", + "*://*.mallorcazeitung.es/*", + "*://*.manager-magazin.de/*", + "*://*.mannheimer-morgen.de/*", + "*://*.manoramaonline.com/*", + "*://*.marca.com/*", + "*://*.margriet.nl/*", + "*://*.marianne.net/*", + "*://*.marketwatch.com/*", + "*://*.masslive.com/*", + "*://*.maz-online.de/*", + "*://*.mcall.com/*", + "*://*.mcclatchy.com/*", + "*://*.mcclatchydc.com/*", + "*://*.medium.com/*", + "*://*.medscape.com/*", + "*://*.menshealth.com/*", + "*://*.mercurynews.com/*", + "*://*.merkur.de/*", + "*://*.mexiconewsdaily.com/*", + "*://*.miamiherald.com/*", + "*://*.mid-day.com/*", + "*://*.midilibre.fr/*", + "*://*.milanofinanza.it/*", + "*://*.mlive.com/*", + "*://*.moda.it/*", + "*://*.modernhealthcare.com/*", + "*://*.modernretail.co/*", + "*://*.monacomatin.mc/*", + "*://*.monocle.com/*", + "*://*.mopo.de/*", + "*://*.morgenpost.de/*", + "*://*.motorradonline.de/*", + "*://*.motorsportmagazine.com/*", + "*://*.mundodeportivo.com/*", + "*://*.mv-voice.com/*", + "*://*.nation.africa/*", + "*://*.nationalgeographic.com/*", + "*://*.nationalpost.com/*", + "*://*.nationalreview.com/*", + "*://*.nautil.us/*", + "*://*.ndtvprofit.com/*", + "*://*.neuepresse.de/*", + "*://*.newcastleherald.com.au/*", + "*://*.newcriterion.com/*", + "*://*.newrepublic.com/*", + "*://*.news-press.com/*", + "*://*.newscientist.com/*", + "*://*.newsday.com/*", + "*://*.newslaundry.com/*", + "*://*.newsobserver.com/*", + "*://*.newstatesman.com/*", + "*://*.newsweek.com/*", + "*://*.newsweek.pl/*", + "*://*.newyorker.com/*", + "*://*.nhregister.com/*", + "*://*.niagarafallsreview.ca/*", + "*://*.nicematin.com/*", + "*://*.nieuwsblad.be/*", + "*://*.nikkei.com/*", + "*://*.nj.com/*", + "*://*.nola.com/*", + "*://*.northerndailyleader.com.au/*", + "*://*.northjersey.com/*", + "*://*.noz.de/*", + "*://*.nrc.nl/*", + "*://*.nrpyrenees.fr/*", + "*://*.nrz.de/*", + "*://*.nsctotal.com.br/*", + "*://*.nv.ua/*", + "*://*.nw.de/*", + "*://*.nwitimes.com/*", + "*://*.nwzonline.de/*", + "*://*.nybooks.com/*", + "*://*.nydailynews.com/*", + "*://*.nymag.com/*", + "*://*.nysun.com/*", + "*://*.nyteknik.se/*", + "*://*.nytimes.com/*", + "*://*.nzherald.co.nz/*", + "*://*.nzz.ch/*", + "*://*.observador.pt/*", + "*://*.ocbj.com/*", + "*://*.ocregister.com/*", + "*://*.oklahoman.com/*", + "*://*.ole.com.ar/*", + "*://*.omaha.com/*", + "*://*.onet.pl/*", + "*://*.oprahdaily.com/*", + "*://*.oregonlive.com/*", + "*://*.orlandosentinel.com/*", + "*://*.ostsee-zeitung.de/*", + "*://*.otz.de/*", + "*://*.outdoorlife.com/*", + "*://*.outlookbusiness.com/*", + "*://*.outlookindia.com/*", + "*://*.outsideonline.com/*", + "*://*.ovb-online.de/*", + "*://*.oxygenmag.com/*", + "*://*.paloaltoonline.com/*", + "*://*.parismatch.com/*", + "*://*.parkiet.com/*", + "*://*.parool.nl/*", + "*://*.pastemagazine.com/*", + "*://*.pb.pl/*", + "*://*.pennlive.com/*", + "*://*.petitbleu.fr/*", + "*://*.philanthropy.com/*", + "*://*.philomag.com/*", + "*://*.philomag.de/*", + "*://*.philonomist.com/*", + "*://*.philosophynow.org/*", + "*://*.pilotonline.com/*", + "*://*.pionline.com/*", + "*://*.piqd.de/*", + "*://*.piratewires.com/*", + "*://*.plasticsnews.com/*", + "*://*.politicaexterior.com/*", + "*://*.politico.com/*", + "*://*.politis.fr/*", + "*://*.polityka.pl/*", + "*://*.popsci.com/*", + "*://*.popularmechanics.com/*", + "*://*.post-gazette.com/*", + "*://*.pourlascience.fr/*", + "*://*.pourleco.com/*", + "*://*.precisionmedicineonline.com/*", + "*://*.pressenterprise.com/*", + "*://*.prevention.com/*", + "*://*.profi.de/*", + "*://*.profil.at/*", + "*://*.project-syndicate.org/*", + "*://*.prospectmagazine.co.uk/*", + "*://*.public.fr/*", + "*://*.publico.es/*", + "*://*.puck.news/*", + "*://*.pzc.nl/*", + "*://*.quora.com/*", + "*://*.quotidiano.net/*", + "*://*.quotidianodipuglia.it/*", + "*://*.qz.com/*", + "*://*.rechargenews.com/*", + "*://*.record.pt/*", + "*://*.reforme.net/*", + "*://*.repubblica.it/*", + "*://*.reuters.com/*", + "*://*.reviewjournal.com/*", + "*://*.revistaoeste.com/*", + "*://*.revue21.fr/*", + "*://*.revueconflits.com/*", + "*://*.rheinpfalz.de/*", + "*://*.richmond.com/*", + "*://*.rivals.com/*", + "*://*.rnd.de/*", + "*://*.roadandtrack.com/*", + "*://*.rollingstone.com/*", + "*://*.rp-online.de/*", + "*://*.rp.pl/*", + "*://*.rubbernews.com/*", + "*://*.rugbypass.com/*", + "*://*.rugbyrama.fr/*", + "*://*.ruhrnachrichten.de/*", + "*://*.rundschau-online.de/*", + "*://*.runnersworld.com/*", + "*://*.saarbruecker-zeitung.de/*", + "*://*.sabado.pt/*", + "*://*.sacbee.com/*", + "*://*.saechsische.de/*", + "*://*.sandiegouniontribune.com/*", + "*://*.scholastic.com/*", + "*://*.schweizermonat.ch/*", + "*://*.science-et-vie.com/*", + "*://*.science.org/*", + "*://*.sciencenews.org/*", + "*://*.sciencesetavenir.fr/*", + "*://*.scienceshumaines.com/*", + "*://*.scientificamerican.com/*", + "*://*.scmp.com/*", + "*://*.scotsman.com/*", + "*://*.sdbj.com/*", + "*://*.seattletimes.com/*", + "*://*.sfchronicle.com/*", + "*://*.sfstandard.com/*", + "*://*.sfvbj.com/*", + "*://*.shreveportbossieradvocate.com/*", + "*://*.shz.de/*", + "*://*.si.com/*", + "*://*.silive.com/*", + "*://*.skimag.com/*", + "*://*.sky.it/*", + "*://*.slate.com/*", + "*://*.slideshare.net/*", + "*://*.sloanreview.mit.edu/*", + "*://*.sltrib.com/*", + "*://*.smartcompany.com.au/*", + "*://*.smh.com.au/*", + "*://*.sofrep.com/*", + "*://*.sourcingjournal.com/*", + "*://*.spectator.co.uk/*", + "*://*.spectator.com.au/*", + "*://*.spektrum.de/*", + "*://*.spglobal.com/*", + "*://*.spiegel.de/*", + "*://*.sportico.com/*", + "*://*.springermedizin.de/*", + "*://*.standaard.be/*", + "*://*.standard.co.uk/*", + "*://*.standard.net.au/*", + "*://*.standardmedia.co.ke/*", + "*://*.star-telegram.com/*", + "*://*.staradvertiser.com/*", + "*://*.startribune.com/*", + "*://*.statesman.com/*", + "*://*.statnews.com/*", + "*://*.stcatharinesstandard.ca/*", + "*://*.stereogum.com/*", + "*://*.stltoday.com/*", + "*://*.stocknews.com/*", + "*://*.straitstimes.com/*", + "*://*.stratfor.com/*", + "*://*.study.com/*", + "*://*.stylist.co.uk/*", + "*://*.sudouest.fr/*", + "*://*.sueddeutsche.de/*", + "*://*.suedkurier.de/*", + "*://*.sun-sentinel.com/*", + "*://*.suomensotilas.fi/*", + "*://*.sustainableplastics.com/*", + "*://*.swarajyamag.com/*", + "*://*.sydsvenskan.se/*", + "*://*.syracuse.com/*", + "*://*.t3n.de/*", + "*://*.tagblatt.ch/*", + "*://*.tagesanzeiger.ch/*", + "*://*.tagesspiegel.de/*", + "*://*.tampabay.com/*", + "*://*.tdg.ch/*", + "*://*.techinasia.com/*", + "*://*.technologyreview.com/*", + "*://*.techtarget.com/*", + "*://*.telegraaf.nl/*", + "*://*.telegraph.co.uk/*", + "*://*.telerama.fr/*", + "*://*.tempo.co/*", + "*://*.tennessean.com/*", + "*://*.tes.com/*", + "*://*.texasmonthly.com/*", + "*://*.the-american-interest.com/*", + "*://*.the-independent.com/*", + "*://*.the-scientist.com/*", + "*://*.the-tls.co.uk/*", + "*://*.theadvocate.com.au/*", + "*://*.theadvocate.com/*", + "*://*.theage.com.au/*", + "*://*.theamericanconservative.com/*", + "*://*.theamericanscholar.org/*", + "*://*.theartnewspaper.com/*", + "*://*.theatlantic.com/*", + "*://*.theaustralian.com.au/*", + "*://*.thebaffler.com/*", + "*://*.thebaltimorebanner.com/*", + "*://*.thebookseller.com/*", + "*://*.thebulletin.org/*", + "*://*.thechronicle.com.au/*", + "*://*.thecourier.com.au/*", + "*://*.thecritic.co.uk/*", + "*://*.thecut.com/*", + "*://*.thedailybeast.com/*", + "*://*.thediplomat.com/*", + "*://*.thedispatch.com/*", + "*://*.theepochtimes.com/*", + "*://*.theglobeandmail.com/*", + "*://*.thehill.com/*", + "*://*.thehindu.com/*", + "*://*.thehindubusinessline.com/*", + "*://*.theimpression.com/*", + "*://*.theinitium.com/*", + "*://*.theintercept.com/*", + "*://*.thejuggernaut.com/*", + "*://*.thelampmagazine.com/*", + "*://*.thelawyer.com/*", + "*://*.theleaflet.in/*", + "*://*.themandarin.com.au/*", + "*://*.themarker.com/*", + "*://*.themarket.ch/*", + "*://*.themercury.com.au/*", + "*://*.thenation.com/*", + "*://*.thenewatlantis.com/*", + "*://*.theneweuropean.co.uk/*", + "*://*.thenewslens.com/*", + "*://*.thenewsminute.com/*", + "*://*.thepeterboroughexaminer.com/*", + "*://*.thepointmag.com/*", + "*://*.theprovince.com/*", + "*://*.thequint.com/*", + "*://*.therecord.com/*", + "*://*.thesaturdaypaper.com.au/*", + "*://*.thescottishsun.co.uk/*", + "*://*.thespec.com/*", + "*://*.thespectator.com/*", + "*://*.thestage.co.uk/*", + "*://*.thestar.com/*", + "*://*.thestate.com/*", + "*://*.thesun.co.uk/*", + "*://*.thetimes.com/*", + "*://*.theverge.com/*", + "*://*.theweek.com/*", + "*://*.thewest.com.au/*", + "*://*.thewrap.com/*", + "*://*.thisismoney.co.uk/*", + "*://*.thueringer-allgemeine.de/*", + "*://*.tijd.be/*", + "*://*.timeshighereducation.com/*", + "*://*.timesunion.com/*", + "*://*.tirebusiness.com/*", + "*://*.tlz.de/*", + "*://*.topagrar.com/*", + "*://*.torontosun.com/*", + "*://*.towardsdatascience.com/*", + "*://*.townandcountrymag.com/*", + "*://*.townsvillebulletin.com.au/*", + "*://*.tradewindsnews.com/*", + "*://*.trailrunnermag.com/*", + "*://*.tri-cityherald.com/*", + "*://*.triathlete.com/*", + "*://*.trouw.nl/*", + "*://*.tt.com/*", + "*://*.tubantia.nl/*", + "*://*.tucson.com/*", + "*://*.tulsaworld.com/*", + "*://*.tuttosport.com/*", + "*://*.twincities.com/*", + "*://*.unherd.com/*", + "*://*.uol.com.br/*", + "*://*.upstreamonline.com/*", + "*://*.usatoday.com/*", + "*://*.usinenouvelle.com/*", + "*://*.utech-polyurethane.com/*", + "*://*.valeursactuelles.com/*", + "*://*.vancouversun.com/*", + "*://*.vanityfair.com/*", + "*://*.variety.com/*", + "*://*.varmatin.com/*", + "*://*.vegetariantimes.com/*", + "*://*.vice.com/*", + "*://*.vikatan.com/*", + "*://*.vn.at/*", + "*://*.vn.nl/*", + "*://*.vogue.co.uk/*", + "*://*.vogue.com/*", + "*://*.voguebusiness.com/*", + "*://*.vol.at/*", + "*://*.volksfreund.de/*", + "*://*.volkskrant.nl/*", + "*://*.vox.com/*", + "*://*.vulture.com/*", + "*://*.washingtonexaminer.com/*", + "*://*.washingtonpost.com/*", + "*://*.watoday.com.au/*", + "*://*.waz.de/*", + "*://*.weeklytimesnow.com.au/*", + "*://*.wellandtribune.ca/*", + "*://*.welt.de/*", + "*://*.weltkunst.de/*", + "*://*.weser-kurier.de/*", + "*://*.westernadvocate.com.au/*", + "*://*.wiesbadener-kurier.de/*", + "*://*.winnipegfreepress.com/*", + "*://*.wired.com/*", + "*://*.wochenblatt.com/*", + "*://*.womenshealth.de/*", + "*://*.womenshealthmag.com/*", + "*://*.womensrunning.com/*", + "*://*.wonderzine.com/*", + "*://*.wp.de/*", + "*://*.wr.de/*", + "*://*.wsj.com/*", + "*://*.wwd.com/*", + "*://*.wyborcza.biz/*", + "*://*.wyborcza.pl/*", + "*://*.wysokieobcasy.pl/*", + "*://*.ynet.co.il/*", + "*://*.yogajournal.com/*", + "*://*.yorkshirepost.co.uk/*", + "*://*.zeit.de/*", + "*://*.zerohedge.com/*", + "*://*.amplitude.com/*", + "*://*.ampproject.org/*", + "*://*.axate.io/*", + "*://*.blueconic.net/*", + "*://*.cxense.com/*", + "*://*.ensighten.com/*", + "*://*.evolok.net/*", + "*://*.fewcents.co/*", + "*://*.loader-cdn.azureedge.net/*", + "*://*.matheranalytics.com/*", + "*://*.newsmemory.com/*", + "*://*.omeda.com/*", + "*://*.onecount.net/*", + "*://*.pelcro.com/*", + "*://*.piano.io/*", + "*://*.pico.tools/*", + "*://*.poool.fr/*", + "*://*.qiota.com/*", + "*://*.sophi.io/*", + "*://*.steadyhq.com/*", + "*://*.tinypass.com/*", + "*://*.zephr.com/*", + "*://*.blink.net/*", + "*://*.bwbx.io/*", + "*://*.cedscdn.it/*", + "*://*.cedsdigital.it/*", + "*://*.corriereobjects.it/*", + "*://*.djservices.io/*", + "*://*.dowjones.io/*", + "*://*.emol.cl/*", + "*://*.epochbase.com/*", + "*://*.epochbase.eu/*", + "*://*.flip-pay.com/*", + "*://*.funkemedien.de/*", + "*://*.gjirafa.tech/*", + "*://*.go.com/*", + "*://*.hadrianpaywall.com/*", + "*://*.kinja-static.com/*", + "*://*.medscapestatic.com/*", + "*://*.ndcmediagroep.nl/*", + "*://*.nhst.tech/*", + "*://*.nyt.com/*", + "*://*.pasedigital.cl/*", + "*://*.townnews.com/*", + "*://*.wallkit.net/*", + "*://*.wbmdstatic.com/*", + "*://*.wgchrrammzv.com/*", + "*://*.zeddit.com/*", + "*://archive.fo/*", + "*://archive.is/*", + "*://archive.li/*", + "*://archive.md/*", + "*://archive.ph/*", + "*://archive.vn/*", + "*://codebeautify.org/*", + "*://gitflic.ru/*" + ], + "version": "4.0.8.7" +} diff --git a/options/clearCookies.js b/options/clearCookies.js new file mode 100644 index 0000000..ed55134 --- /dev/null +++ b/options/clearCookies.js @@ -0,0 +1,48 @@ +var ext_api = (typeof browser === 'object') ? browser : chrome; + +try { +window.localStorage.clear(); +sessionStorage.clear(); +} catch (e) { + console.log(e); +} + +var cookie_domain = getCookieDomain(document.domain); + +// send domain to background.js (to clear cookies) +ext_api.runtime.sendMessage({ + request: 'clear_cookies_domain', + data: { + domain: cookie_domain + } +}); + +function getCookieDomain(hostname) { + let domain = hostname; + let n = 0; + let parts = hostname.split('.'); + let str = '_gd' + (new Date()).getTime(); + try { + while (n < (parts.length - 1) && document.cookie.indexOf(str + '=' + str) == -1) { + domain = parts.slice(-1 - (++n)).join('.'); + document.cookie = str + "=" + str + ";domain=" + domain + ";"; + } + document.cookie = str + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=" + domain + ";"; + } catch (e) { + console.log(e); + } + return domain; +} + +var msg = "Cookies (and local storage) removed from " + cookie_domain; +showMessage(msg, 2000); + +function showMessage(msg, duration) { + var el = document.createElement("div"); + el.setAttribute("style", "position:fixed;top:40%;left:40%;z-index:99;padding:4px;font-family: Arial, sans-serif;font-size:18px;color:white;background-color:blue;"); + el.innerText = msg; + setTimeout(function () { + el.parentNode.removeChild(el); + }, duration); + (document.body || document.head || document.documentElement).appendChild(el); +} diff --git a/options/htmlviewer.js b/options/htmlviewer.js new file mode 100644 index 0000000..c122707 --- /dev/null +++ b/options/htmlviewer.js @@ -0,0 +1,155 @@ + +if (window.location.href === 'https://codebeautify.org/htmlviewer') { + let htmlviewer = document.querySelector('head > link[rel="canonical"][href="https://codebeautify.org/htmlviewer"]'); + if (!htmlviewer) { + let ads = 'div.OUTBRAIN, div[id^="taboola-"], div.ad-container, div[class*="-ad-container"], div[class*="_ad-container"], div.arc_ad, div[id^="adv-"], div[class^="ad-"], div[class^="ad_"], div[class^="advert"], aside.ad'; + hideDOMStyle(ads, 10); + let cookie_consent = 'div#didomi-host, div#onetrust-consent-sdk, div[id^="sp_message_container"], div#CybotCookiebotDialog, div#usercentrics-root, div.cmp-root-container'; + hideDOMStyle(cookie_consent, 11); + let cybot_fade = document.querySelector('div#CybotCookiebotDialogBodyUnderlay'); + if (cybot_fade) + cybot_fade.remove(); + let html_noscroll = ['cmp-modal-open', 'sp-message-open']; + for (let elem of html_noscroll) { + let noscroll = document.querySelector('html[class~="' + elem + '"]'); + if (noscroll) + noscroll.classList.remove(elem); + } + let body_noscroll = ['no-scroll', 'overflowHidden', 'showFirstLayer']; + for (let elem of body_noscroll) { + let noscroll = document.querySelector('body[class~="' + elem + '"]'); + if (noscroll) + noscroll.classList.remove(elem); + } + let overflow_hidden = document.querySelector('body[style*="overflow: hidden;"]'); + if (overflow_hidden) + overflow_hidden.style.overflow = 'auto'; + + unhideDataImages() + let hide; + let canonical = document.querySelector('head > link[rel="canonical"][href], link[rel="canonical"][href]'); + if (canonical) { + let canonical_url = canonical.href; + let hostname = urlHost(canonical_url); + correctLinks(hostname); + unhideHostImages(hostname); + + if (hostname.endsWith('.de')) { + if (matchUrlDomain('augsburger-allgemeine.de', canonical_url)) { + hide = 'div.pt_onlinestory'; + } else if (matchUrlDomain('die-tagespost.de', canonical_url)) { + hide = 'section#footer-popup'; + } else if (matchUrlDomain('lkz.de', canonical_url)) { + let article_hidden = document.querySelector('div#main'); + if (article_hidden) + article_hidden.removeAttribute('id'); + hide = 'div.nfy-element-ad, div.error-screen'; + } else if (matchUrlDomain('main-echo.de', canonical_url)) { + let hidden_elems = document.querySelectorAll('[hidden]'); + for (let elem of hidden_elems) + elem.removeAttribute('hidden'); + hide = 'div[id^="traffective-ad-"]'; + } else if (matchUrlDomain('mainpost.de', canonical_url)) { + hide = 'div.aa-first-layer'; + } else if (matchUrlDomain(['noz.de', 'shz.de'], canonical_url)) { + hide = 'div.msn-ads'; + } + } else if (hostname.endsWith('.fi')) { + if (matchUrlDomain(['aamulehti.fi', 'hs.fi', 'is.fi'], canonical_url)) { + hide = 'header, footer, div.article-actions, div.skip-link, article.list, iframe[data-testid="iframe-embed"]'; + let image_containers = document.querySelectorAll('div.aspect-ratio-container'); + for (let elem of image_containers) + elem.classList.remove('aspect-ratio-container'); + } + } else if (hostname.endsWith('.fr')) { + if (matchUrlDomain('humanite.fr', canonical_url)) { + hide = 'tab-bar-component, div#form_don'; + } + } else { + if (matchUrlDomain(['businesslive.co.za', 'timeslive.co.za'], canonical_url)) { + hide = 'div#gdpr-overlay'; + } else if (matchUrlDomain('ibj.com', canonical_url)) { + hide = 'header#masthead, nav, footer, aside#secondary, div.article-audio, div.article-left-rail, div.promo-container, div.toolbar'; + } else if (matchUrlDomain('investorschronicle.co.uk', canonical_url)) { + hide = 'div#specialist__renderer--header'; + } else if (matchUrlDomain('nouvelobs.com', canonical_url)) { + hide = 'div.paywall'; + } else if (matchUrlDomain('repubblica.it', canonical_url)) { + hide = 'div.cookiewall, div[data-src^="//box.kataweb.it/"]'; + } else if (matchUrlDomain('telecompaper.com', canonical_url)) { + hide = 'div[role="dialog"]'; + } + } + } else { + if (document.querySelector('head > link[as="image"][imagesrcset^="https://photos.watchmedier.dk/"]')) {// ###_dk_watch_media + hide = 'header, footer, img, svg, section[data-sentry-component="ListCard"]'; + } + } + if (hide) + hideDOMStyle(hide); + } +} + +function matchDomain(domains, hostname = window.location.hostname) { + let matched_domain = false; + if (typeof domains === 'string') + domains = [domains]; + domains.some(domain => (hostname === domain || hostname.endsWith('.' + domain)) && (matched_domain = domain)); + return matched_domain; +} + +function urlHost(url) { + if (/^http/.test(url)) { + try { + return new URL(url).hostname; + } catch (e) { + console.log(`url not valid: ${url} error: ${e}`); + } + } + return url; +} + +function matchUrlDomain(domains, url) { + return matchDomain(domains, urlHost(url)); +} + +function hideDOMStyle(selector, id = 1) { + let style = document.querySelector('head > style#ext'+ id); + if (!style && document.head) { + let sheet = document.createElement('style'); + sheet.id = 'ext' + id; + sheet.innerText = selector + ' {display: none !important;}'; + document.head.appendChild(sheet); + } +} + +function correctLinks(hostname) { + let links = document.querySelectorAll('a[href^="/"], link[rel="stylesheet"][href^="/"]'); + for (let elem of links) + elem.href = elem.href.replace('codebeautify.org', hostname); +} + +function unhideHostImages(hostname) { + let hidden_images = document.querySelectorAll('img[src^="/"]'); + for (let elem of hidden_images) { + elem.src = elem.src.replace('codebeautify.org', hostname); + elem.removeAttribute('srcset'); + let sources = elem.parentNode.querySelectorAll('source[srcset]'); + for (let source of sources) + source.removeAttribute('srcset'); + } +} + +function unhideDataImages() { + let hidden_images = document.querySelectorAll('img[src^="data:image/"]'); + for (let elem of hidden_images) { + if (elem.getAttribute('data-src')) + elem.src = elem.getAttribute('data-src'); + else if (elem.parentNode) { + let source = elem.parentNode.querySelector('source[data-srcset]'); + if (source) { + elem.src = source.getAttribute('data-srcset').split(/[\?\s]/)[0]; + } + } + } +} diff --git a/options/offscreen.html b/options/offscreen.html new file mode 100644 index 0000000..5096adf --- /dev/null +++ b/options/offscreen.html @@ -0,0 +1,2 @@ + + diff --git a/options/offscreen.js b/options/offscreen.js new file mode 100644 index 0000000..e136272 --- /dev/null +++ b/options/offscreen.js @@ -0,0 +1,19 @@ +var ext_api = (typeof browser === 'object') ? browser : chrome; +ext_api.runtime.onMessage.addListener(handleMessages); + +async function handleMessages(message) { + if (message.request === 'getExtSrc_dom') + getExtSrc_dom(message.data); +} + +function getExtSrc_dom(data) { + let parser = new DOMParser(); + let doc = parser.parseFromString(data.html, 'text/html'); + let article_new = doc.querySelector(data.selector_source); + data.html = article_new ? article_new.outerHTML : ''; + sendToBackground('getExtSrc_dom_result', data); +} + +function sendToBackground(request, data) { + ext_api.runtime.sendMessage({request, data}); +} diff --git a/options/optin/opt-in.css b/options/optin/opt-in.css new file mode 100644 index 0000000..e6ac38a --- /dev/null +++ b/options/optin/opt-in.css @@ -0,0 +1,7 @@ +html, body { + padding-left: 0.5em; + padding-right: 0.5em; +} +button { + margin: 0.2em 0.2em 0.5em 0; +} diff --git a/options/optin/opt-in.html b/options/optin/opt-in.html new file mode 100644 index 0000000..49d86f4 --- /dev/null +++ b/options/optin/opt-in.html @@ -0,0 +1,56 @@ + + + + + + + Bypass Paywalls Clean (custom sites, check update & setCookie opt-in) + + + + + + +
+

Bypass Paywalls Clean
- custom sites, check update & setCookie opt-in

+
+
+
+

custom sites opt-in

+

If you want to enable custom sites and also have the option to remove cookies/block general paywall-scripts of 'unlisted' sites:
+

custom sites enabled:

+
+ + + +
+

You can also just request permissions for the custom sites you added yourself.

+
+
+

check update opt-in

+

Check for update of version (on startup and when opening options):
+

check update enabled:

+
+ + +
+
+
+

setCookie opt-in

+

For some sites a necessary cookie has to be set (this cookie doesn't contain any personal information about the user or device):

+ None

+

setCookie opt-in enabled:

+
+ + +
+

+

+ + + +
+

+ + + diff --git a/options/optin/opt-in.js b/options/optin/opt-in.js new file mode 100644 index 0000000..ff683bb --- /dev/null +++ b/options/optin/opt-in.js @@ -0,0 +1,112 @@ +var ext_api = (typeof browser === 'object') ? browser : chrome; +var url_loc = (typeof browser === 'object') ? 'firefox' : 'chrome'; +var manifestData = ext_api.runtime.getManifest(); +var ext_manifest_version = manifestData.manifest_version; +var navigator_ua = navigator.userAgent; +var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile'); +var chrome_android_browser = navigator_ua_mobile && (url_loc === 'chrome') && !navigator_ua.toLowerCase().includes('yabrowser'); +var custom_switch = ((manifestData.optional_permissions && manifestData.optional_permissions.length) || (manifestData.optional_host_permissions && manifestData.optional_host_permissions.length)) && !chrome_android_browser; + +window.addEventListener("load", function () { + document.getElementById("button-close").addEventListener("click", function () { + ext_api.storage.local.set({ + "optInShown": true, + "customShown": true + }); + window.close(); + }); + + var opt_in_enabled = document.getElementById('opt-in-enabled'); + ext_api.storage.local.get("optIn", function (result) { + opt_in_enabled.innerText = result.optIn ? 'YES' : 'NO'; + }); + var mv3_remove_perm_msg = document.getElementById('mv3-remove-perm-msg'); + + document.getElementById("optin-enable").addEventListener("click", function () { + ext_api.storage.local.set({ + "optIn": true, + "optInShown": true + }); + opt_in_enabled.innerText = 'YES'; + }); + + document.getElementById("optin-disable").addEventListener("click", function () { + ext_api.storage.local.set({ + "optIn": false, + "optInShown": true + }); + opt_in_enabled.innerText = 'NO'; + }); + + var custom_enabled = document.getElementById('custom-enabled'); + ext_api.permissions.contains({ + origins: ["*://*/*"] + }, function (result) { + if (result) { + custom_enabled.innerText = 'YES'; + } else { + custom_enabled.innerText = 'NO'; + } + }); + + if (custom_switch) { + + document.querySelector('#custom-enable').addEventListener('click', function (event) { + ext_api.permissions.request({ + origins: ["*://*/*"] + }, function (granted) { + if (granted) { + custom_enabled.innerText = 'YES'; + ext_api.storage.local.set({ + "customOptIn": true + }); + if (ext_manifest_version === 3) + mv3_remove_perm_msg.innerText = ''; + } else { + custom_enabled.innerText = 'NO'; + } + ext_api.storage.local.set({ + "customShown": true + }); + }); + }); + + document.querySelector('#custom-disable').addEventListener('click', function (event) { + ext_api.permissions.remove({ + origins: ["*://*/*"] + }, function (removed) { + if (removed) { + custom_enabled.innerText = 'NO'; + ext_api.storage.local.set({ + "customOptIn": false + }); + if (ext_manifest_version === 3) + mv3_remove_perm_msg.innerText = 'Reload extension on removal of optional host permissions'; + } + ext_api.storage.local.set({ + "customShown": true + }); + }); + }); + + }// custom_switch + + var update_enabled = document.getElementById('update-enabled'); + ext_api.storage.local.get({optInUpdate: true}, function (result) { + update_enabled.innerText = result.optInUpdate ? 'YES' : 'NO'; + }); + + document.getElementById("update-enable").addEventListener("click", function () { + ext_api.storage.local.set({ + "optInUpdate": true + }); + update_enabled.innerText = 'YES'; + }); + + document.getElementById("update-disable").addEventListener("click", function () { + ext_api.storage.local.set({ + "optInUpdate": false + }); + update_enabled.innerText = 'NO'; + }); +}); diff --git a/options/options.html b/options/options.html new file mode 100644 index 0000000..0f5d91c --- /dev/null +++ b/options/options.html @@ -0,0 +1,51 @@ + + + + + + Bypass Paywalls Clean Options + + + +

Options |

+ Changelog local or online + | Help local or online +
+
Some selected sites will have their cookies cleared; uncheck the sites (or add to excluded sites) for which you have an account.
+ If you also want to block general paywall-scripts for unlisted sites you have to opt-in to custom sites (host permission for access to all sites is needed). + +
+
+
+ + + + + + + + +
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + diff --git a/options/options.js b/options/options.js new file mode 100644 index 0000000..2ca50ee --- /dev/null +++ b/options/options.js @@ -0,0 +1,228 @@ +var ext_api = (typeof browser === 'object') ? browser : chrome; + +// Saves options to ext_api.storage +function save_options(event) { + var inputEls = document.querySelectorAll('#bypass_sites input'); + var sites = {}; + + var sites = Array.from(inputEls).reduce(function (memo, inputEl) { + if (inputEl.checked) { + memo[inputEl.dataset.key] = inputEl.dataset.value; + } + return memo; + }, {}); + + ext_api.storage.local.set({ + sites: sites + }, function () { + // Update status to let user know options were saved. + if (event) { + var status_label = document.querySelectorAll('[id^="status"]'); + for (let status of status_label) { + status.textContent = 'Options saved.'; + setTimeout(function () { + status.textContent = ''; + }, 800); + } + } + }); +} + +// Restores checkbox input states using the preferences stored in ext_api.storage. +function renderOptions() { + var labelEl; + ext_api.storage.local.get({ + sites: {}, + sites_updated: {}, + sites_custom: {}, + sites_excluded: [] + }, function (items) { + var sites = items.sites; + var sites_updated = filterObject(items.sites_updated, function (val, key) { + return !val.nofix + }); + var sites_updated_domains_new = Object.values(sites_updated).filter(x => (x.domain && !defaultSites_domains.includes(x.domain) || x.group)).map(x => x.group ? x.group.filter(y => !defaultSites_domains.includes(y)) : x.domain).flat(); + var sites_updated_perm_domains_new = Object.values(sites_updated).filter(x => x.block_host_perm_add).map(x => x.block_host_perm_add.split(',').filter(x => x).map(x => x.trim())).flat(); + var sites_custom = items.sites_custom; + var sites_custom_domains_new = Object.values(sites_custom).filter(x => x.domain && !defaultSites_domains.includes(x.domain)).map(x => x.group ? x.group.split(',').map(x => x.trim()) : x.domain).flat(); + var sites_custom_perm_domains_new = Object.values(sites_custom).filter(x => x.block_host_perm_add).map(x => x.block_host_perm_add.split(',').filter(x => x).map(x => x.trim())).flat(); + + var perm_origins = sites_custom_domains_new.concat(sites_updated_domains_new, sites_custom_perm_domains_new, sites_updated_perm_domains_new).filter(x => !x.includes('###')).map(x => '*://*.' + x + '/*'); + var perm_custom = document.getElementById('perm-custom'); + ext_api.permissions.contains({ + origins: perm_origins + }, function (result) { + if (result) { + perm_custom.innerText = ''; + } else { + perm_custom.textContent = ">> check host (domain) permissions for custom/updated sites"; + } + }); + + var sites_excluded = items.sites_excluded; + var sitesEl = document.getElementById('bypass_sites'); + var site_types = { + "updated": { + sites: sites_updated, + title: '* Updated (new) sites (opt-in to custom sites)', + default_sites: false + }, + "default": { + sites: defaultSites, + title: '* Default settings', + default_sites: true + }, + "custom": { + sites: sites_custom, + title: '* Custom (new) sites', + default_sites: false + } + }; + for (let site_type in site_types) { + labelEl = document.createElement('label'); + labelEl.setAttribute('style', ' font-weight: bold;'); + if (site_types[site_type].title) { + labelEl.appendChild(document.createElement('hr')); + labelEl.appendChild(document.createTextNode(site_types[site_type].title)); + if (site_type !== 'updated' && Object.keys(site_types[site_type].sites).length) + labelEl.appendChild(document.createTextNode(' - #' + Object.keys(site_types[site_type].sites).length)); + } + sitesEl.appendChild(labelEl); + let sites_arr = site_types[site_type].sites; + for (let key in sites_arr) { + let domain = sites_arr[key]['domain']; + if (!domain || (key === '###_remove_sites') || (!site_types[site_type].default_sites && (defaultSites.hasOwnProperty(key) || defaultSites_domains.includes(domain)))) + continue; + labelEl = document.createElement('label'); + let inputEl = document.createElement('input'); + inputEl.type = 'checkbox'; + inputEl.dataset.key = key; + inputEl.dataset.value = domain; + inputEl.checked = Object.keys(sites).some(title => compareKey(title, key)) && !sites_excluded.includes(domain); + if (domain !== '###') { + labelEl.appendChild(inputEl); + } else { + labelEl.appendChild(document.createElement('hr')); + labelEl.setAttribute('style', ' font-weight: bold;'); + } + labelEl.appendChild(document.createTextNode(' ' + key)); + sitesEl.appendChild(labelEl); + } + } + // excluded + labelEl.appendChild(document.createElement('hr')); + labelEl = document.createElement('label'); + labelEl.setAttribute('style', ' font-weight: bold;'); + labelEl.appendChild(document.createTextNode('* Excluded Sites (domain(s) ignored when checked in list)')); + sitesEl.appendChild(labelEl); + labelEl = document.createElement('label'); + labelEl.appendChild(document.createTextNode(sites_excluded.join())); + sitesEl.appendChild(labelEl); + save_options(); + }); +} + +function handleSearch() { + let search = document.getElementById('search').value.toLowerCase().replace('www.', ''); + let listItems = document.querySelectorAll('#bypass_sites > label'); + grouped_sites = filterObject(grouped_sites, function (val, key) { + return val.length + }); + ext_api.storage.local.get({ + sites_updated: {}, + sites_custom: {} + }, function (items) { + let sites_updated_groups = filterObject(items.sites_updated, function (val, key) { + return val.group + }, function (val, key) { + return [val.domain, val.group] + }); + for (let site in sites_updated_groups) { + let site_default = Object.keys(defaultSites).find(key => compareKey(key, site)) || site; + grouped_sites[site_default] = sites_updated_groups[site]; + } + let sites_custom_groups = filterObject(items.sites_custom, function (val, key) { + return val.group + }, function (val, key) { + return [val.domain, val.group.split(',')] + }); + for (let site in sites_custom_groups) + grouped_sites[site] = sites_custom_groups[site]; + for (let item of listItems) { + let itemText = item.textContent.toLowerCase(); + let itemInput = item.querySelector('input[data-value]'); + let itemDomain = itemInput ? itemInput.getAttribute('data-value') : ''; + let itemGroup = itemDomain ? grouped_sites[itemDomain] : ''; + if (itemText.includes(search) || !itemDomain || (itemDomain && (itemDomain.match(/^(###$|#options_[^d])/) || itemDomain.includes(search) || (itemGroup && itemGroup.includes(search))))) + item.style.display = 'block'; + else + item.style.display = 'none'; + } + }); + + let selectButtons = document.querySelectorAll('#select-all, #select-none'); + for (let elem of selectButtons) { + if (search == '') + elem.style.display = 'block'; + else + elem.style.display = 'none'; + } +} + +function selectAll() { + var inputEls = Array.from(document.querySelectorAll('input[data-key]')); + inputEls = inputEls.filter(function (input) { + return (!input.dataset.value.match(/^#options_(disable|optin)_/)); + }); + inputEls.forEach(function (inputEl) { + inputEl.checked = true; + }); + // Update status to let user know all sites are selected. + var status = document.getElementById('status'); + status.textContent = 'All sites selected.'; + setTimeout(function () { + status.textContent = ''; + }, 800); +} + +function selectNone() { + var inputEls = Array.from(document.querySelectorAll('input')); + inputEls.forEach(function(inputEl) { + inputEl.checked = false; + }); +} + +function closeButton() { + window.close(); +} + +function check_sites_updated() { + ext_api.runtime.sendMessage({request: 'check_sites_updated'}); + location.reload(); +} + +function clear_sites_updated() { + ext_api.runtime.sendMessage({request: 'clear_sites_updated'}); + location.reload(); +} + +function compareKey(firstStr, secondStr) { + return firstStr.toLowerCase().replace(/\s\(.*\)/, '') === secondStr.toLowerCase().replace(/\s\(.*\)/, ''); +} + +function filterObject(obj, filterFn, mapFn = function (val, key) { + return [key, val]; +}) { + return Object.fromEntries(Object.entries(obj). + filter(([key, val]) => filterFn(val, key)).map(([key, val]) => mapFn(val, key))); +} + +document.addEventListener('DOMContentLoaded', renderOptions); +document.getElementById('save').addEventListener('click', save_options); +document.getElementById('save_top').addEventListener('click', save_options); +document.getElementById('select-all').addEventListener('click', selectAll); +document.getElementById('select-none').addEventListener('click', selectNone); +document.getElementById('button-close').addEventListener('click', closeButton); +document.getElementById('check_sites_updated').addEventListener('click', check_sites_updated); +document.getElementById('clear_sites_updated').addEventListener('click', clear_sites_updated); +document.getElementById('search').addEventListener('input', handleSearch); diff --git a/options/options_all.css b/options/options_all.css new file mode 100644 index 0000000..428ab2e --- /dev/null +++ b/options/options_all.css @@ -0,0 +1,21 @@ +#bypass_sites label, #add_site label, #excluded_sites label { + display: block; +} +body { + font-size: 100%; +} +* { + box-sizing: border-box; +} +a { + color: black; +} +@media (prefers-color-scheme: dark) { + html { + color-scheme: dark; + } + body, button, a, input, select, textarea { + background-color: #313131; + color: #bfbfbf; + } +} diff --git a/options/options_custom.html b/options/options_custom.html new file mode 100644 index 0000000..67f3ac6 --- /dev/null +++ b/options/options_custom.html @@ -0,0 +1,70 @@ + + + + + + Bypass Paywalls Clean Options Custom + + + +

Custom Sites

+
+ To add a new site, enter an unique title/domain (without www.).
+ Select options below (see help); for examples import from online.
+ Custom sites (new) are enabled automatically in (cookies will be blocked by default unless you enable allow_cookies).
+ If you want to use custom sites (for unlisted sites) enable it in + Custom sites enabled:
+ You can also just request host permissions for the custom sites & post-release added sites (below).
+ If host permission is missing the icon badge will contain a 'C' (or '+C' if you can import the custom site from online; when no fix X). +

+
+
+
+
+ + + +
+
+

List of custom sites

+ * already in default list (double domain) +
+
+
+
+
+ + + + + + +

+ permissions granted (for all in custom list + updated): +
+
+
+

Json file

+ You can edit/sort the text area and save (only when json-text is valid). + Clear & save to reset. You can also export/import json-text for new installations. +
+
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/options/options_custom.js b/options/options_custom.js new file mode 100644 index 0000000..27590c7 --- /dev/null +++ b/options/options_custom.js @@ -0,0 +1,560 @@ +var ext_api = (typeof browser === 'object') ? browser : chrome; +var url_loc = (typeof browser === 'object') ? 'firefox' : 'chrome'; +var manifestData = ext_api.runtime.getManifest(); +var navigator_ua = navigator.userAgent; +var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile'); +var chrome_android_browser = navigator_ua_mobile && (url_loc === 'chrome') && !navigator_ua.toLowerCase().includes('yabrowser'); +var custom_switch = ((manifestData.optional_permissions && manifestData.optional_permissions.length) || (manifestData.optional_host_permissions && manifestData.optional_host_permissions.length)) && !chrome_android_browser; + +var useragent_options = ['', 'googlebot', 'bingbot', 'facebookbot']; +var referer_options = ['', 'facebook', 'google', 'twitter']; +var random_ip_options = ['', 'all', 'eu']; +var add_ext_link_type_options = ['', 'archive.is', 'google_search_tool']; + +function capitalize(str) { + return (typeof str === 'string') ? str.charAt(0).toUpperCase() + str.slice(1) : ''; +} + +function sortJson(json) { + return Object.keys(json) + .sort().reduce(function (Obj, key) { + Obj[key] = json[key]; + return Obj; + }, {}); +} + +function filterObject(obj, filterFn, mapFn = function (val, key) { + return [key, val]; +}) { + return Object.fromEntries(Object.entries(obj). + filter(([key, val]) => filterFn(val, key)).map(([key, val]) => mapFn(val, key))); +} + +// Saves options to ext_api.storage +function save_options() { + var textareaEl = document.querySelector('#bypass_sites textarea'); + var sites_custom = {}; + if (textareaEl.value) { + var sites_custom = JSON.parse(textareaEl.value); + sites_custom = filterObject(sites_custom, function (val, key) { + return !(val.add_ext_link && !val.add_ext_link_type) + }); + } + ext_api.storage.local.set({ + sites_custom: sites_custom + }, function () { + // Update status to let user know custom sites were saved. + var status = document.getElementById('status'); + status.textContent = 'Custom sites saved.'; + setTimeout(function () { + status.textContent = ''; + location.href = 'options.html'; + //window.close(); + }, 800); + }); +} + +// Sort json by key in textarea +function sort_options() { + var textareaEl = document.querySelector('#bypass_sites textarea'); + var sites_custom = {}; + if (textareaEl.value) { + var sites_custom = JSON.parse(textareaEl.value); + var sites_custom_sorted = sortJson(sites_custom); + textareaEl.value = JSON.stringify(sites_custom_sorted); + } +} + +// Export custom sites to file +function export_options() { + ext_api.storage.local.get({ + sites_custom: {} + }, function (items) { + var result = JSON.stringify(items.sites_custom); + var a = document.createElement("a"); + var file = new Blob([result], {type: "text/plain"}); + a.href = window.URL.createObjectURL(file); + let date = new Date(); + let dateStr = new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString().split("T")[0]; + a.download = 'bypass_paywalls_clean_custom_' + dateStr + '.txt'; + a.click(); + }); +} + +function import_json(result) { + ext_api.storage.local.get({ + sites_custom: {} + }, function (items) { + var sites_custom = items.sites_custom; + var sites_custom_new = JSON.parse(result); + var customSitesExt_remove = []; + if (sites_custom_new['###_remove_sites'] && sites_custom_new['###_remove_sites'].cs_code) + customSitesExt_remove = sites_custom_new['###_remove_sites'].cs_code.split(/,\s?/); + for (let site in sites_custom_new) { + let customSite_diff = Object.keys(sites_custom).find(key => sites_custom[key].domain === sites_custom_new[site].domain && key !== site); + if (customSite_diff) + delete sites_custom[customSite_diff]; + if (sites_custom_new[site].group) { + let group = sites_custom_new[site].group; + let customSites_group = Object.keys(sites_custom).filter(key => group.split(',').includes(sites_custom[key].domain)); + for (let key of customSites_group) + delete sites_custom[key]; + } + sites_custom[site] = sites_custom_new[site]; + } + sites_custom = filterObject(sites_custom, function (val, key) { + return !(customSitesExt_remove.includes(val.domain) || (val.add_ext_link && !val.add_ext_link_type)) + }); + ext_api.storage.local.set({ + sites_custom: sortJson(sites_custom) + }, function () { + // Update status to let user know custom sites were imported. + var status = document.getElementById('status'); + status.textContent = 'Custom sites imported.'; + setTimeout(function () { + //status.textContent = ''; + importInput.value = ''; + renderOptions(); + }, 800); + }); + }); +} + +// Import custom sites from local/online +function import_url_options(e, online) { + let url = '/custom/sites_custom.json'; + if (online) + url = 'https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=sites_custom.json'; + try { + fetch(url) + .then(response => { + if (response.ok) { + response.text().then(result => { + import_json(result); + }) + } + }); + } catch (err) { + console.log(err); + } +} + +// Import custom sites from file +function import_options(e) { + var files = e.target.files; + var reader = new FileReader(); + reader.onload = _imp; + reader.readAsText(files[0]); +} + +function _imp() { + var result = this.result; + import_json(result); +} + +// Add custom site to ext_api.storage +function add_options() { + var inputEls = document.querySelectorAll('#add_site input, #add_site select, #add_site textarea'); + var sites_custom = {}; + + for (let elem of inputEls) { + if (elem.dataset.key === 'title') { + var title = capitalize(elem.value); + if (!title) + break; + sites_custom[title] = {}; + } else { + if (elem.dataset.value) { + if (elem.checked) + sites_custom[title][elem.dataset.key] = parseInt(elem.dataset.value); + } else if (elem.value) { + if (['block_host_perm_add', 'group'].includes(elem.dataset.key)) + elem.value = elem.value.replace(/,{2,}/g, ',').replace(/(\s|www\.|,$)/g, ''); + sites_custom[title][elem.dataset.key] = elem.value; + } + } + } + + if (title && sites_custom[title]['domain']) { + sites_custom[title]['domain'] = sites_custom[title]['domain'].replace(/(http(s)?:\/\/|\/$)/g, '').replace(/^(www|amp(html)?|m|wap)(\d)?\./, '').toLowerCase(); + + // add new site to local storage + ext_api.storage.local.get({ + sites_custom: {} + }, function (items) { + var sites_custom_old = items.sites_custom; + + for (var key in sites_custom) { + sites_custom_old[key] = sites_custom[key]; + } + + ext_api.storage.local.set({ + sites_custom: sites_custom_old + }, function () { + // Update status to let user know new custom site was added. + var status_add = document.getElementById('status_add'); + status_add.textContent = 'Site added.'; + setTimeout(function () { + //status.textContent = ''; + renderOptions(); + }, 800); + }); + }); + } +} + +// Delete custom site from ext_api.storage +function delete_options() { + var selectEl = document.querySelector('#custom_sites select'); + var sites_custom = {}; + var remove_key = selectEl.value; + if (!remove_key) + return false; + + // delete site from local storage + ext_api.storage.local.get({ + sites_custom: {} + }, function (items) { + var sites_custom_old = items.sites_custom; + delete sites_custom_old[remove_key]; + + ext_api.storage.local.set({ + sites_custom: sites_custom_old + }, function () { + // Update status to let user know custom site was deleted. + var status_delete = document.getElementById('status_delete'); + status_delete.textContent = 'Site deleted.'; + setTimeout(function () { + //status.textContent = ''; + renderOptions(); + }, 800); + }); + }); +} + +// Delete custom (& default) sites from ext_api.storage +function delete_default_options() { + ext_api.storage.local.get({ + sites_custom: {} + }, function (items) { + sites_custom = filterObject(items.sites_custom, function (val, key) { + return !defaultSites_domains.includes(val.domain); + }); + + ext_api.storage.local.set({ + sites_custom: sites_custom + }, function () { + // Update status to let user know custom & default sites were deleted. + var status_delete = document.getElementById('status_delete'); + status_delete.textContent = 'Default sites deleted.'; + setTimeout(function () { + //status.textContent = ''; + renderOptions(); + }, 800); + }); + }); +} + +// Edit custom site (copy to add) +function edit_options() { + var selectEl = document.querySelector('#custom_sites select'); + var sites_custom = {}; + var title = selectEl.value; + if (!title) + return false; + + // copy site to add-fields + ext_api.storage.local.get({ + sites_custom: {} + }, function (items) { + sites_custom = items.sites_custom; + var edit_site = sites_custom[title]; + document.querySelector('input[data-key="title"]').value = title; + document.querySelector('input[data-key="domain"]').value = edit_site.domain; + document.querySelector('textarea[data-key="group"]').value = edit_site.group || ''; + document.querySelector('input[data-key="allow_cookies"]').checked = (edit_site.allow_cookies > 0); + document.querySelector('input[data-key="remove_cookies"]').checked = (edit_site.remove_cookies > 0); + document.querySelector('select[data-key="useragent"]').selectedIndex = useragent_options.indexOf(edit_site.useragent); + document.querySelector('textarea[data-key="useragent_custom"]').value = edit_site.useragent_custom || ''; + document.querySelector('select[data-key="referer"]').selectedIndex = referer_options.indexOf(edit_site.referer); + document.querySelector('textarea[data-key="referer_custom"]').value = edit_site.referer_custom || ''; + document.querySelector('select[data-key="random_ip"]').selectedIndex = random_ip_options.indexOf(edit_site.random_ip); + document.querySelector('input[data-key="block_js"]').checked = (edit_site.block_js > 0); + document.querySelector('input[data-key="block_js_ext"]').checked = (edit_site.block_js_ext > 0); + document.querySelector('input[data-key="block_js_inline"]').value = edit_site.block_js_inline || ''; + document.querySelector('input[data-key="block_regex"]').value = edit_site.block_regex || ''; + document.querySelector('input[data-key="block_regex_ignore_default"]').checked = (edit_site.block_regex_ignore_default > 0 || edit_site.block_regex_ignore_default > 0); + document.querySelector('input[data-key="block_host_perm_add"]').value = edit_site.block_host_perm_add || ''; + document.querySelector('input[data-key="amp_unhide"]').checked = (edit_site.amp_unhide > 0); + document.querySelector('input[data-key="amp_redirect"]').value = edit_site.amp_redirect || ''; + document.querySelector('input[data-key="ld_json"]').value = edit_site.ld_json || ''; + document.querySelector('input[data-key="ld_json_next"]').value = edit_site.ld_json_next || ''; + document.querySelector('input[data-key="ld_json_source"]').value = edit_site.ld_json_source || ''; + document.querySelector('input[data-key="ld_json_url"]').value = edit_site.ld_json_url || ''; + document.querySelector('input[data-key="ld_archive_is"]').value = edit_site.ld_archive_is || ''; + document.querySelector('input[data-key="add_ext_link"]').value = edit_site.add_ext_link || ''; + document.querySelector('select[data-key="add_ext_link_type"]').selectedIndex = add_ext_link_type_options.indexOf(edit_site.add_ext_link_type); + document.querySelector('textarea[data-key="cs_code"]').value = edit_site.cs_code || ''; + }); +} + +// request permissions for custom sites (in list only) +function request_permissions() { + var perm_custom = document.getElementById('perm-custom'); + ext_api.permissions.request({ + origins: perm_origins + }, function (granted) { + if (granted) { + perm_custom.innerText = 'YES'; + } else { + perm_custom.innerText = 'NO'; + } + }); +} + +// remove permissions for custom sites +function remove_permissions() { + var perm_custom = document.getElementById('perm-custom'); + ext_api.permissions.remove({ + origins: perm_origins + }, function (removed) { + if (removed) { + perm_custom.innerText = 'NO'; + } + }); +} + +var perm_origins; +// Restores checkbox input states using the preferences stored in ext_api.storage. +function renderOptions() { + ext_api.storage.local.get({ + sites_custom: {}, + sites_updated: {} + }, function (items) { + var sites_custom = sortJson(items.sites_custom); + var sites_custom_domains_new = Object.values(sites_custom).filter(x => x.domain && !defaultSites_domains.includes(x.domain)).map(x => x.group ? x.group.split(',').filter(x => x).map(x => x.trim()) : x.domain).flat(); + var sites_custom_perm_domains_new = Object.values(sites_custom).filter(x => x.block_host_perm_add).map(x => x.block_host_perm_add.split(',').filter(x => x).map(x => x.trim())).flat(); + var sites_updated = filterObject(items.sites_updated, function (val, key) { + return !val.nofix + }); + var sites_updated_domains_new = Object.values(sites_updated).filter(x => (x.domain && !defaultSites_domains.includes(x.domain) || x.group)).map(x => x.group ? x.group.filter(y => !defaultSites_domains.includes(y)) : x.domain).flat(); + var sites_updated_perm_domains_new = Object.values(sites_updated).filter(x => x.block_host_perm_add).map(x => x.block_host_perm_add.split(',').filter(x => x).map(x => x.trim())).flat(); + var sitesEl = document.getElementById('bypass_sites'); + sitesEl.innerHTML = ''; + var labelEl = document.createElement('label'); + var textareaEl = document.createElement('textarea'); + textareaEl.value = JSON.stringify(sites_custom); + textareaEl.rows = 12; + textareaEl.cols = 40; + labelEl.appendChild(textareaEl); + sitesEl.appendChild(labelEl); + + // add site + var add_sitesEl = document.getElementById('add_site'); + add_sitesEl.innerHTML = ''; + var inputEl; + var add_checkboxes = { + 'title': 0, + 'domain': 0, + 'group': 0, + 'allow_cookies': 1, + 'remove_cookies': 1, + 'useragent': 0, + 'useragent_custom': 0, + 'referer': 0, + 'referer_custom': 0, + 'random_ip': 0, + 'block_js (domain)': 1, + 'block_js_ext': 1, + 'block_js_inline': 0, + 'block_regex (add to default)': 0, + 'block_regex_ignore_default': 1, + 'block_host_perm_add': 0, + 'amp_unhide': 1, + 'amp_redirect': 0, + 'ld_json': 0, + 'ld_json_next': 0, + 'ld_json_source': 0, + 'ld_json_url': 0, + 'ld_archive_is': 0, + 'add_ext_link': 0, + 'add_ext_link_type': 0, + 'cs_code': 0, + }; + var add_options = { + useragent: useragent_options, + referer: referer_options, + random_ip: random_ip_options, + add_ext_link_type: add_ext_link_type_options + }; + for (var key in add_checkboxes) { + if (add_checkboxes[key]) { + inputEl = document.createElement('input'); + inputEl.type = 'checkbox'; + inputEl.dataset.value = 1; + } else { + if (add_options[key]) { + inputEl = document.createElement('select'); + for (let elem of add_options[key]) { + let option = document.createElement("option"); + option.value = elem; + option.text = elem; + inputEl.appendChild(option); + } + } else { + if (!['cs_code', 'group', 'referer_custom', 'useragent_custom'].includes(key)) { + inputEl = document.createElement('input'); + inputEl.size = 35; + } else { + inputEl = document.createElement('textarea'); + inputEl.rows = 5; + inputEl.cols = 35; + } + let placeholders = { + title: 'Example', + domain: 'example.com', + group: 'example1.com,example2.com', + block_js_inline: '\\.example\\.com\\/article\\/', + block_regex: '\\.example\\.com\\/js\\/', + block_host_perm_add: 'example1.com,example2.com', + amp_redirect: 'div.paywall|amp_url', + ld_json: 'div.paywall|div.article', + ld_json_next: 'div.paywall|div.article', + ld_json_source: 'div.paywall|div.article|filter|json_key', + ld_json_url: 'div.paywall|div.article', + ld_archive_is: 'div.paywall|div.art|div.art_src|div.art_link', + add_ext_link: 'div.paywall|div.article', + cs_code: 'for dev: check imported examples', + }; + if (placeholders[key]) + inputEl.placeholder = placeholders[key]; + } + } + labelEl = document.createElement('label'); + labelEl.style = 'margin: 2px 0px;'; + inputEl.dataset.key = key.split(' (')[0]; + labelEl.appendChild(inputEl); + labelEl.appendChild(document.createTextNode(' ' + key)); + add_sitesEl.appendChild(labelEl); + } + + // list of custom sites + var custom_sitesEl = document.getElementById('custom_sites'); + custom_sitesEl.innerHTML = ''; + labelEl = document.createElement('label'); + var selectEl = document.createElement('select'); + selectEl.id = 'sites'; + selectEl.size = 6; + var optionEl; + + for (let key in sites_custom) { + optionEl = document.createElement('option'); + let domain = sites_custom[key]['domain']; + let group = sites_custom[key]['group']; + + let isDefaultSite = defaultSites_domains.includes(domain); + optionEl.text = isDefaultSite ? '*' : ''; + optionEl.text += key; + if (!navigator_ua_mobile) { + optionEl.text += ': ' + domain + + (sites_custom[key]['allow_cookies'] > 0 ? ' | allow_cookies' : '') + + (sites_custom[key]['remove_cookies'] > 0 ? ' | remove_cookies' : '') + + (sites_custom[key]['useragent'] ? ' | useragent: ' + sites_custom[key]['useragent'] : '') + + (sites_custom[key]['useragent_custom'] ? ' | useragent_custom' : '') + + (sites_custom[key]['googlebot'] > 0 ? ' | googlebot' : '') + + (sites_custom[key]['referer'] ? ' | referer: ' + sites_custom[key]['referer'] : '') + + (sites_custom[key]['referer_custom'] ? ' | referer_custom' : '') + + (sites_custom[key]['random_ip'] ? ' | random_ip: ' + sites_custom[key]['random_ip'] : '') + + ((sites_custom[key]['block_js'] > 0) ? ' | block_js' : '') + + ((sites_custom[key]['block_js_ext'] > 0) ? ' | block_js_ext' : '') + + (sites_custom[key]['block_js_inline'] ? ' | block_js_inline' : '') + + (sites_custom[key]['block_regex'] ? ' | block_regex' : '') + + (sites_custom[key]['amp_unhide'] > 0 ? ' | amp_unhide' : '') + + (sites_custom[key]['amp_redirect'] ? ' | amp_redirect' : '') + + (sites_custom[key]['ld_json'] ? ' | ld_json' : '') + + (sites_custom[key]['ld_json_next'] ? ' | ld_json_next' : '') + + (sites_custom[key]['ld_json_source'] ? ' | ld_json_source' : '') + + (sites_custom[key]['ld_json_url'] ? ' | ld_json_url' : '') + + (sites_custom[key]['ld_archive_is'] ? ' | ld_archive_is' : '') + + (sites_custom[key]['add_ext_link'] && sites_custom[key]['add_ext_link_type'] ? ' | add_ext_link' : '') + + (sites_custom[key]['cs_code'] ? ' | cs_code' : ''); + } + optionEl.value = key; + selectEl.add(optionEl); + } + labelEl.appendChild(selectEl); + custom_sitesEl.appendChild(labelEl); + + if (sites_updated_domains_new.length > 0) { + labelEl = document.createElement('p'); + labelEl.appendChild(document.createElement('label')); + labelEl.appendChild(document.createTextNode('Updated sites: ' + sites_updated_domains_new.concat(sites_updated_perm_domains_new).join(', '))); + custom_sitesEl.appendChild(labelEl); + } + + perm_origins = sites_custom_domains_new.concat(sites_updated_domains_new, sites_custom_perm_domains_new, sites_updated_perm_domains_new).filter(x => !x.includes('###')).map(x => '*://*.' + x + '/*'); + var perm_custom = document.getElementById('perm-custom'); + ext_api.permissions.contains({ + origins: perm_origins + }, function (result) { + if (result) { + perm_custom.innerText = 'YES'; + } else { + perm_custom.innerText = 'NO'; + } + }); + }); + + var custom_enabled = document.getElementById('custom-enabled'); + ext_api.permissions.contains({ + origins: ["*://*/*"] + }, function (result) { + if (result) { + custom_enabled.innerText = 'YES'; + } else { + custom_enabled.innerText = 'NO'; + } + }); +} + +function handleSearch() { + let search = document.getElementById('search').value.toLowerCase().replace('www.', ''); + let listItems = document.querySelectorAll('select#sites > option'); + ext_api.storage.local.get({ + sites_custom: {} + }, function (items) { + let sites_custom = items.sites_custom; + let grouped_sites = filterObject(sites_custom, function (val, key) { + return val.group + }, function (val, key) { + return [val.domain, val.group.split(',')] + }); + for (let item of listItems) { + let itemDomain = sites_custom[item.value].domain; + let itemText = item.value.toLowerCase(); + let itemGroup = itemDomain ? grouped_sites[itemDomain] : ''; + if (itemText.includes(search) || (itemDomain.includes(search) || (itemGroup && itemGroup.includes(search)))) + item.style.display = 'block'; + else + item.style.display = 'none'; + } + }); +} + +document.addEventListener('DOMContentLoaded', renderOptions); +document.getElementById('save').addEventListener('click', save_options); +document.getElementById('sort').addEventListener('click', sort_options); +document.getElementById('export').addEventListener('click', export_options); +document.getElementById('import').onclick = function () {importInput.click()} +document.getElementById('importInput').addEventListener("change", import_options, false); +document.getElementById('import_local').addEventListener('click', e => import_url_options(e, false)); +document.getElementById('import_online').addEventListener('click', e => import_url_options(e, true)); +document.getElementById('add').addEventListener('click', add_options); +document.getElementById('delete').addEventListener('click', delete_options); +document.getElementById('delete_default').addEventListener('click', delete_default_options); +document.getElementById('edit').addEventListener('click', edit_options); +document.getElementById('search').addEventListener('input', handleSearch); +if (custom_switch) { + document.getElementById('perm_request').addEventListener('click', request_permissions); + document.getElementById('perm_remove').addEventListener('click', remove_permissions); +} diff --git a/options/options_excluded.html b/options/options_excluded.html new file mode 100644 index 0000000..8ad54e3 --- /dev/null +++ b/options/options_excluded.html @@ -0,0 +1,33 @@ + + + + + + Bypass Paywalls Clean Options Excluded + + + +

Excluded Sites

+
+ Add excluded sites/domains (for your subscriptions) as a comma-separated list (www.-prefix and spaces are removed).
+ You can also exclude a specific domain which is grouped in options.
+ Checked sites in options are ignored (to still enable select all).
+
+
+
+

Sites

+
+
+
+
+
+
+ + + + + + + + + diff --git a/options/options_excluded.js b/options/options_excluded.js new file mode 100644 index 0000000..c2e51c8 --- /dev/null +++ b/options/options_excluded.js @@ -0,0 +1,52 @@ +var ext_api = chrome || browser; + +// Saves options to ext_api.storage +function save_options() { + var textareaEl = document.querySelector('#excluded_sites textarea'); + var sites_excluded = []; + if (textareaEl.value !== '') + var sites_excluded = textareaEl.value.split(',').filter(x => x).map(x => x.trim().replace('www.', '')); + ext_api.storage.local.set({ + sites_excluded: sites_excluded + }, function () { + // Update status to let user know excluded sites were saved. + var status = document.getElementById('status'); + status.textContent = 'Excluded sites saved.'; + }); +} + +// Sort json by key in textarea +function sort_options() { + var textareaEl = document.querySelector('#excluded_sites textarea'); + var sites_excluded = []; + if (textareaEl.value !== '') { + var sites_excluded = textareaEl.value.split(',').map(x => x.trim().replace('www.', '')); + var sites_excluded_sorted = sites_excluded.sort(); + textareaEl.value = sites_excluded_sorted.join(); + } + // Update status to let user know excluded sites were sorted. + var status = document.getElementById('status'); + status.textContent = 'Excluded sites sorted (not saved yet)'; +} + +function renderOptions() { + ext_api.storage.local.get({ + sites_excluded: [] + }, function (items) { + var sites_excluded = items.sites_excluded; + var sitesEl = document.getElementById('excluded_sites'); + sitesEl.innerHTML = ''; + var labelEl = document.createElement('label'); + var textareaEl = document.createElement('textarea'); + textareaEl.placeholder = 'example1.com,example2.com'; + textareaEl.value = sites_excluded.join(); + textareaEl.rows = 12; + textareaEl.cols = 40; + labelEl.appendChild(textareaEl); + sitesEl.appendChild(labelEl); + }); +} + +document.addEventListener('DOMContentLoaded', renderOptions); +document.getElementById('save').addEventListener('click', save_options); +document.getElementById('sort').addEventListener('click', sort_options); \ No newline at end of file diff --git a/options/popup.html b/options/popup.html new file mode 100644 index 0000000..3cc78f8 --- /dev/null +++ b/options/popup.html @@ -0,0 +1,33 @@ + + + + + + + + + + +
Bypass Paywalls Clean   
+
Options | +Custom | +Help | +X | +Nitter
+
Changelog | + | +
+
+
* for unlisted sites: first clear cookies (X = no fix) & block general paywall-scripts (in options) or use custom sites/reader view
+
+ + + + diff --git a/options/popup.js b/options/popup.js new file mode 100644 index 0000000..efb0a4d --- /dev/null +++ b/options/popup.js @@ -0,0 +1,170 @@ +var ext_api = (typeof browser === 'object') ? browser : chrome; +var url_loc = (typeof browser === 'object') ? 'firefox' : 'chrome'; +var manifestData = ext_api.runtime.getManifest(); +var ext_manifest_version = manifestData.manifest_version; +var navigator_ua = navigator.userAgent; +var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile'); +var chrome_android_browser = navigator_ua_mobile && (url_loc === 'chrome') && !navigator_ua.toLowerCase().includes('yabrowser'); +var custom_switch = ((manifestData.optional_permissions && manifestData.optional_permissions.length) || (manifestData.optional_host_permissions && manifestData.optional_host_permissions.length)) && !chrome_android_browser; + +// htmlviewer: clean layout +ext_api.tabs.query({ + active: true, + currentWindow: true +}, function (tabs) { + if (tabs && tabs[0] && ((tabs[0].url === 'about:blank' && tabs[0].title !== 'about:blank') || tabs[0].url === 'https://codebeautify.org/htmlviewer')) { + let tabId = tabs[0].id; + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: '/options/htmlviewer.js' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: {tabId: tabId}, + files: ["/options/htmlviewer.js"] + }) + } + } +}); + +function popup_show_toggle(domain, enabled) { + if (domain) { + var site_switch_span = document.getElementById('site_switch_span'); + let labelEl = document.createElement('label'); + labelEl.setAttribute('class', 'switch'); + let inputEl = document.createElement('input'); + inputEl.setAttribute('id', 'site_switch'); + inputEl.setAttribute('type', 'checkbox'); + if (enabled) + inputEl.setAttribute('checked', true); + labelEl.appendChild(inputEl); + let spanEl = document.createElement('span'); + spanEl.setAttribute('class', 'slider round'); + spanEl.setAttribute('title', 'en/disable current site/group in BPC'); + labelEl.appendChild(spanEl); + site_switch_span.appendChild(labelEl); + document.getElementById("site_switch").addEventListener('click', function () { + ext_api.runtime.sendMessage({ + request: 'site_switch' + }); + //open(location).close(); + }); + } +}; + +ext_api.runtime.sendMessage({ + request: 'popup_show_toggle' +}); +ext_api.runtime.onMessage.addListener(function (message, sender) { + if (message.msg === 'popup_show_toggle' && message.data) { + popup_show_toggle(message.data.domain, message.data.enabled) + } +}); + +var cookie_domain; +ext_api.tabs.query({ + active: true, + currentWindow: true +}, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let hostname = new URL(tabs[0].url).hostname; + cookie_domain = getCookiePermDomain(hostname); + } +}); + +document.getElementById("clear_cookies").addEventListener('click', function () { +if (custom_switch) + ext_api.permissions.request({ + origins: ["*://*." + cookie_domain + "/*"] + }, function (granted) { + if (granted) { + ext_api.runtime.sendMessage({ + request: 'clear_cookies' + }); + } + }); +else + ext_api.permissions.contains({ + origins: ["*://*." + cookie_domain + "/*"] + }, function (result) { + if (result) { + ext_api.runtime.sendMessage({ + request: 'clear_cookies' + }); + } + }); +}); + +function showArchiveLinks() { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let url = tabs[0].url; + let hostname = urlHost(url); + let url_enc = encodeURIComponent(url); + let archive_array = { + 'Archive.today': 'https://archive.today?run=1&url=' + url_enc, + 'Clearthis.page': 'https://clearthis.page?u=' + url_enc, + 'Google Search Tool\n(see help - troubleshooting)': 'https://search.google.com/test/rich-results?url=' + url_enc + }; + let archive_id = document.querySelector('span#archive'); + if (archive_id) { + archive_id.appendChild(document.createTextNode('Open tab in:')); + for (let key in archive_array) { + let elem_div = document.createElement('div'); + let elem = document.createElement('a'); + elem.innerText = key; + if (!(matchDomain(['clearthis.page', 'google.com'], hostname) || hostname.match(/^archive\.\w{2}$/))) { + elem.href = archive_array[key]; + elem.title = elem.href; + elem.target = '_blank'; + elem_div.appendChild(elem); + archive_id.appendChild(elem_div); + } + } + } + } + }); +} +showArchiveLinks(); + +function matchDomain(domains, hostname = window.location.hostname) { + let matched_domain = false; + if (typeof domains === 'string') + domains = [domains]; + domains.some(domain => (hostname === domain || hostname.endsWith('.' + domain)) && (matched_domain = domain)); + return matched_domain; +} + +function urlHost(url) { + if (/^http/.test(url)) { + try { + return new URL(url).hostname; + } catch (e) { + console.log(`url not valid: ${url} error: ${e}`); + } + } + return url; +} + +function closeButton() { + window.close(); +} + +function getCookiePermDomain(hostname) { + let domain = hostname.replace(/^(www|amp(html)?|m|wap)(\d)?\./, ''); + let domain_split = domain.split('.'); + let num = 2; + if (domain_split.length > 2 && domain.match(/(\w){2,4}\.(\w){2}$/)) + num = 3; + domain = domain_split.slice(-num).join('.'); + return domain; +} + +document.getElementById("button-close").addEventListener('click', closeButton); diff --git a/options/popup_switch.css b/options/popup_switch.css new file mode 100644 index 0000000..fa188df --- /dev/null +++ b/options/popup_switch.css @@ -0,0 +1,58 @@ +.switch { + position: relative; + display: inline-block; + width: 30px; + height: 17px; +} + +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: blue; + -webkit-transition: .4s; + transition: .4s; +} + +.slider:before { + position: absolute; + content: ""; + height: 13px; + width: 13px; + left: 2px; + bottom: 2px; + background-color: white; + -webkit-transition: .4s; + transition: .4s; +} + +input:checked + .slider { + background-color: red; +} + +input:focus + .slider { + box-shadow: 0 0 1px #2196F3; +} + +input:checked + .slider:before { + -webkit-transform: translateX(13px); + -ms-transform: translateX(13px); + transform: translateX(13px); +} + +.slider.round { + border-radius: 9px; +} + +.slider.round:before { + border-radius: 50%; +} \ No newline at end of file diff --git a/options/toggleIcon.js b/options/toggleIcon.js new file mode 100644 index 0000000..3278337 --- /dev/null +++ b/options/toggleIcon.js @@ -0,0 +1,5 @@ +// message for dark or incognito mode (chrome) +if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches || chrome.extension.inIncognitoContext) + chrome.runtime.sendMessage({scheme: 'dark'}); +else + chrome.runtime.sendMessage({scheme: 'light'}); diff --git a/options/version.js b/options/version.js new file mode 100644 index 0000000..99e4ebd --- /dev/null +++ b/options/version.js @@ -0,0 +1,79 @@ +var ext_api = (typeof browser === 'object') ? browser : chrome; + +var manifestData = ext_api.runtime.getManifest(); +var url_loc = manifestData.key ? 'chrome' : 'firefox'; +var ext_url = 'https://gitflic.ru/project/magnolia1234/bpc_uploads'; +var ext_name = manifestData.name; +var version_str = 'v' + manifestData.version; +var version_span = document.querySelector('span#version'); +if (version_span) + version_span.innerText = version_str; +var version_span_new = document.querySelector('span#version_new'); +version_span_new.setAttribute('style', 'font-weight: bold;'); +var anchorEl; + +function show_warning() { + let warning; + if (!ext_name.includes('Clean')) { + warning = 'fake'; + } + if (warning) { + let par = document.createElement('p'); + let ext_link = document.createElement('a'); + ext_link.href = ext_url; + ext_link.innerText = "You've installed a " + warning + " version of Bypass Paywalls Clean"; + ext_link.target = '_blank'; + par.style = 'font-weight: bold;'; + par.appendChild(ext_link); + version_span_new.appendChild(par); + } +} + +function show_update(ext_version_new, check = true) { + if (ext_version_new) { + ext_api.management.getSelf(function (result) { + var installType = result.installType; + var version_len = (installType === 'development') ? 7 : 5; + if (ext_version_new.substring(0, version_len) > manifestData.version.substring(0, version_len)) { + ext_api.storage.local.set({ + ext_version_new: ext_version_new + }); + anchorEl = document.createElement('a'); + anchorEl.target = '_blank'; + if (installType === 'development') + anchorEl.href = ext_url; + else { + anchorEl.href = ext_url; + ext_version_new = ext_version_new.replace(/\d$/, '0'); + } + anchorEl.innerText = 'New release v' + ext_version_new; + version_span_new.appendChild(anchorEl); + } + }); + show_warning(); + } else if (check) { + anchorEl = document.createElement('a'); + anchorEl.text = 'Check X/Twitter for latest update'; + anchorEl.href = 'https://x.com/Magnolia1234B'; + anchorEl.target = '_blank'; + version_span_new.appendChild(anchorEl); + } +} + +function check_version_update(ext_version_new, popup) { + if (!popup) { + ext_api.runtime.sendMessage({ + request: 'check_update' + }); + show_update(ext_version_new); + } else + show_update(ext_version_new, false); +} + +ext_api.storage.local.get({optInUpdate: true, ext_version_new: false}, function (result) { + if (result.optInUpdate) { + let popup = document.querySelector('script[id="popup"]'); + check_version_update(result.ext_version_new, popup); + } else + show_warning(); +}); diff --git a/sites.js b/sites.js new file mode 100644 index 0000000..f807122 --- /dev/null +++ b/sites.js @@ -0,0 +1,3528 @@ +var defaultSites = { + "* BPC settings": { + domain: "###" + }, + "Show options on update": { + domain: "#options_on_update" + }, + "Enable new sites by default": { + domain: "#options_enable_new_sites" + }, + "Check for update rules at startup": { + domain: "#options_optin_update_rules" + }, + "* Default sites": { + domain: "###" + }, + "60 Millions de consommateurs": { + domain: "60millions-mag.com", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Aachener Zeitung (fetch from archive.is)": { + domain: "aachener-zeitung.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Abcmais.com": { + domain: "abcmais.com", + allow_cookies: 1, + block_regex: /(\.ampproject\.org\/v0\/amp-(access|subscriptions)-.+\.js)/, + cs_dompurify: 1 + }, + "Actu.fr": { + domain: "actu.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Advance Local": { + domain: "###_usa_adv_local", + group: [ + "al.com", + "cleveland.com", + "lehighvalleylive.com", + "masslive.com", + "mlive.com", + "nj.com", + "oregonlive.com", + "pennlive.com", + "silive.com", + "syracuse.com" + ], + allow_cookies: 1, + block_regex: /\.sophi\.io\//, + cs_dompurify: 1 + }, + "Adweek": { + domain: "adweek.com", + useragent: "googlebot" + }, + "Albuquerque Journal": { + domain: "abqjournal.com", + allow_cookies: 1, + block_regex: /\.abqjournal\.com\/.+\/tncms\/api\/access\..+\.js/, + cs_dompurify: 1 + }, + "Algemeen Dagblad (+ regional/ADR; fetch from archive.is)": { + domain: "###_nl_dpg_adr", + group: [ + "ad.nl", + "bd.nl", + "bndestem.nl", + "destentor.nl", + "ed.nl", + "gelderlander.nl", + "pzc.nl", + "tubantia.nl" + ], + allow_cookies: 1, + block_regex: "temptation\\.{domain}\\/temptation\\.js", + cs_dompurify: 1 + }, + "Alternatives Economiques": { + domain: "alternatives-economiques.fr", + block_regex: /\.poool\.fr\// + }, + "Ámbito": { + domain: "ambito.com", + remove_cookies_select_drop: ["TDNotesRead"] + }, + "America's Test Kitchen": { + domain: "americastestkitchen.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "American Affairs": { + domain: "americanaffairsjournal.org", + allow_cookies: 1, + block_regex: /\/americanaffairsjournal\.org\/wp-content\/mu-plugins\/app\/src\/paywall\/paywall\.js/ + }, + "American Banker (+ Arizent/opt-in to custom sites)": { + domain: "americanbanker.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "American Purpose": { + domain: "americanpurpose.com", + allow_cookies: 1, + block_regex: /\/steadyhq\.com\// + }, + "Apollo Magazine": { + domain: "apollo-magazine.com" + }, + "ARA": { + domain: "###_cat_ara", + group: [ + "ara.cat", + "arabalears.cat" + ], + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "Artforum": { + domain: "artforum.com" + }, + "Artnet": { + domain: "artnet.com", + allow_cookies: 1, + block_regex: /(\.artnet\.com\/paywall-ajax\.php|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/ + }, + "Ärzte Zeitung": { + domain: "aerztezeitung.de", + allow_cookies: 1 + }, + "Atavist Magazine": { + domain: "atavist.com" + }, + "Atlantico.fr": { + domain: "atlantico.fr", + allow_cookies: 1, + block_regex: /\.tonos\.gjirafa\.tech\/init\/access/ + }, + "Australia News Corp": { + domain: "###_au_news_corp", + group: [ + "adelaidenow.com.au", + "cairnspost.com.au", + "codesports.com.au", + "couriermail.com.au", + "dailytelegraph.com.au", + "geelongadvertiser.com.au", + "goldcoastbulletin.com.au", + "heraldsun.com.au", + "theaustralian.com.au", + "thechronicle.com.au", + "themercury.com.au", + "townsvillebulletin.com.au", + "weeklytimesnow.com.au" + ], + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-subscriptions-.+\.js/ + }, + "Australian Community Media (opt-in to custom sites for unlisted)": { + domain: "###_au_comm_media", + group: [ + "bendigoadvertiser.com.au", + "bordermail.com.au", + "canberratimes.com.au", + "centralwesterndaily.com.au", + "dailyadvertiser.com.au", + "dailyliberal.com.au", + "examiner.com.au", + "illawarramercury.com.au", + "newcastleherald.com.au", + "northerndailyleader.com.au", + "standard.net.au", + "theadvocate.com.au", + "thecourier.com.au", + "westernadvocate.com.au" + ], + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Australia Nine Entertainment": { + domain: "###_au_nine_ent", + group: [ + "afr.com", + "brisbanetimes.com.au", + "smh.com.au", + "theage.com.au", + "watoday.com.au" + ], + allow_cookies: 1, + block_regex: /(\.piano\.io\/xbuilder\/experience\/execute|\.cxense\.com\/|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/, + exception: [{ + domain: "afr.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + } + ] + }, + "Autocar.co.uk": { + domain: "autocar.co.uk", + allow_cookies: 1 + }, + "AutoHebdo.fr": { + domain: "autohebdo.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Automobilwoche": { + domain: "automobilwoche.de", + allow_cookies: 1, + block_regex: /\.automobilwoche\.de\/sites\/camw\/files\/js\/js_.+\.js/ + }, + "AutoPlus.fr": { + domain: "autoplus.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "Autosport (free articles only)": { + domain: "autosport.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Axios": { + domain: "axios.com", + allow_cookies: 1 + }, + "Balkan Insight": { + domain: "balkaninsight.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Bar and Bench": { + domain: "barandbench.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Barron's": { + domain: "barrons.com", + allow_cookies: 1, + block_regex: /\.cxense\.com\// + }, + "BBC History Extra": { + domain: "historyextra.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Belfast Telegraph": { + domain: "belfasttelegraph.co.uk", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Benzinga": { + domain: "benzinga.com" + }, + "Bergens Tidende": { + domain: "bt.no", + allow_cookies: 1, + useragent: "facebookbot" + }, + "Berliner Zeitung": { + domain: "berliner-zeitung.de", + allow_cookies: 1, + useragent: "googlebot" + }, + "Berlingske": { + domain: "berlingske.dk", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Bhaskar": { + domain: "bhaskar.com", + allow_cookies: 1 + }, + "Bild (fetch from archive.is)": { + domain: "bild.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Bloomberg": { + domain: "bloomberg.com", + allow_cookies: 1, + block_regex: /(\.cm\.bloomberg\.com\/|assets\.bwbx\.io\/s\d\/javelin\/.+\/transporter\/)/ + }, + "Bloomberg Adria": { + domain: "bloombergadria.com", + allow_cookies: 1, + block_js_inline: /\.bloombergadria\.com\/.+\/news\// + }, + "BNP Media (opt-in to custom sites)": { + domain: "###_usa_bnp_media", + allow_cookies: 1, + block_regex: /\/paywall\/evercookie_get\.js/ + }, + "Bonnier News Group (SE; opt-in to custom sites for unlisted)": { + domain: "###_se_bonnier_group", + group: [ + "dagensmedicin.se", + "dn.se", + "hd.se", + "sydsvenskan.se" + ], + allow_cookies: 1, + useragent: "googlebot", + exception: [{ + domain: "dn.se", + allow_cookies: 1, + cs_dompurify: 1 + } + ] + }, + "Börsen-Zeitung": { + domain: "boersen-zeitung.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Bridge Tower Media (opt-in to custom sites)": { + domain: "###_usa_bridge_tower", + group: [], + allow_cookies: 1, + block_regex: "\\.{domain}\\/script\\.js" + }, + "Brill": { + domain: "brill.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "Bulletin of the Atomic Scientists": { + domain: "thebulletin.org", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "BusinessAM.be": { + domain: "businessam.be", + allow_cookies: 1, + cs_dompurify: 1 + }, + "BusinessDesk.co.nz": { + domain: "businessdesk.co.nz", + allow_cookies: 1, + useragent_custom: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", + cs_dompurify: 1 + }, + "Business Insider": { + domain: "businessinsider.com", + allow_cookies: 1, + block_regex: /(\.businessinsider\.com\/chunks\/scripts\/\d.+\.js|\.sophi\.io\/)/ + }, + "Business Insider Japan": { + domain: "businessinsider.jp", + allow_cookies: 1, + block_regex: /(\.cxense\.com\/|\.piano\.io\/)/ + }, + "Business Insider Nederland": { + domain: "businessinsider.nl", + allow_cookies: 1, + block_regex: /\.piano\.io\//, + cs_dompurify: 1 + }, + "Business Post.ie": { + domain: "businesspost.ie", + allow_cookies: 1, + block_regex: /\.businesspost\.ie\/api\/tinypass\.min\.js/, + cs_dompurify: 1 + }, + "Business Standard": { + domain: "business-standard.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "California Business Journals": { + domain: "###_usa_cbj", + group: [ + "labusinessjournal.com", + "ocbj.com", + "sdbj.com", + "sfvbj.com" + ], + allow_cookies: 1, + block_regex: /\/olytics\.omeda\.com\// + }, + "Cambio Colombia": { + domain: "cambiocolombia.com", + allow_cookies: 1, + block_regex: /\.cambiocolombia\.com\/_next\/static\/chunks\/1036\..+\.js/ + }, + "Capital.bg": { + domain: "capital.bg", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Capital.fr": { + domain: "capital.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "CartaCapital": { + domain: "cartacapital.com.br", + allow_cookies: 1 + }, + "Causeur": { + domain: "causeur.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "CH Media (opt-in to custom sites for unlisted)": { + domain: "###_ch_media", + group: [ + "aargauerzeitung.ch", + "luzernerzeitung.ch", + "tagblatt.ch" + ], + allow_cookies: 1, + block_regex: /\.zephr\.com\/zephr-browser\//, + useragent: "googlebot" + }, + "Challenges": { + domain: "challenges.fr", + allow_cookies: 1, + block_regex: /(\.poool\.fr\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Charlie Hebdo": { + domain: "charliehebdo.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Chemical & Engineering News": { + domain: "cen.acs.org" + }, + "Cicero.de": { + domain: "cicero.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Citywire": { + domain: "citywire.com", + allow_cookies: 1, + useragent: "facebookbot" + }, + "CNBC (news only)": { + domain: "cnbc.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "CNHI Group (opt-in to custom sites)": { + domain: "###_usa_cnhi", + group: [], + allow_cookies: 1, + block_regex: /(\/tncms\/api\/access(\..+)?\.js|\.newsmemory\.com\/\?meter)/, + cs_dompurify: 1 + }, + "CNN": { + domain: "cnn.com", + allow_cookies: 1 + }, + "Commentary Magazine": { + domain: "commentary.org", + block_regex: /\.commentary\.org\/.+\/js\/dg-locker-public\.js/ + }, + "CommonWealth Magazine Taiwan (free articles only)": { + domain: "cw.com.tw" + }, + "Condé Nast magazines": { + domain: "###_usa_conde_nast", + group: [ + "architecturaldigest.com", + "bonappetit.com", + "cntraveler.com", + "epicurious.com", + "gq.com", + "newyorker.com", + "vanityfair.com", + "vogue.co.uk", + "vogue.com", + "wired.com" + ], + allow_cookies: 1, + block_regex: "\\.{domain}\\/journey\\/compiler\\/build-.+\\.js" + }, + "Connaissance des Arts": { + domain: "connaissancedesarts.com", + allow_cookies: 1, + block_regex: /\.connaissancedesarts\.com\/wp-content\/.+\/vendor\/iptools-jquery-inview\.min\.js/ + }, + "Correio do Povo": { + domain: "correiodopovo.com.br", + allow_cookies: 1, + block_regex: /(paywall\.correiodopovo\.com\.br|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Corriere della Sera": { + domain: "corriere.it", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.corriereobjects\.it\/.+\/js\/_paywall\.sjs|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/ + }, + "Corriere dello Sport": { + domain: "corrieredellosport.it", + allow_cookies: 1 + }, + "Cosmopolitan.fr": { + domain: "cosmopolitan.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "Courrier international (fetch from archive.is)": { + domain: "courrierinternational.com", + allow_cookies: 1, + useragent: "googlebot", + cs_dompurify: 1 + }, + "Crain Communications": { + domain: "###_usa_craincomm", + group: [ + "360dx.com", + "adage.com", + "autonews.com", + "chicagobusiness.com", + "crainscleveland.com", + "crainsdetroit.com", + "crainsgrandrapids.com", + "crainsnewyork.com", + "european-rubber-journal.com", + "genomeweb.com", + "modernhealthcare.com", + "pionline.com", + "plasticsnews.com", + "precisionmedicineonline.com", + "rubbernews.com", + "sustainableplastics.com", + "tirebusiness.com", + "utech-polyurethane.com" + ], + allow_cookies: 1, + block_regex: "(js\\.pelcro\\.com\\/|{domain}\\/profiles\\/.+\\/crain_pelcro_user\\.js)", + exception: [{ + domain: "autonews.com", + allow_cookies: 1, + useragent: "googlebot" + }, { + domain: "european-rubber-journal.com", + allow_cookies: 1 + }, { + domain: ["pionline.com", "rubbernews.com"], + allow_cookies: 1, + block_regex: /(js\.pelcro\.com\/|\.com\/sites\/.+\/js_.+\.js)/ + } + ] + }, + "Crusoe.com.br": { + domain: "crusoe.com.br", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Dagens ETC": { + domain: "etc.se", + allow_cookies: 1 + }, + "CyclingNews": { + domain: "cyclingnews.com", + allow_cookies: 1 + }, + "Dagsavisen.no": { + domain: "dagsavisen.no", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Daily Mail Group UK": { + domain: "###_uk_dmg_media", + group: [ + "dailymail.co.uk", + "mailonsunday.co.uk", + "thisismoney.co.uk" + ], + allow_cookies: 1, + block_regex: "\\.{domain}\\/zephr\\/feature" + }, + "De Tijd": { + domain: "tijd.be", + referer: "google" + }, + "Decanter (not reviews)": { + domain: "decanter.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Defector": { + domain: "defector.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Denik.cz": { + domain: "denik.cz", + allow_cookies: 1, + block_js_inline: /\.denik\.cz\/.+\.html/ + }, + "Der Freitag": { + domain: "freitag.de", + allow_cookies: 1 + }, + "Der Spiegel (fetch from archive.is)": { + domain: "spiegel.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Der Tagesspiegel (fetch from archive.is; not background/checkpoint)": { + domain: "tagesspiegel.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Deutscher Fachverlag Mediengruppe (opt-in to custom sites)": { + domain: "###_de_dfv_medien", + group: [], + allow_cookies: 1, + useragent: "googlebot", + cs_code: [{"cond":"div.Ad", "rm_elem":1}] + }, + "Diario de Navarra (text only)": { + domain: "diariodenavarra.es", + allow_cookies: 1 + }, + "Diário de Notícias (dn.pt)": { + domain: "dn.pt", + allow_cookies: 1, + block_regex: /\.dn\.pt\/.+\/evolok\/.+\/ev-em\.min\.js/ + }, + "Diario Financiero (df.cl)": { + domain: "df.cl", + allow_cookies: 1, + useragent: "googlebot" + }, + "Die Rheinpfalz": { + domain: "rheinpfalz.de", + allow_cookies: 1, + block_regex: /\.piano\.io\//, + useragent: "googlebot" + }, + "Die Welt (fetch from archive.is)": { + domain: "welt.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Die Zeit (fetch from archive.is)": { + domain: "zeit.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Digiday Media": { + domain: "###_usa_digiday", + group: [ + "digiday.com", + "glossy.co", + "modernretail.co" + ], + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "DigiTimes Asia": { + domain: "digitimes.com", + allow_cookies: 1, + block_regex: /\.piano\.io\//, + useragent: "googlebot" + }, + "Discover Magazine": { + domain: "discovermagazine.com" + }, + "DK Medier Group (opt-in to custom sites)": { + domain: "###_dk_medier", + group: [], + allow_cookies: 1, + useragent: "googlebot" + }, + "DN Media Group": { + domain: "###_no_dn_media", + group: [ + "dn.no", + "europower.no", + "fiskeribladet.no", + "hydrogeninsight.com", + "intrafish.com", + "intrafish.no", + "rechargenews.com", + "tradewindsnews.com", + "upstreamonline.com" + ], + allow_cookies: 1, + cs_dompurify: 1, + exception: [{ + domain: "tradewindsnews.com", + allow_cookies: 1, + block_regex: /subscription-static-global\.nhst\.tech\//, + } + ] + }, + "Dnevnik.bg": { + domain: "dnevnik.bg", + allow_cookies: 1, + block_regex: /\.dnevnik\.bg\/api\/auth.*\/callback\/credentials/ + }, + "Domani": { + domain: "editorialedomani.it", + allow_cookies: 1, + block_regex: /(\.editorialedomani\.it\/pelcro\.js|js\.pelcro\.com\/)/, + useragent: "googlebot" + }, + "Doorbraak.be": { + domain: "doorbraak.be", + allow_cookies: 1, + cs_dompurify: 1 + }, + "DPG Media (not ADR)": { + domain: "###_nl_dpg_media", + group: [ + "demorgen.be", + "flair.nl", + "humo.be", + "libelle.nl", + "margriet.nl", + "parool.nl", + "trouw.nl", + "volkskrant.nl" + ], + remove_cookies_select_drop: ["TID_ID"], + block_regex: "(\\.{domain}\\/temptation\\/resolve|temptation\\.{domain}\\/temptation\\.js)" + }, + "DVV Media International (opt-in to custom sites)": { + domain: "###_uk_dvv_media", + group: [], + remove_cookies_select_drop: ["AnonUserCookie"], + block_regex: /\/wp-json\/api\/v\d\/has-access/, + exception: [{ + domain: "railwaygazette.com", + allow_cookies: 1, + useragent: "googlebot" + } + ] + }, + "Dwell": { + domain: "dwell.com", + allow_cookies: 1, + block_js_inline: /\.dwell\.com\/article\/.+\?rel=plus/, + cs_dompurify: 1 + }, + "Eastwest.eu": { + domain: "eastwest.eu", + allow_cookies: 1 + }, + "El Confidencial": { + domain: "elconfidencial.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "El Cronista": { + domain: "cronista.com", + allow_cookies: 1, + block_regex: /\.cronista\.com\/files\/cachefiles\/987.+\.js/ + }, + "El Deber.com.bo": { + domain: "eldeber.com.bo", + allow_cookies: 1, + block_regex: /cdn\.lavoz\.com\.ar\/sites\/.+\/paywall\/eldeber\/pw\.js/ + }, + "El Diario.es": { + domain: "eldiario.es", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/ + }, + "El Español": { + domain: "elespanol.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-(access|subscriptions)-.+\.js)/ + }, + "El Espectador": { + domain: "elespectador.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.cxense\.com\/|js\.matheranalytics\.com\/|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/ + }, + "El Mercurio (not Inversiones/Legal; + regional/opt-in to custom sites)": { + domain: "elmercurio.com", + group: [ + "elmercurio.com" + ], + block_regex: "(\\.{domain}\\/impresa\\/.+\\/assets\\/(vendor|\\d)\\.js|pram\\.pasedigital\\.cl\\/API\\/User\\/Status\\?)", + exception: [{ + domain: "elmercurio.com", + allow_cookies: 1, + block_regex: /\.(elmercurio\.com|emol\.cl)\/(.+\/)?js\/(.+\/)?(modal|merPramV\d|PramModal\.min)\.js/, + useragent: "googlebot" + } + ] + }, + "El Observador.com.uy": { + domain: "elobservador.com.uy", + allow_cookies: 1, + block_regex: /(\.elobservador\.com\.uy\/shares|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "El País": { + domain: "elpais.com", + allow_cookies: 1, + block_js_inline: /\/verne\.elpais\.com\/.+\.html/, + block_regex: /(\/elpais\.com\/arc\/subs\/p\.min\.js|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "El País.com.uy": { + domain: "elpais.com.uy", + allow_cookies: 1, + block_regex: /(\.elpais\.com\.uy\/user\/authStatus|\.evolok\.net\/|\.cxense\.com\/)/ + }, + "El Tiempo": { + domain: "eltiempo.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "El Tribuno": { + domain: "eltribuno.com", + allow_cookies: 1, + block_regex: /\.eltribuno\.com\/scripts\/Bellhop\/dist\/bellhop\.min\.js/ + }, + "El Universal.com.mx": { + domain: "eluniversal.com.mx", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "El Universo (EC)": { + domain: "eluniverso.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "Elle.fr": { + domain: "elle.fr", + allow_cookies: 1, + block_regex: /(\.poool\.fr\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Encyclopedia Britannica": { + domain: "britannica.com" + }, + "eNotes": { + domain: "enotes.com", + remove_cookies_select_drop: ["ENOTESID"] + }, + "ESPN USA (news only; fetch from archive.is)": { + domain: "espn.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Esprit": { + domain: "esprit.presse.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Estado de Minas": { + domain: "em.com.br", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-subscriptions-.+\.js/ + }, + "EUobserver": { + domain: "euobserver.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Evening Standard (UK)": { + domain: "standard.co.uk", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Exame": { + domain: "exame.com", + allow_cookies: 1 + }, + "Expresso.pt (not Tribuna)": { + domain: "expresso.pt", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Fast Company": { + domain: "fastcompany.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.fastcompany\.com\/script\.js)/, + cs_dompurify: 1 + }, + "Field & Stream": { + domain: "fieldandstream.com", + allow_cookies: 1 + }, + "Financial News (London)": { + domain: "fnlondon.com", + allow_cookies: 1, + block_regex: /\.cxense\.com\//, + referer: "google" + }, + "Financial Times (not cn subdomain)": { + domain: "ft.com", + useragent: "googlebot", + cs_dompurify: 1 + }, + "First Things": { + domain: "firstthings.com" + }, + "Follow the Money (ftm.nl & ftm.eu)": { + domain: "###_nl_eu_ftm", + group: [ + "ftm.eu", + "ftm.nl" + ], + allow_cookies: 1, + block_regex: /\.ftm\.(nl|eu)\/js\/routing\?/ + }, + "Forbes (not newsletters)": { + domain: "forbes.com", + allow_cookies: 1, + block_regex: /(\.forbes\.com\/zephr\/feature|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Forbes Australia": { + domain: "forbes.com.au", + remove_cookies_select_drop: ["blaize_session"], + cs_dompurify: 1 + }, + "Forbes.ua (text only)": { + domain: "forbes.ua", + allow_cookies: 1 + }, + "Foreign Affairs (not reader)": { + domain: "foreignaffairs.com", + allow_cookies: 1, + block_regex: /\.foreignaffairs\.com\/modules\/custom\/fa_paywall_js\/js\/paywall\.js/ + }, + "Foreign Policy": { + domain: "foreignpolicy.com", + allow_cookies: 1, + block_regex: /(\.piano\.io\/xbuilder\/experience\/execute|\.cxense\.com\/)/, + cs_dompurify: 1 + }, + "Fortune": { + domain: "fortune.com", + allow_cookies: 1, + block_regex: /(\.piano\.io\/xbuilder\/experience\/execute|\.cxense\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Forum Communications (opt-in to custom sites)": { + domain: "###_usa_forum_comm", + group: [], + allow_cookies: 1, + block_regex: /loader-cdn\.azureedge\.net\// + }, + "Fox News (regwall)": { + domain: "foxnews.com", + allow_cookies: 1 + }, + "Frankfurter Allgemeine Zeitung": { + domain: "faz.net", + allow_cookies: 1, + useragent: "googlebot" + }, + "Funke Mediengruppe": { + domain: "###_de_funke_medien", + group: [ + "abendblatt.de", + "braunschweiger-zeitung.de", + "harzkurier.de", + "ikz-online.de", + "morgenpost.de", + "nrz.de", + "otz.de", + "thueringer-allgemeine.de", + "tlz.de", + "waz.de", + "wp.de", + "wr.de" + ], + allow_cookies: 1, + block_regex: /\.piano\.io\//, + cs_dompurify: 1 + }, + "Gannett Group (local USA Today; opt-in to custom sites for unlisted)": { + domain: "###_usa_gannett", + group: [ + "azcentral.com", + "cincinnati.com", + "commercialappeal.com", + "courier-journal.com", + "democratandchronicle.com", + "desmoinesregister.com", + "detroitnews.com", + "dispatch.com", + "freep.com", + "indystar.com", + "jacksonville.com", + "jsonline.com", + "knoxnews.com", + "news-press.com", + "northjersey.com", + "oklahoman.com", + "statesman.com", + "tennessean.com" + ], + allow_cookies: 1, + amp_unhide: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "GaúchaZH": { + domain: "gauchazh.clicrbs.com.br", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Gazeta do Povo": { + domain: "gazetadopovo.com.br", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.cxense\.com\/|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/ + }, + "GB News": { + domain: "gbnews.com", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Glassdoor (regwall)": { + domain: "glassdoor.com" + }, + "Globes": { + domain: "globes.co.il", + block_regex: /\.tinypass\.com\// + }, + "Granta Magazine": { + domain: "granta.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "GremiMedia.pl Group": { + domain: "###_pl_gremi_media", + group: [ + "parkiet.com", + "rp.pl" + ] + }, + "Groene Amsterdammer": { + domain: "groene.nl", + remove_cookies_select_hold: ["accept-cookies", "popunder-hidden"], + useragent: "googlebot" + }, + "Groupe Capitales Médias (+ regional/opt-in to custom sites)": { + domain: "###_ca_gcm", + group: [ + "lesoleil.com" + ], + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Groupe Centre France (opt-in to custom sites for unlisted)": { + domain: "###_fr_gcf", + group: [ + "lamontagne.fr" + ], + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Groupe ESH Médias": { + domain: "###_ch_esh_medias", + group: [ + "arcinfo.ch", + "lacote.ch", + "lenouvelliste.ch" + ], + allow_cookies: 1, + cs_dompurify: 1 + }, + "Groupe Infopro Digital (opt-in to custom sites for unlisted)": { + domain: "###_fr_groupe_infopro", + group: [ + "usinenouvelle.com" + ], + allow_cookies: 1, + block_regex: /\.poool\.fr\//, + exception: [{ + domain: ["argusdelassurance.com", "cahiers-techniques-batiment.fr"], + allow_cookies: 1, + useragent: "googlebot" + } + ] + }, + "Groupe IPM": { + domain: "###_be_groupe_ipm", + group: [ + "dhnet.be", + "lalibre.be", + "lavenir.net" + ], + allow_cookies: 1, + block_regex: /(\.piano\.io\/xbuilder\/experience\/execute|\.cxense\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Groupe La Dépêche": { + domain: "###_fr_groupe_la_depeche", + group: [ + "centrepresseaveyron.fr", + "journaldemillau.fr", + "ladepeche.fr", + "lindependant.fr", + "midilibre.fr", + "nrpyrenees.fr", + "petitbleu.fr", + "rugbyrama.fr" + ], + allow_cookies: 1 + }, + "Groupe Nice-Matin": { + domain: "###_fr_groupe_nice_matin", + group: [ + "monacomatin.mc", + "nicematin.com", + "varmatin.com" + ], + allow_cookies: 1, + block_regex: /(\.qiota\.com\/|\.nicematin\.com\/build\/js\/viewpay\..+\.js)/ + }, + "Groupe Profession Santé": { + domain: "###_fr_groupe_prof_sante", + group: [ + "lequotidiendumedecin.fr", + "lequotidiendupharmacien.fr" + ], + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Groupe Québecor": { + domain: "###_ca_groupe_quebecor", + group: [ + "journaldemontreal.com", + "journaldequebec.com" + ], + allow_cookies: 1 + }, + "Groupe Sud Ouest": { + domain: "###_fr_groupe_sud_ouest", + group: [ + "sudouest.fr", + "charentelibre.fr", + "larepubliquedespyrenees.fr" + ], + allow_cookies: 1 + }, + "Groupe SynerJ Media (opt-in to custom sites)": { + domain: "###_fr_synerj", + group: [], + allow_cookies: 1, + ld_json_url: "div#encart_abo|div.article_bloc_texte", + useragent: "googlebot" + }, + "Grupo Abril": { + domain: "abril.com.br", + allow_cookies: 1, + block_regex: /\.abril\.com\.br\/.+\/abril-paywall\// + }, + "Grupo Clarín": { + domain: "###_ar_grupo_clarin", + group: [ + "clarin.com", + "lavoz.com.ar", + "losandes.com.ar", + "ole.com.ar" + ], + allow_cookies: 1, + block_regex: /zonda\.clarin\.com\//, + exception: [{ + domain: "losandes.com.ar", + allow_cookies: 1, + block_regex: /cdn\.lavoz\.com\.ar\/sites\/.+\/paywall\/losandes\/pw\.js/ + } + ] + }, + "Grupo El Comercio": { + domain: "###_pe_grupo_elcomercio", + group: [ + "diariocorreo.pe", + "elcomercio.pe", + "gestion.pe" + ], + allow_cookies: 1, + block_regex: "(\\.tinypass\\.com\\/|\\/{domain}\\/pf\\/dist\\/engine\\/react\\.js)" + }, + "Grupo Prensa Ibérica (opt-in to custom sites for unlisted)": { + domain: "###_es_epiberica", + group: [ + "diariodemallorca.es", + "eldia.es", + "elperiodico.com", + "epe.es", + "farodevigo.es", + "informacion.es", + "laprovincia.es", + "levante-emv.com", + "lne.es", + "mallorcazeitung.es", + "superdeporte.es" + ], + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Grupo Unidad Editorial": { + domain: "###_es_unidad", + group: [ + "elmundo.es", + "expansion.com", + "marca.com" + ], + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-(access|subscriptions)-.+\.js)/ + }, + "Grupo Vocento": { + domain: "###_es_grupo_vocento", + group: [ + "abc.es", + "canarias7.es", + "diariosur.es", + "diariovasco.com", + "elcomercio.es", + "elcorreo.com", + "eldiariomontanes.es", + "elnortedecastilla.es", + "hoy.es", + "ideal.es", + "larioja.com", + "lasprovincias.es", + "laverdad.es", + "lavozdigital.es" + ], + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "Gruppo GEDI.it": { + domain: "###_it_gedi", + group: [ + "huffingtonpost.it", + "italian.tech", + "lastampa.it", + "lescienze.it", + "moda.it", + "repubblica.it" + ], + remove_cookies_select_drop: ["blaize_session"], + block_regex: /scripts\.repubblica\.it\/pw\/pw\.js/, + useragent: "googlebot", + exception: [{ + domain: ["huffingtonpost.it", "lastampa.it"], + block_js_inline: /\.it\/.+\/news\//, + remove_cookies_select_drop: ["blaize_session"] + }, { + domain: "repubblica.it", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-subscriptions-.+\.js/ + } + ] + }, + "Gruppo SAE.it (free articles only; opt-in to custom sites for unlisted)": { + domain: "###_it_gruppo_sae", + group: [ + "iltirreno.it", + "lanuovasardegna.it" + ] + }, + "Haaretz Group (no menu/footer)": { + domain: "###_il_haaretz_group", + group: [ + "haaretz.co.il", + "haaretz.com", + "themarker.com" + ], + remove_cookies_select_drop: ["ra"], + headers_custom: {ismobileapp: "true", platform: "app", renderingkind: "opened"}, + useragent_custom: "Mozilla/5.0 (Linux; Android 9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.6668.70 Safari/537.36 haaretz/5.0.49" + }, + "Haas Mediengruppe (opt-in to custom sites for unlisted)": { + domain: "###_de_haas_medien", + group: [ + "mannheimer-morgen.de" + ], + allow_cookies: 1, + block_regex: "\.{domain}\\/api\\/tinypass\\.min\\.js", + useragent: "googlebot" + }, + "Hamburger Morgenpost": { + domain: "mopo.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Handelsblatt": { + domain: "handelsblatt.com", + allow_cookies: 1, + block_regex: /\.piano\.io\//, + useragent: "googlebot" + }, + "Harper's Magazine": { + domain: "harpers.org", + block_regex: /\/harpers\.org\/wp-content\/themes\/timber\/static\/js\/modal.+\.js/ + }, + "Harvard Business Review (do not block TinyPass-script externally)": { + domain: "hbr.org", + block_regex: /(\.cxense\.com\/|cdn\.tinypass\.com\/)/, + remove_cookies_select_drop: ["xbc"] + }, + "Haymarket Media Group (opt-in to custom sites)": { + domain: "###_uk_haymarket", + group: [], + useragent: "googlebot" + }, + "Haymarket Medical Network (opt-in to custom sites)": { + domain: "###_uk_haymarket_medical", + group: [], + allow_cookies: 1, + remove_cookies: 1, + cs_code: [{"cond":"div#modal-register-popup, div.gating-banner", "rm_elem":1}, {"cond":"div[data-gated]", "rm_attrib":"data-gated"}] + }, + "Hearst Communications (newspapers; opt-in to custom sites for unlisted)": { + domain: "###_usa_hearst_comm", + group: [ + "ctpost.com", + "expressnews.com", + "houstonchronicle.com", + "nhregister.com", + "sfchronicle.com", + "timesunion.com" + ], + allow_cookies: 1, + block_regex: "(\\.{domain}\\/script\\.js|\\.ensighten\\.com\\/|js\\.matheranalytics\\.com\\/)" + }, + "Hearst Communications magazines": { + domain: "###_usa_hearst_comm_mag", + group: [ + "bicycling.com", + "cosmopolitan.com", + "countryliving.com", + "delish.com", + "elle.com", + "elledecor.com", + "esquire.com", + "goodhousekeeping.com", + "harpersbazaar.com", + "housebeautiful.com", + "menshealth.com", + "oprahdaily.com", + "popularmechanics.com", + "prevention.com", + "roadandtrack.com", + "runnersworld.com", + "townandcountrymag.com", + "womenshealthmag.com" + ], + allow_cookies: 1, + block_regex: /(\.com\/_assets\/jam\/|\.ensighten\.com\/.+\/Bootstrap\.js)/ + }, + "Heise online (fetch from archive.is)": { + domain: "heise.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Het Laatste Nieuws (fetch from archive.is)": { + domain: "hln.be", + allow_cookies: 1, + block_regex: /temptation\.hln\.be\/temptation\.js/, + cs_dompurify: 1 + }, + "Hindustan Times (not epaper)": { + domain: "hindustantimes.com", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/ + }, + "History Today (app only)": { + domain: "historytoday.com", + allow_cookies: 1, + block_regex: /app\.historytoday\.com\/pugpig-websmartbanner\.js/, + cs_all_frames: 1 + }, + "Honolulu Star-Advertiser": { + domain: "staradvertiser.com", + allow_cookies: 1, + block_regex: /js\.matheranalytics\.com\// + }, + "Il Fatto Quotidiano": { + domain: "ilfattoquotidiano.it", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-subscriptions-.+\.js/ + }, + "Il Foglio": { + domain: "ilfoglio.it", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-subscriptions-.+\.js/ + }, + "Il Manifesto": { + domain: "ilmanifesto.it", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Il Messaggero (+ regional)": { + domain: "###_it_ilmessaggero", + group: [ + "corriereadriatico.it", + "ilgazzettino.it", + "ilmattino.it", + "ilmessaggero.it", + "quotidianodipuglia.it" + ], + allow_cookies: 1, + block_regex: /(\.(cedscdn|cedsdigital)\.it\/.+\/(PaywallMeter|cmpConsentWall)\.js|\.ampproject\.org\/v0\/amp-(access|subscriptions)-.+\.m?js)/ + }, + "Il Sole 24 Ore (24+ only)": { + domain: "ilsole24ore.com", + allow_cookies: 1, + block_regex: /\.ilsole24ore\.com\/zephr\/feature/ + }, + "Inc.com": { + domain: "inc.com", + block_regex: /\.tinypass\.com\// + }, + "Inc42": { + domain: "inc42.com", + allow_cookies: 1, + block_regex: /(\/inc42\.com\/wp-admin\/admin-ajax\.php$|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "India Today": { + domain: "indiatoday.in", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/ + }, + "Industry Dive (opt-in to custom sites)": { + domain: "###_usa_industrydive", + group: [], + allow_cookies: 1, + block_regex: "\\.{domain}\\/static\\/js\\/dist\\/contentGate\\.bundle\\.js" + }, + "iNews (UK)": { + domain: "inews.co.uk", + allow_cookies: 1, + block_js_inline: /liveapp\.inews\.co\.uk\/.+\/content\.html/, + block_regex: /\.tinypass\.com\// + }, + "Initium Media": { + domain: "theinitium.com", + allow_cookies: 1, + block_regex: /\.wallkit\.net\/js\// + }, + "Inkl": { + domain: "inkl.com" + }, + "Inside Higher Ed": { + domain: "insidehighered.com", + allow_cookies: 1, + block_regex: /js\.pelcro\.com\// + }, + "Inside Retail (opt-in to custom sites)": { + domain: "###_au_inside_retail", + group: [], + ld_json_url: "div#premium-box|div.article__text__holder|1" + }, + "InvestSmart": { + domain: "###_au_investsmart", + group: [ + "intelligentinvestor.com.au", + "investsmart.com.au" + ], + allow_cookies: 1, + useragent: "googlebot" + }, + "Interesting Engineering": { + domain: "interestingengineering.com", + allow_cookies: 1 + }, + "Internazionale.it": { + domain: "internazionale.it", + allow_cookies: 1, + block_regex: /\.internazionale\.it\/templates_js_ajax\.inc\.php/ + }, + "Investors' Chronicle (UK)": { + domain: "investorschronicle.co.uk", + allow_cookies: 1, + referer: "google" + }, + "iPolitics.ca": { + domain: "ipolitics.ca", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Ippen.media (opt-in to custom sites for unlisted)": { + domain: "###_de_ippen_media", + group: [ + "fr.de", + "merkur.de", + "ovb-online.de" + ], + allow_cookies: 1, + block_regex: "\\.{domain}\\/sub\\/js\\/pc-offer-west\\.js" + }, + "Irish Independent": { + domain: "independent.ie", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Italia Oggi": { + domain: "italiaoggi.it", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Jacobin.de": { + domain: "jacobin.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Jazzwise": { + domain: "jazzwise.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "Jeune Afrique (last month only)": { + domain: "jeuneafrique.com", + allow_cookies: 1, + block_regex: /\.poool\.fr\//, + cs_dompurify: 1 + }, + "Kathimerini.gr": { + domain: "kathimerini.gr", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Kölner Stadt-Anzeiger": { + domain: "ksta.de", + remove_cookies_select_drop: ["anon_cookie"] + }, + "Kölnische Rundschau": { + domain: "rundschau-online.de", + remove_cookies_select_drop: ["anon_cookie"] + }, + "Kompas.id": { + domain: "kompas.id", + allow_cookies: 1 + }, + "Krautreporter.de": { + domain: "krautreporter.de" + }, + "Kurier.at": { + domain: "kurier.at", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "L'Écho": { + domain: "lecho.be", + referer: "google" + }, + "L'Équipe.fr (not Les notes)": { + domain: "lequipe.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "L'Express": { + domain: "lexpress.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\/data/ + }, + "L'Informé": { + domain: "linforme.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "L'Oeil de la Photographie": { + domain: "loeildelaphotographie.com", + allow_cookies: 1, + block_regex: /cdn\.loeildelaphotographie\.com\/wp-content\/.+\/hague-child\/js\/script-.+\.js/ + }, + "L'Opinion (fetch from archive.is; not Le Journal)": { + domain: "lopinion.fr", + allow_cookies: 1, + block_regex: /\.piano\.io\//, + cs_dompurify: 1 + }, + "La Croix": { + domain: "la-croix.com", + allow_cookies: 1, + block_regex: /(\.la-croix\.com\/build\/.+\/paywall.+\.js|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "La Diaria.com.uy": { + domain: "ladiaria.com.uy", + allow_cookies: 1, + useragent: "googlebot" + }, + "La Gaceta.com.ar (no menu)": { + domain: "lagaceta.com.ar", + allow_cookies: 1, + block_regex: /\.lagaceta\.com\.ar\/ajax\/getInfo/, + useragent: "facebookbot" + }, + "La Gazzetta dello Sport (text only)": { + domain: "gazzetta.it", + allow_cookies: 1 + }, + "La Nación (free articles only)": { + domain: "lanacion.com.ar" + }, + "La Nouvelle République du Centre-Ouest": { + domain: "lanouvellerepublique.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "La Tercera": { + domain: "latercera.com", + allow_cookies: 1 + }, + "La Vanguardia": { + domain: "lavanguardia.com", + allow_cookies: 1, + block_regex: /\/ev\.lavanguardia\.com\// + }, + "Landwirtschaftsverlag": { + domain: "###_de_lv", + group: [ + "profi.de", + "topagrar.com", + "wochenblatt.com" + ], + allow_cookies: 1, + exception: [{ + domain: "topagrar.com", + allow_cookies: 1, + block_js_inline: /\.topagrar\.com\/.+\/news\// + } + ] + }, + "Las Vegas Review-Journal": { + domain: "reviewjournal.com", + allow_cookies: 1, + block_regex: /\.reviewjournal\.com\/wp-content\/plugins\/.+\/loader_prod\.min\.js/ + }, + "Le Courrier des Stratèges": { + domain: "lecourrierdesstrateges.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Le Devoir": { + domain: "ledevoir.com", + block_regex: /\.tinypass\.com\//, + remove_cookies_select_drop: ["pw6"] + }, + "Le Figaro (no video)": { + domain: "lefigaro.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Le Grand Continent": { + domain: "legrandcontinent.eu", + allow_cookies: 1 + }, + "Le Journal du Dimanche": { + domain: "lejdd.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Le Journal du Net": { + domain: "journaldunet.com", + allow_cookies: 1 + }, + "Le Monde.fr": { + domain: "lemonde.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Le Monde Diplomatique Brasil": { + domain: "diplomatique.org.br", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Le Nouvel Economiste": { + domain: "lenouveleconomiste.fr", + allow_cookies: 1, + useragent: "googlebot" + }, + "Le Parisien": { + domain: "leparisien.fr", + allow_cookies: 1, + useragent: "googlebot" + }, + "Le Point": { + domain: "lepoint.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\//, + cs_dompurify: 1 + }, + "Le Revenu": { + domain: "lerevenu.com", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "Le Télégramme": { + domain: "letelegramme.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Le1Hebdo.fr": { + domain: "le1hebdo.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "Lee Enterprises Group (opt-in to custom sites for unlisted)": { + domain: "###_usa_lee_ent", + group: [ + "buffalonews.com", + "journalnow.com", + "journalstar.com", + "madison.com", + "nwitimes.com", + "omaha.com", + "richmond.com", + "stltoday.com", + "tucson.com", + "tulsaworld.com" + ], + allow_cookies: 1, + block_regex: /\.com\/.+\/tncms\/api\/access\..+\.js/ + }, + "Les Échos": { + domain: "lesechos.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Les Inrockuptibles": { + domain: "lesinrocks.com", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "Libération.fr": { + domain: "liberation.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Linda.nl": { + domain: "linda.nl", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Literary Review (UK)": { + domain: "literaryreview.co.uk", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Live Law": { + domain: "livelaw.in", + allow_cookies: 1 + }, + "LiveMint (not epaper)": { + domain: "livemint.com", + allow_cookies: 1, + block_regex: /(\.livemint\.com\/lm-img\/subscription\/|\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Loeb Classical Library": { + domain: "loebclassics.com" + }, + "London Review of Books": { + domain: "lrb.co.uk", + allow_cookies: 1, + block_js_inline: /\.lrb\.co\.uk\// + }, + "Los Angeles Times": { + domain: "latimes.com", + allow_cookies: 1, + block_regex: /\.latimes\.com\/meteringjs/ + }, + "MacroBusiness.com.au": { + domain: "macrobusiness.com.au", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Madsack Mediengruppe (opt-in to custom sites for unlisted)": { + domain: "###_de_madsack", + group: [ + "haz.de", + "kn-online.de", + "ln-online.de", + "lvz.de", + "maz-online.de", + "neuepresse.de", + "ostsee-zeitung.de", + "rnd.de", + "saechsische.de" + ], + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Maine Trust for Local News (opt-in to custom sites)": { + domain: "###_usa_maine_trust", + group: [], + allow_cookies: 1, + block_regex: "\\.{domain}\\/script\\.js" + }, + "Mainichi Shimbun": { + domain: "mainichi.jp", + allow_cookies: 1, + useragent: "googlebot" + }, + "Malayala Manorama": { + domain: "manoramaonline.com", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/, + }, + "Manager-magazin.de (fetch from archive.is)": { + domain: "manager-magazin.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Marianne.net (last month only)": { + domain: "marianne.net", + allow_cookies: 1, + block_regex: /\.poool\.fr\//, + cs_dompurify: 1 + }, + "MarketWatch": { + domain: "marketwatch.com", + block_regex: /\.cxense\.com\// + }, + "McClatchy Group (opt-in to custom sites for unlisted)": { + domain: "###_usa_mcc", + allow_cookies: 1, + group: [ + "bnd.com", + "charlotteobserver.com", + "elnuevoherald.com", + "fresnobee.com", + "kansas.com", + "kansascity.com", + "kentucky.com", + "mcclatchydc.com", + "miamiherald.com", + "newsobserver.com", + "sacbee.com", + "star-telegram.com", + "thestate.com", + "tri-cityherald.com" + ], + block_regex: /(\.amplitude\.com\/|\.mcclatchy\.com\/mcc-paywall\.js|\.ampproject\.org\/v0\/amp-(access|subscriptions)-.+\.js)/ + }, + "McPherson Media Group (opt-in to custom sites)": { + domain: "###_au_mmg", + allow_cookies: 1 + }, + "Media Group Westfalen (opt-in to custom sites for unlisted)": { + domain: "###_de_mgw", + group: [ + "ruhrnachrichten.de" + ], + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "Mediahuis België (fetch from archive.is)": { + domain: "###_be_mediahuis", + group: [ + "gva.be", + "hbvl.be", + "nieuwsblad.be", + "standaard.be" + ], + allow_cookies: 1, + block_regex: "\\.{domain}\\/extra\\/assets\\/resources\\/js\\/zephrIntegration\\.js", + cs_dompurify: 1 + }, + "Mediahuis Noord (+ regional/opt-in to custom sites)": { + domain: "###_nl_mediahuis_noord", + group: [ + "dvhn.nl", + "lc.nl" + ], + allow_cookies: 1, + block_regex: /(\.ndcmediagroep\.nl\/js\/evolok\/|\.nl\/_\/zh\/worker)/, + cs_dompurify: 1 + }, + "MediaNews Group (opt-in to custom sites for unlisted)": { + domain: "###_usa_mng", + group: [ + "bostonherald.com", + "denverpost.com", + "eastbaytimes.com", + "mercurynews.com", + "ocregister.com", + "pressenterprise.com", + "sandiegouniontribune.com", + "twincities.com" + ], + allow_cookies: 1, + block_regex: /(\.com\/(script|.+\/loader\.min)\.js|\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/, + cs_dompurify: 1 + }, + "Medium (opt-in to custom sites for custom domains)": { + domain: "medium.com", + allow_cookies: 1, + group: [ + "medium.com", + "betterprogramming.pub", + "towardsdatascience.com" + ] + }, + "Medscape (regwall)": { + domain: "medscape.com", + allow_cookies: 1, + block_regex: /(\.medscapestatic\.com\/.+\/medscape-library|\.wbmdstatic\.com\/.+\/chunk-vendors\..+)\.js/ + }, + "Mexico News Daily": { + domain: "mexiconewsdaily.com", + allow_cookies: 1, + block_regex: /\/mexiconewsdaily\.com\/wp-content\/plugins\/leaky-paywall\/js\/leaky-paywall-cookie\.js/ + }, + "Mid-Day (not epaper)": { + domain: "mid-day.com", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/ + }, + "MilanoFinanza.it": { + domain: "milanofinanza.it", + allow_cookies: 1 + }, + "MIT Sloan Management Review": { + domain: "sloanreview.mit.edu", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\/sloanreview\.mit\.edu\/.+\/welcome-ad\.js)/ + }, + "MIT Technology Review": { + domain: "technologyreview.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.mjs)/ + }, + "Monocle": { + domain: "monocle.com", + useragent: "googlebot" + }, + "Motor Presse Stuttgart": { + domain: "###_de_motor_presse", + group: [ + "aerokurier.de", + "auto-motor-und-sport.de", + "flugrevue.de", + "motorradonline.de", + "womenshealth.de" + ], + allow_cookies: 1, + block_regex: "\\.{domain}\\/thenewsbar\\/config\\/" + }, + "Motor Sport Magazine (UK)": { + domain: "motorsportmagazine.com", + allow_cookies: 1, + block_regex: /\.motorsportmagazine\.com\/wp-admin\/admin-ajax\.php/, + cs_dompurify: 1 + }, + "Mountain View Voice": { + domain: "mv-voice.com" + }, + "Mundo Deportivo": { + domain: "mundodeportivo.com", + allow_cookies: 1, + block_regex: /\/ev\.mundodeportivo\.com\// + }, + "Nation Media Group (Kenya; opt-in to custom sites for unlisted)": { + domain: "###_ke_nation_media", + group: [ + "businessdailyafrica.com", + "nation.africa" + ], + allow_cookies: 1, + cs_dompurify: 1 + }, + "National Geographic USA": { + domain: "nationalgeographic.com", + allow_cookies: 1, + block_regex: /cdn\.registerdisney\.go\.com\//, + random_ip: "eu" + }, + "National Review": { + domain: "nationalreview.com", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/, + cs_dompurify: 1 + }, + "National World Publishing (UK; opt-in to custom sites for unlisted)": { + domain: "###_uk_nat_world", + group: [ + "scotsman.com", + "yorkshirepost.co.uk" + ], + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Nautilus": { + domain: "nautil.us", + remove_cookies_select_drop: ["arc", "sfa"] + }, + "NDTV Profit": { + domain: "ndtvprofit.com", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-subscriptions-.+\.js/ + }, + "Neue Westfälische": { + domain: "nw.de", + allow_cookies: 1 + }, + "Neue Zürcher Zeitung (not epaper)": { + domain: "nzz.ch", + allow_cookies: 1, + block_regex: /(\.piano\.io\/|ens\.nzz\.ch\/.+\/Bootstrap\.js)/ + }, + "New Scientist": { + domain: "newscientist.com", + allow_cookies: 1, + block_regex: /(\.piano\.io\/|appan\.newscientist\.com\/pugpig-websmartbanner\.js)/, + cs_all_frames: 1, + cs_dompurify: 1 + }, + "New Voice (nv.ua)": { + domain: "nv.ua", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/ + }, + "New York Magazine (+ Curbed, Grub Street, The Cut & Vulture)": { + domain: "###_usa_nymag", + group: [ + "curbed.com", + "grubstreet.com", + "nymag.com", + "thecut.com", + "vulture.com" + ], + allow_cookies: 1, + block_regex: /\.zeddit\.com\/.+\/SiteScript\.js/ + }, + "New Zealand Herald": { + domain: "nzherald.co.nz", + allow_cookies: 1, + block_regex: /\.nzherald\.co\.nz\/sales\/public\/v\d\/entitlements/ + }, + "Newsday": { + domain: "newsday.com", + allow_cookies: 1, + block_regex: /loader\.newsday\.com\// + }, + "Newslaundry": { + domain: "newslaundry.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Newsquest Media Group (UK; opt-in to custom sites)": { + domain: "###_uk_newsquest", + group: [], + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Newsweek": { + domain: "newsweek.com", + block_regex: /(js\.pelcro\.com\/|\.ampproject\.org\/v0\/amp-(access|subscriptions)-.+\.js)/ + }, + "Nikkei Asian Review": { + domain: "asia.nikkei.com", + allow_cookies: 1, + block_regex: /\.piano\.io\//, + cs_dompurify: 1 + }, + "Nordwest Zeitung": { + domain: "nwzonline.de", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "NOZ/MHN Mediengruppe (fetch from archive.is)": { + domain: "###_de_noz_mhn", + group: [ + "noz.de", + "shz.de" + ], + allow_cookies: 1, + cs_dompurify: 1 + }, + "NRC Handelsblad": { + domain: "nrc.nl", + remove_cookies_select_drop: ["counter"], + block_regex: /\.nrc\.nl\/paywall-api\/api\/zephr/ + }, + "NSC Total": { + domain: "nsctotal.com.br", + allow_cookies: 1, + block_regex: /\.nsctotal\.com\.br\/wp-content\/themes\/nsctotal\/js\/paywall\.js/ + }, + "NWT Media.se (opt-in to custom sites)": { + domain: "###_se_nwt_media", + group: [], + allow_cookies: 1, + useragent: "googlebot" + }, + "NyTeknik": { + domain: "nyteknik.se", + allow_cookies: 1, + useragent: "googlebot" + }, + "O Estado de S. Paulo": { + domain: "estadao.com.br", + allow_cookies: 1, + block_regex: /(\.estadao\.com\.br\/(paywall\/|access\.js)|\.ampproject\.org\/v0\/amp-(access|subscriptions)-.+\.js)/ + }, + "O Globo (& Valor Econômico)": { + domain: "globo.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/ + }, + "Observador.pt": { + domain: "observador.pt", + allow_cookies: 1, + block_js_inline: /\/observador\.pt\/(\d{4}|especiais|opiniao)\// + }, + "Outdoor Life": { + domain: "outdoorlife.com", + allow_cookies: 1, + block_regex: /js\.pelcro\.com\// + }, + "Outlook Business": { + domain: "outlookbusiness.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Outlook India": { + domain: "outlookindia.com", + allow_cookies: 1 + }, + "Outside magazines": { + domain: "###_usa_outside_mag", + group: [ + "backpacker.com", + "betamtb.com", + "betternutrition.com", + "cleaneatingmag.com", + "climbing.com", + "outsideonline.com", + "oxygenmag.com", + "skimag.com", + "trailrunnermag.com", + "triathlete.com", + "vegetariantimes.com", + "womensrunning.com", + "yogajournal.com" + ], + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Oxford University Press (not oup.com; opt-in to custom sites)": { + domain: "###_uk_oup", + group: [], + allow_cookies: 1 + }, + "Palo Alto Online": { + domain: "paloaltoonline.com" + }, + "Paris Match": { + domain: "parismatch.com", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Paste Magazine": { + domain: "pastemagazine.com", + allow_cookies: 1, + block_regex: /\.pastemagazine\.com\/wp-content\/cache\/autoptimize\/js\/autoptimize_.+\.js/ + }, + "PEI Media (opt-in to custom sites)": { + domain: "###_usa_pei", + group: [], + allow_cookies: 1, + useragent: "googlebot" + }, + "Penske Media Corporation": { + domain: "###_usa_penske_media", + allow_cookies: 1, + group: [ + "billboard.com", + "rollingstone.com", + "sourcingjournal.com", + "sportico.com", + "variety.com", + "wwd.com" + ], + block_regex: /\.tinypass\.com\// + }, + "PhiloMag.com": { + domain: "philomag.com", + remove_cookies_select_drop: ["number_view_paywall"], + block_regex: /\.qiota\.com\//, + useragent: "googlebot" + }, + "PhiloMag.de": { + domain: "philomag.de", + allow_cookies: 1 + }, + "Philonomist": { + domain: "philonomist.com", + allow_cookies: 1 + }, + "Philosophy Now": { + domain: "philosophynow.org" + }, + "Piqd.de": { + domain: "piqd.de", + allow_cookies: 1, + useragent: "googlebot" + }, + "Pirate Wires": { + allow_cookies: 1, + domain: "piratewires.com", + block_regex: /\.piratewires\.com\/_next\/static\/chunks\/1164-.+\.js/, + useragent_custom: "Mozilla/5.0 (compatible; Twitterbot/1.0)" + }, + "Pittsburgh Post Gazette": { + domain: "post-gazette.com", + block_regex: /\.tinypass\.com\// + }, + "Política Exterior": { + domain: "politicaexterior.com", + allow_cookies: 1 + }, + "Politico (regwall; not pro)": { + domain: "politico.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Politis.fr": { + domain: "politis.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Polityka.pl": { + domain: "polityka.pl", + allow_cookies: 1, + useragent: "googlebot" + }, + "Popular Science": { + domain: "popsci.com", + allow_cookies: 1, + block_regex: /js\.pelcro\.com\// + }, + "Postmedia Network (opt-in to custom sites for unlisted)": { + domain: "###_ca_postmedia", + group: [ + "calgaryherald.com", + "financialpost.com", + "nationalpost.com", + "theprovince.com", + "torontosun.com", + "vancouversun.com" + ], + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.sophi\.io\/|\.amplitude\.com\/)/ + }, + "Pour l'Éco": { + allow_cookies: 1, + domain: "pourleco.com", + block_regex: /\.poool\.fr\// + }, + "Pour la Science.fr": { + domain: "pourlascience.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "Private Media AU": { + domain: "###_au_private_media", + group: [ + "crikey.com.au", + "smartcompany.com.au", + "themandarin.com.au" + ], + remove_cookies_select_drop: ["blaize_session"] + }, + "Profil.at": { + domain: "profil.at", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Project Syndicate (fetch from archive.is)": { + domain: "project-syndicate.org", + allow_cookies: 1, + cs_dompurify: 1 + }, + "ProMedia.nl Group (opt-in to custom sites)": { + domain: "###_nl_promedia", + group: [], + useragent: "googlebot", + cs_dompurify: 1 + }, + "Prospect Magazine": { + domain: "prospectmagazine.co.uk", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Public.fr": { + domain: "public.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Público.es": { + domain: "publico.es", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Puck.news (fetch from archive.is)": { + domain: "puck.news", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Puls Biznesu": { + domain: "pb.pl", + allow_cookies: 1, + block_regex: /\.pb\.pl\/api\/tinypass\.min\.js/ + }, + "Quartz (newsletter)": { + domain: "qz.com", + allow_cookies: 1, + block_regex: /\.kinja-static\.com\/assets\/.+\/regwalled-content.+\.js/ + }, + "Quora": { + domain: "quora.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "Quotidiano.net (+ regional)": { + domain: "###_it_quotidiano", + group: [ + "ilgiorno.it", + "ilrestodelcarlino.it", + "iltelegrafolivorno.it", + "lanazione.it", + "quotidiano.net" + ], + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Record.pt": { + domain: "record.pt", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/ + }, + "Réforme.net": { + domain: "reforme.net", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Reuters": { + domain: "reuters.com", + allow_cookies: 1, + block_regex: /\.reuters\.com\/arc\/subs\/p\.min\.js/ + }, + "Revista Oeste": { + domain: "revistaoeste.com", + allow_cookies: 1, + block_js_inline: /\/revistaoeste\.com\/revista\//, + block_regex: /\/revistaoeste\.com\/wp-content\/.+\/js\/app\..+\.js/ + }, + "Revue Conflits": { + domain: "revueconflits.com", + allow_cookies: 1, + block_regex: /\.qiota\.com\/data/ + }, + "Revue21.fr": { + domain: "revue21.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "Rheinische Post Mediengruppe (fetch from archive.is)": { + domain: "###_de_rp_medien", + group: [ + "ga.de", + "rp-online.de", + "saarbruecker-zeitung.de", + "volksfreund.de" + ], + allow_cookies: 1, + block_regex: /\.piano\.io\//, + cs_dompurify: 1 + }, + "Ringier Gruppe (ch)": { + allow_cookies: 1, + domain: "###_ch_ringier", + group: [ + "beobachter.ch", + "blick.ch", + "handelszeitung.ch" + ], + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1, + useragent: "googlebot", + exception: [{ + domain: "blick.ch", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + } + ] + }, + "Ringier Axel Springer Polska": { + domain: "###_pl_ringier", + group: [ + "auto-swiat.pl", + "businessinsider.com.pl", + "forbes.pl", + "komputerswiat.pl", + "newsweek.pl", + "onet.pl" + ], + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "Rivals (fetch from archive.is)": { + domain: "rivals.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Roularta Media Group": { + domain: "###_be_roularta", + group: [ + "artsenkrant.com", + "beleggersbelangen.nl", + "femmesdaujourdhui.be", + "flair.be", + "knack.be", + "kw.be", + "levif.be", + "libelle.be" + ], + allow_cookies: 1, + block_js_inline: /\.be\/.+\/(\w+-){2,}/, + block_regex: "(\\.|\\/){domain}\\/(script|js\\/responsive\\/rmg(Modal|Paywall))\\.js", + exception: [{ + domain: ["artsenkrant.com", "beleggersbelangen.nl", "kw.be"], + allow_cookies: 1, + block_regex: "(\\.|\\/){domain}\\/(script|js\\/responsive\\/rmg(Modal|Paywall))\\.js", + } + ] + }, + "RugbyPass": { + domain: "rugbypass.com", + allow_cookies: 1, + block_js_inline: /\.rugbypass\.com\/plus\/\w/, + block_regex: /\.tinypass\.com\// + }, + "S&P Global": { + domain: "spglobal.com", + block_regex: /\.spglobal\.com\/script\.js/, + remove_cookies_select_drop: ["count"] + }, + "Sábado (not video)": { + domain: "sabado.pt", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/ + }, + "Scholastic": { + "domain": "scholastic.com", + "allow_cookies": 1 + }, + "Schweizer Monat": { + domain: "schweizermonat.ch", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Science (free articles only)": { + domain: "science.org", + allow_cookies: 1 + }, + "Science & Vie": { + domain: "science-et-vie.com", + block_regex: /\.qiota\.com\// + }, + "ScienceNews.org": { + domain: "sciencenews.org", + remove_cookies_select_drop: ["blaize_session"] + }, + "Sciences et Avenir": { + domain: "sciencesetavenir.fr", + block_regex: /(\.poool\.fr\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Sciences Humaines": { + domain: "scienceshumaines.com", + remove_cookies_select_drop: ["number_view_paywall"], + block_regex: /\.qiota\.com\//, + useragent: "googlebot" + }, + "Scientific American": { + domain: "scientificamerican.com", + remove_cookies_select_drop: ["article_meter"], + block_regex: /\.scientificamerican\.com\/api\/tinypass\.min\.js/ + }, + "Sky.it (sport & tg24 only)": { + domain: "sky.it", + allow_cookies: 1 + }, + "Slate": { + domain: "slate.com", + block_regex: /(\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "SlideShare": { + domain: "slideshare.net", + allow_cookies: 1 + }, + "SOFREP": { + domain: "sofrep.com" + }, + "South China Morning Post": { + domain: "scmp.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Southern Weekly": { + domain: "infzm.com", + allow_cookies: 1 + }, + "Spektrum.de": { + domain: "spektrum.de", + allow_cookies: 1 + }, + "SPH Media (fetch from archive.is)": { + domain: "###_sg_sph_media", + group: [ + "businesstimes.com.sg", + "straitstimes.com" + ], + allow_cookies: 1, + exception: [{ + domain: "straitstimes.com", + allow_cookies: 1, + cs_dompurify: 1 + } + ] + }, + "Sport Life Ibérica (text only; opt-in to custom sites)": { + domain: "###_es_sport_life", + group: [], + allow_cookies: 1, + ld_json: "div.c-paywall|div.c-mainarticle__body" + }, + "Sports Illustrated": { + domain: "si.com", + allow_cookies: 1, + block_regex: /\.si\.com\/script\.js/ + }, + "Springer Medizin": { + domain: "springermedizin.de", + allow_cookies: 1 + }, + "Standardmedia.co.ke": { + domain: "standardmedia.co.ke", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "Star Tribune": { + domain: "startribune.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "StatNews": { + domain: "statnews.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "Stereogum": { + domain: "stereogum.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Stock News": { + domain: "stocknews.com", + allow_cookies: 1 + }, + "Stratfor": { + domain: "stratfor.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "Study.com (only lessons; no videos)": { + domain: "study.com", + allow_cookies: 1 + }, + "Stylist.co.uk": { + domain: "stylist.co.uk", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Suomen Sotilas": { + domain: "suomensotilas.fi", + allow_cookies: 1, + block_regex: /\/suomensotilas\.fi\/wp-content\/plugins\/epflpw\/js\/pw\.js/ + }, + "Süddeutsche Zeitung": { + domain: "sueddeutsche.de", + allow_cookies: 1, + block_regex: /\.sueddeutsche\.de\/api\/tinypass\.min\.js/, + cs_dompurify: 1 + }, + "Südkurier (fetch from archive.is)": { + domain: "suedkurier.de", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "Swarajyamag": { + domain: "swarajyamag.com", + allow_cookies: 1 + }, + "T3n.de (text only)": { + domain: "t3n.de", + allow_cookies: 1 + }, + "Tamedia.ch Group (opt-in to custom sites for unlisted)": { + domain: "###_ch_tamedia", + group: [ + "24heures.ch", + "bazonline.ch", + "bernerzeitung.ch", + "derbund.ch", + "tagesanzeiger.ch", + "tdg.ch" + ], + remove_cookies_select_drop: ["xbc"], + block_regex: /\.tinypass\.com\// + }, + "Tampa Bay Times": { + domain: "tampabay.com", + allow_cookies: 1, + block_regex: /(\.zephr\.com\/zephr-browser\/|js\.matheranalytics\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "Tech in Asia": { + domain: "techinasia.com", + allow_cookies: 1, + useragent: "facebookbot", + cs_dompurify: 1 + }, + "TechTarget Group": { + domain: "###_usa_techtarget", + allow_cookies: 1, + group: [ + "computerweekly.com", + "lemagit.fr", + "techtarget.com" + ] + }, + "Telegraaf": { + domain: "telegraaf.nl", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Tempo.co": { + domain: "tempo.co", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Télérama.fr": { + domain: "telerama.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Tes Magazine": { + domain: "tes.com", + remove_cookies_select_drop: ["tg_paywall"] + }, + "Texas Monthly": { + domain: "texasmonthly.com", + allow_cookies: 1, + block_regex: /\.texasmonthly\.com\/script\.js/ + }, + "The (New Orleans) Advocate": { + domain: "###_usa_theadvocate", + group: [ + "nola.com", + "shreveportbossieradvocate.com", + "theadvocate.com" + ], + allow_cookies: 1, + block_regex: "(\\.{domain}\\/(script|.+\\/tncms\\/api\\/access\\..+)\\.js|\\.townnews\\.com\\/.+\\/engage\\.min\\.js)" + }, + "The American Conservative": { + domain: "theamericanconservative.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The American Interest": { + domain: "the-american-interest.com", + allow_cookies: 1 + }, + "The American Scholar": { + domain: "theamericanscholar.org", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The Art Newspaper": { + domain: "theartnewspaper.com", + allow_cookies: 1, + block_regex: /\.theartnewspaper\.com\/_next\/static\/chunks\/pages\/access-allowed-.+\.js/ + }, + "The Atlanta Journal-Constitution (+ Cox First Media/opt-in to custom sites)": { + domain: "ajc.com", + allow_cookies: 1, + block_regex: /(\.wgchrrammzv\.com\/prod\/ajc\/loader\.min\.js|\.ampproject\.org\/v0\/amp-access-.+\.js)/, + exception: [{ + domain: "ajc.com", + allow_cookies: 1, + block_regex: /(\.piano\.io\/xbuilder\/experience\/execute|\.cxense\.com\/|\.sophi\.io\/)/ + } + ] + }, + "The Atlantic": { + domain: "theatlantic.com", + allow_cookies: 1, + block_regex: /\.theatlantic\.com\/zephr\// + }, + "The Baffler": { + domain: "thebaffler.com", + allow_cookies: 1, + block_regex: /\/blink\.net\/.+\/blink-sdk\.js/ + }, + "The Baltimore Banner": { + domain: "thebaltimorebanner.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.thebaltimorebanner\.com\/script\.js)/ + }, + "The Boston Globe": { + domain: "bostonglobe.com", + allow_cookies: 1, + block_regex: /(\.blueconic\.net\/|meter\.bostonglobe\.com\/js\/|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/ + }, + "The Business Journals (free articles only)": { + domain: "bizjournals.com", + allow_cookies: 1, + block_regex: /\.cxense\.com\// + }, + "The Business of Fashion": { + domain: "businessoffashion.com", + allow_cookies: 1, + block_regex: /(\.businessoffashion\.com\/zephr\/feature|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "The Christian Science Monitor": { + domain: "csmonitor.com", + allow_cookies: 1 + }, + "The Chronicle of Higher Education (& Philanthropy)": { + domain: "###_usa_chronicle", + group: [ + "chronicle.com", + "philanthropy.com" + ], + allow_cookies: 1, + block_regex: "\\.{domain}\\/script\\.js" + }, + "The Columbian": { + domain: "columbian.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "The Critic": { + domain: "thecritic.co.uk", + block_regex: /\.hadrianpaywall\.com\// + }, + "The Daily Beast": { + domain: "thedailybeast.com", + block_regex: /\.tinypass\.com\// + }, + "The Daily Wire (news only)": { + domain: "dailywire.com", + allow_cookies: 1 + }, + "The Dallas Morning News": { + domain: "dallasnews.com", + allow_cookies: 1, + block_regex: /(\.dallasnews\.com\/script\.js|js\.matheranalytics\.com\/|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/, + useragent: "googlebot" + }, + "The Diplomat": { + domain: "thediplomat.com", + useragent: "facebookbot" + }, + "The Dispatch": { + domain: "thedispatch.com", + allow_cookies: 1, + block_regex: /\.thedispatch\.com\/api\/tinypass\.min\.js/ + }, + "The Economic Times (ET Prime)": { + domain: "###_economictimes", + group: [ + "economictimes.com", + "economictimes.indiatimes.com" + ], + allow_cookies: 1, + useragent: "googlebot", + cs_dompurify: 1 + }, + "The Economist": { + domain: "economist.com", + allow_cookies: 1, + block_regex: /(\/zephr\/feature|\.economist\.com\/latest\/wall-ui\.js)/, + useragent_custom: "Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.103 Mobile Safari/537.36 Lamarr" + }, + "The Epoch Times (+ br|cz|de|fr|jp|ro; opt-in to custom sites)": { + domain: "###_usa_epochtimes", + group: [ + "epoch.org.il", + "theepochtimes.com" + ], + allow_cookies: 1, + block_regex: /\.(theepochtimes\.com|epochbase\.(com|eu))\/(rules\/get|libs\/paywall.+\.js)/, + exception: [{ + domain: "epoch.org.il", + allow_cookies: 1, + block_js_inline: /\/epoch\.org\.il\/.+\/\d{5,}\//, + cs_dompurify: 1 + } + ] + }, + "The Financial Express": { + domain: "financialexpress.com", + allow_cookies: 1, + block_regex: /(\.financialexpress\.com\/.+\/min\/premiumStoryContent\.js|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "The Globe and Mail": { + domain: "theglobeandmail.com", + allow_cookies: 1, + block_regex: /(\.sophi\.io\/|\.zephr\.com\/zephr-browser\/)/ + }, + "The Hill": { + domain: "thehill.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "The Hill Times": { + domain: "hilltimes.com", + allow_cookies: 1, + block_regex: /\.hilltimes\.com\/.+\/js\/loadingoverlay\/loadingoverlay\.min\.js/, + useragent: "googlebot", + cs_dompurify: 1 + }, + "The Hindu (not epaper)": { + domain: "thehindu.com", + allow_cookies: 1, + block_regex: /(\.cxense\.com\/|\.piano\.io\/xbuilder\/experience\/execute|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/ + }, + "The Hindu BusinessLine (not epaper)": { + domain: "thehindubusinessline.com", + allow_cookies: 1, + block_regex: /(\.cxense\.com\/|\.piano\.io\/xbuilder\/experience\/execute|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/ + }, + "The Impression": { + domain: "theimpression.com", + allow_cookies: 1 + }, + "The Independent (UK & USA)": { + domain: "###_uk_independent", + group: [ + "independent.co.uk", + "the-independent.com" + ], + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "The Indian Express": { + domain: "indianexpress.com", + allow_cookies: 1, + block_regex: /(\/indianexpress\/js\/evolok\/|\.fewcents\.co\/.+\/paywall.*\.js|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "The Intercept (regwall)": { + domain: "theintercept.com", + allow_cookies: 1, + block_js_inline: /\/theintercept\.com\// + }, + "The Irish Examiner": { + domain: "irishexaminer.com", + allow_cookies: 1, + block_regex: /\.irishexaminer\.com\/pu_examiner\/scripts\/engage/ + }, + "The Irish News": { + domain: "irishnews.com", + allow_cookies: 1, + block_regex: /\.irishnews\.com\/arc\/subs\/p\.min\.js/ + }, + "The Irish Times": { + domain: "irishtimes.com", + allow_cookies: 1, + block_regex: /\.irishtimes\.com\/zephr\/feature/ + }, + "The Japan Times (do not block TinyPass-script externally)": { + domain: "japantimes.co.jp", + block_regex: /\.cxense\.com\//, + remove_cookies_select_drop: ["xbc"] + }, + "The Jerusalem Post": { + domain: "jpost.com", + allow_cookies: 1, + block_regex: /\.jpost\.com\/js\/js_article\.min\.js/ + }, + "The Juggernaut": { + domain: "###_usa_thejuggernaut", + group: [ + "thejuggernaut.com", + "jgnt.co" + ], + allow_cookies: 1 + }, + "The Lamp Magazine": { + domain: "thelampmagazine.com", + allow_cookies: 1 + }, + "The Lawyer (UK; not mda)": { + domain: "thelawyer.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "The Leaflet.in": { + domain: "theleaflet.in", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The Market.ch": { + domain: "themarket.ch", + allow_cookies: 1, + block_regex: /(\.piano\.io\/|ens\.themarket\.ch\/.+\/Bootstrap\.js)/ + }, + "The Nation": { + domain: "thenation.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.ampproject\.org\/v0\/amp-access-.+\.js)/ + }, + "The New Atlantis": { + domain: "thenewatlantis.com", + allow_cookies: 1, + block_regex: /\.thenewatlantis\.com\/.+\/thenewatlantis\/js\/(gate|donate)\.js/ + }, + "The New Criterion": { + domain: "newcriterion.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The New European": { + domain: "theneweuropean.co.uk", + allow_cookies: 1, + block_regex: /cdn\.tinypass\.com\// + }, + "The New Republic": { + domain: "newrepublic.com", + allow_cookies: 1, + block_regex: /\/blink\.net\/.+\/blink-sdk\.js/ + }, + "The New Statesman": { + domain: "newstatesman.com", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "The New York Review of Books": { + domain: "nybooks.com", + allow_cookies: 1, + block_regex: /\.nybooks\.com\/wp-admin\/admin-ajax\.php/ + }, + "The New York Sun": { + domain: "nysun.com", + allow_cookies: 1, + block_regex: /\.nysun\.com\/zephr\// + }, + "The New York Times": { + domain: "nytimes.com", + allow_cookies: 1, + block_regex: /(\.nytimes\.com\/(meter\.js|svc\/onsite-messaging\/query)|mwcm\.nyt\.com\/.+\.js|cooking\.nytimes\.com\/api\/.+\/access)/, + useragent: "googlebot" + }, + "The News Lens": { + allow_cookies: 1, + domain: "thenewslens.com" + }, + "The News Minute": { + domain: "thenewsminute.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The Philadelphia Inquirer": { + domain: "inquirer.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|js\.matheranalytics\.com\/)/ + }, + "The Point Magazine": { + domain: "thepointmag.com", + remove_cookies_select_drop: ["monthly_history"] + }, + "The Quint": { + domain: "thequint.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The Salt Lake Tribune": { + domain: "sltrib.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + }, + "The San Francisco Standard": { + domain: "sfstandard.com" + }, + "The Saturday Paper": { + domain: "thesaturdaypaper.com.au", + block_regex: /\.thesaturdaypaper\.com\.au\/sites\/all\/modules\/custom\/node_meter\/pw\.js/ + }, + "The Scientist (archive)": { + domain: "the-scientist.com", + allow_cookies: 1 + }, + "The Seattle Times": { + domain: "seattletimes.com", + allow_cookies: 1, + block_regex: /(\.seattletimes\.com\/.+\/st-user-messaging.+\.js|js\.matheranalytics\.com\/)/ + }, + "The Spectator (UK)": { + domain: "spectator.co.uk", + useragent: "googlebot", + cs_dompurify: 1 + }, + "The Spectator Australia": { + domain: "spectator.com.au", + allow_cookies: 1, + useragent: "googlebot", + cs_dompurify: 1 + }, + "The Spectator World": { + domain: "thespectator.com", + allow_cookies: 1, + block_regex: /\/thespectator\.com\/wp-content\/themes\/spectator\/js\/tinypass\.js/ + }, + "The Stage Media (UK)": { + "domain": "###_uk_thestage_media", + "allow_cookies": 1, + "group": [ + "thebookseller.com", + "thestage.co.uk" + ], + cs_dompurify: 1, + exception: [{ + domain: "thebookseller.com", + allow_cookies: 1, + useragent: "googlebot" + } + ] + }, + "The Sun Group (UK)": { + domain: "###_uk_thesun", + group: [ + "thescottishsun.co.uk", + "thesun.co.uk" + ], + allow_cookies: 1, + block_regex: "\\.{domain}\\/zephr\\/feature" + }, + "The Telegraph": { + domain: "telegraph.co.uk", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.telegraph\.co\.uk\/martech\/js\/)/ + }, + "The Times UK (fetch from archive.is)": { + domain: "thetimes.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The Times Literary Supplement": { + domain: "the-tls.co.uk", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The Toronto Star (+ local TorStar sites)": { + domain: "###_ca_torstar", + group: [ + "niagarafallsreview.ca", + "stcatharinesstandard.ca", + "thepeterboroughexaminer.com", + "therecord.com", + "thespec.com", + "thestar.com", + "wellandtribune.ca" + ], + allow_cookies: 1, + block_regex: "(\\.{domain}\\/(script|.+\\/tncms\\/api\\/access\\..+)\\.js|\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)", + cs_dompurify: 1 + }, + "The Verge": { + domain: "theverge.com", + allow_cookies: 1, + block_regex: /\.zephr\.com\/zephr-browser\// + }, + "The Wall Street Journal": { + domain: "wsj.com", + allow_cookies: 1, + referer_custom: "https://www.drudgereport.com/", + cs_dompurify: 1 + }, + "The Washington Post": { + domain: "washingtonpost.com", + allow_cookies: 1, + block_regex: /\.washingtonpost\.com\/.+\/tetro-client\//, + useragent: "googlebot" + }, + "The Week (regwall)": { + domain: "theweek.com", + allow_cookies: 1 + }, + "The West Australian (+ regional/opt-in to custom sites)": { + domain: "thewest.com.au", + allow_cookies: 1 + }, + "The Wrap": { + domain: "thewrap.com", + remove_cookies_select_drop: ["blaize_session"], + cs_dompurify: 1 + }, + "Times Higher Education": { + domain: "timeshighereducation.com", + allow_cookies: 1 + }, + "Times of India": { + domain: "###_timesofindia", + group: [ + "epaper.indiatimes.com", + "timesofindia.indiatimes.com" + ], + allow_cookies: 1, + cs_dompurify: 1 + }, + "Tiroler Tageszeitung": { + domain: "tt.com", + allow_cookies: 1, + block_regex: /\.piano\.io\/xbuilder\/experience\/execute/, + cs_dompurify: 1 + }, + "Tribune Publishing Company": { + domain: "###_usa_tribune", + group: [ + "baltimoresun.com", + "capitalgazette.com", + "chicagotribune.com", + "courant.com", + "dailypress.com", + "mcall.com", + "nydailynews.com", + "orlandosentinel.com", + "pilotonline.com", + "sun-sentinel.com" + ], + allow_cookies: 1, + block_regex: "(\\.{domain}\\/(script|.+\\/loader-wp\\/static\\/loader\\.min)\\.js)", + cs_dompurify: 1 + }, + "Tuttosport": { + domain: "tuttosport.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "UnHerd": { + domain: "unherd.com", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "UOL.com.br": { + domain: "uol.com.br", + allow_cookies: 1, + block_regex: /(paywall\.folha\.uol\.com\.br\/|\.(tinypass|matheranalytics)\.com\/|\.ampproject\.org\/v0\/amp-subscriptions-.+\.js)/, + useragent: "googlebot" + }, + "USA Today": { + domain: "usatoday.com", + allow_cookies: 1, + block_regex: /\.ampproject\.org\/v0\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "Valeurs Actuelles": { + domain: "valeursactuelles.com", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "Valnet Group (regwall; opt-in to custom sites)": { + domain: "###_ca_valnet", + group: [], + remove_cookies_select_drop: ["articlesLimitDepth", "articlesReadPerDay"] + }, + "Verlagsgruppe Rhein Main (opt-in to custom sites for unlisted)": { + allow_cookies: 1, + domain: "###_de_vrm", + group: [ + "allgemeine-zeitung.de", + "echo-online.de", + "wiesbadener-kurier.de" + ], + allow_cookies: 1, + block_regex: /\.piano\.io\//, + useragent: "googlebot" + }, + "Vice": { + domain: "vice.com", + allow_cookies: 1 + }, + "Vikatan": { + domain: "vikatan.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Vogue Business": { + domain: "voguebusiness.com", + block_regex: /\.voguebusiness\.com\/journey\/compiler\/build-.+\.js/, + remove_cookies_select_drop: ["userId"] + }, + "Vorarlberg Nachrichten": { + domain: "vn.at", + allow_cookies: 1, + block_js_inline: /\.vn\.at\/.+\/\d{4}\//, + block_regex: /\.tinypass\.com\//, + }, + "Vorarlberg Online": { + domain: "vol.at", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "Vox": { + domain: "vox.com", + allow_cookies: 1, + block_regex: /\.zephr\.com\/zephr-browser\// + }, + "Vrij Nederland": { + domain: "vn.nl", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Washington Examiner": { + domain: "washingtonexaminer.com", + allow_cookies: 1, + block_regex: /\.zephr\.com\/zephr-browser\// + }, + "Weltkunst": { + domain: "weltkunst.de", + allow_cookies: 1, + useragent: "googlebot" + }, + "Weser-Kurier": { + domain: "weser-kurier.de", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "William Reed Group (opt-in to custom sites)": { + domain: "###_uk_william_reed", + group: [], + block_regex: /\.tinypass\.com\//, + add_ext_link: "div.accessMessage|div.accessContainer", + add_ext_link_type: "google_search_tool", + }, + "Winnipeg Free Press": { + domain: "winnipegfreepress.com", + allow_cookies: 1, + block_regex: /(\.winnipegfreepress\.com\/(api\/v\d\/auth\/identify|.+\/gdpr\.js)|\.cxense\.com\/)/ + }, + "Wonderzine": { + domain: "wonderzine.com", + allow_cookies: 1, + useragent: "facebookbot" + }, + "Wyborcza.pl Group (fetch from archive.is)": { + domain: "###_pl_wyborcza_group", + group: [ + "magazyn-kuchnia.pl", + "wyborcza.biz", + "wyborcza.pl", + "wysokieobcasy.pl" + ], + allow_cookies: 1, + cs_dompurify: 1 + }, + "Ynet": { + domain: "ynet.co.il", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "ZeroHedge": { + domain: "zerohedge.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "* Block general paywall-scripts (opt-in to custom sites to enable also for unlisted sites)": { + domain: "###" + }, + "Amp-access": { + domain: "cdn.ampproject.org", + allow_cookies: 1, + block_regex_general: /\.ampproject\.org\/.+\/amp-(access|(.+-)?ad|analytics|fx-flying-carpet|subscriptions)-.+\.m?js/, + excluded_domains: ["cdn.ampproject.org", "cambridge.org", "cmjornal.pt"] + }, + "Amplitude": { + domain: "amplitude.com", + allow_cookies: 1, + block_regex_general: /\.amplitude\.com\//, + excluded_domains: ["amplitude.com"] + }, + "Arc XP": { + domain: "###_arcxp.com", + allow_cookies: 1, + block_regex_general: /\/arc\/subs\/p\.min\.js/, + excluded_domains: ["latercera.com", "nzherald.co.nz"] + }, + "Axate.io": { + domain: "###_uk_axate.io", + allow_cookies: 1, + block_regex_general: /\.axate\.io\// + }, + "AzureEdge": { + domain: "loader-cdn.azureedge.net", + allow_cookies: 1, + block_regex_general: /loader-cdn\.azureedge\.net\// + }, + "BlueConic": { + domain: "blueconic.net", + allow_cookies: 1, + block_regex_general: /(\.blueconic\.net\/|[a-z]{1}[0-9]{2,3}\.[\w-]+\.(co(m|\.uk)|net|org)\/script\.js)/ + }, + "Cxense": { + domain: "cxense.com", + allow_cookies: 1, + block_regex_general: /\.cxense\.com\//, + excluded_domains: ["journaldemontreal.com", "journaldequebec.com", "wsj.com"] + }, + "Ensighten": { + domain: "ensighten.com", + allow_cookies: 1, + block_regex_general: /\.ensighten\.com\/.+\/Bootstrap\.js/ + }, + "EverCookie": { + domain: "###_evercookie", + allow_cookies: 1, + block_regex_general: /\/paywall\/evercookie_get\.js/ + }, + "Evolok": { + domain: "evolok.net", + allow_cookies: 1, + block_regex_general: /\.evolok\.net\// + }, + "Evolok WordPress": { + domain: "###_wp_evolok", + allow_cookies: 1, + block_regex_general: /\/evolok\/(.+\/)?ev-(em|widgets)\.min\.js/, + excluded_domains: ["vikatan.com"] + }, + "FewCents": { + domain: "fewcents.co", + allow_cookies: 1, + block_regex_general: /\.fewcents\.co\/.+\/paywall.*\.js/ + }, + "Leaky Paywall (WordPress plugin)": { + domain: "###_wp_leaky_paywall", + group: [], + block_regex_general: /\/wp-content\/plugins\/leaky-paywall\/js\/leaky-paywall-cookie\.js/ + }, + "MatherAnalytics": { + domain: "matheranalytics.com", + allow_cookies: 1, + block_regex_general: /js\.matheranalytics.com\// + }, + "NewsMemory": { + domain: "newsmemory.com", + allow_cookies: 1, + block_regex_general: /\.newsmemory\.com\/\?meter/ + }, + "Omeda Olytics": { + domain: "omeda.com", + allow_cookies: 1, + block_regex_general: /olytics\.omeda\.com\//, + excluded_domains: ["omeda.com"] + }, + "OneCount": { + domain: "onecount.net", + allow_cookies: 1, + block_regex_general: /\.onecount\.net\// + }, + "Pelcro": { + domain: "pelcro.com", + allow_cookies: 1, + block_regex_general: /js\.pelcro\.com\//, + excluded_domains: ["pelcro.com"] + }, + "Piano.io (+ TinyPass)": { + domain: "piano.io", + allow_cookies: 1, + block_regex_general: /\/xbuilder\/experience\/execute/, + excluded_domains: ["piano.io", "hbr.org", "japantimes.co.jp", "nacion.com"] + }, + "Pico.tools": { + domain: "pico.tools", + allow_cookies: 1, + block_regex_general: /api\.pico\.tools\// + }, + "Pigeon (WordPress plugin)": { + domain: "###_wp_pigeon", + allow_cookies: 1, + block_regex_general: /\/c\/assets\/pigeon\.js/ + }, + "Poool.fr": { + domain: "poool.fr", + allow_cookies: 1, + block_regex_general: /\.poool\.fr\//, + excluded_domains: ["poool.fr"] + }, + "Qiota": { + domain: "qiota.com", + allow_cookies: 1, + block_regex_general: /\.qiota\.com\/data/, + excluded_domains: ["qiota.com"] + }, + "RCP-View Limit (WordPress plugin)": { + domain: "###_rcp_view_limit", + allow_cookies: 1, + block_regex_general: /\/wp-content\/.+\/plugins\/rcp-view-limit\// + }, + "Sophi.io": { + domain: "sophi.io", + allow_cookies: 1, + block_regex_general: /\.sophi\.io\//, + excluded_domains: ["sophi.io"] + }, + "Steady": { + domain: "steadyhq.com", + allow_cookies: 1, + block_regex_general: /\/steadyhq\.com\//, + excluded_domains: ["steadyhq.com"] + }, + "TownNews sites (Blox CMS)": { + domain: "###_usa_townnews", + block_regex_general: /\/tncms\/api\/access(\..+)?\.js/, + cs_dompurify: 1, + exception: [{ + domain: "berkshireeagle.com", + block_regex_general: /\/tncms\/api\/access(\..+)?\.js/, + useragent: "googlebot", + cs_dompurify: 1 + } + ] + }, + "Zephr": { + domain: "zephr.com", + allow_cookies: 1, + block_regex_general: /(\.zephr\.com\/zephr-browser\/|\/zephr\/feature)/ + }, +} + +if (typeof browser !== 'object') { + delete defaultSites['Roularta Media Group']['block_js_inline']; + delete defaultSites['Roularta Media Group']['exception']; +} + +var defaultSites_grouped_domains = Object.values(defaultSites).filter(function (value) { + return (value.hasOwnProperty('domain') && value.domain !== '###'); + }).map(x => x.domain); +var defaultSites_groups_domains = [].concat.apply([], Object.values(defaultSites).filter(function (value) { + return value.hasOwnProperty('group'); + }).map(x => x.group)); +var defaultSites_domains = defaultSites_grouped_domains.concat(defaultSites_groups_domains); + +function expandSiteRules(sites, updated = false) { + for (let site in sites) { + let rule = sites[site]; + if (rule.hasOwnProperty('group_rule')) { + let rules = sites[rule.group_rule]; + for (key in rules) { + if (key !== 'group_rule_domains') + sites[site][key] = rules[key]; + } + //delete sites[site].group_rule; + } + if (updated) { + if (rule.hasOwnProperty('group_rule_domains')) { + let domains = rule.group_rule_domains; + for (let domain of domains) { + let defaultTitle = Object.keys(defaultSites).find(key => defaultSites[key].domain === domain); + if (defaultTitle) { + for (key in rule) { + if (key !== 'group_rule_domains') + defaultSites[defaultTitle][key] = rule[key]; + } + } + } + } + } + if (rule.hasOwnProperty('group')) { + let domain = rule.domain; + grouped_sites[domain] = rule.group + } + } +} + +var grouped_sites = {}; +expandSiteRules(defaultSites); + +// custom domains (background) +var custom_flex_not = { + "###_ca_postmedia": ["canada.com", "canoe.com", "driving.ca"], + "###_de_dfv_medien": ["dfv.de"], + "###_de_madsack": ["madsack.de", "madsack-medien-campus.de"], + "###_es_epiberica": ["sport.es", "stilo.es"], + "###_wp_leaky_paywall": ["epsilontheory.com", "heisenbergreport.com", "thewirechina.com", "toolkits.com", "uppereastsite.com"], + "###_uk_axate.io": ["thecricketer.com", "thinkofx.net"], + "###_uk_haymarket": ["asianinvestor.net", "classicandsportscar.com", "financeasia.com", "gpbusiness.co.uk", "scmagazineuk.com", "thecorporatetreasurer.com"], + "###_uk_haymarket_medical": ["mycme.com"], + "###_usa_hearst_comm": ["chron.com", "sfgate.com"], + "###_usa_mcc": ["mcclatchy.com"], + "###_usa_townnews": ["bloxdigital.com", "townnews.com"], + "thewest.com.au": ["perthnow.com.au"] +} +var custom_flex; +var custom_flex_domains; +var custom_flex_not_domains; +var custom_flex_nofix_domains = [].concat(custom_flex_not['###_wp_leaky_paywall'], custom_flex_not['###_uk_axate.io'], custom_flex_not['###_uk_haymarket']); + +function init_custom_flex_domains() { + custom_flex = {}; + custom_flex_domains = []; + custom_flex_not_domains = [].concat.apply([], Object.values(custom_flex_not)); +} +init_custom_flex_domains(); + +// sites with no fix (background) +var de_smn_nofix_domains = ['cannstatter-zeitung.de', 'esslinger-zeitung.de', 'frankenpost.de', 'insuedthueringen.de', 'krzbb.de', 'kurier.de', 'np-coburg.de', 'schwarzwaelder-bote.de', 'stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de']; +var de_westfalen_medien_nofix_domains = ['muensterschezeitung.de', 'westfalen-blatt.de', 'wn.de']; +var fi_sanoma_nofix_domains = ['aamulehti.fi', 'hs.fi', 'is.fi']; +var fr_groupe_ebra_nofix_domains = ['bienpublic.com', 'dna.fr', 'estrepublicain.fr', 'lalsace.fr', 'ledauphine.com', 'lejsl.com', 'leprogres.fr', 'republicain-lorrain.fr', 'vosgesmatin.fr']; +var fr_groupe_infopro_nofix_domains = ['centralbanking.com', 'lagazettedescommunes.com', 'risk.net', 'usine-digitale.fr']; +var fr_be_groupe_rossel_nofix_domains = ['aisnenouvelle.fr', 'courrier-picard.fr', 'lardennais.fr', 'lavoixdunord.fr', 'lemessager.fr', 'lesoir.be', 'lest-eclair.fr', 'liberation-champagne.fr', 'lunion.fr', 'nordlittoral.fr', 'paris-normandie.fr', 'sudinfo.be']; +var fr_indigo_nofix_domains = ['africaintelligence.com', 'africaintelligence.fr', 'glitz.paris', 'intelligenceonline.com', 'intelligenceonline.fr', 'lalettre.fr']; +var fr_jamg_nofix_domains = ['africabusinessplus.com', 'theafricareport.com']; +var fr_monde_diplo_nofix_domains = ['editionarabediplo.com', 'eldiplo.org', 'lemondediplomatique.cl', 'lmd.nedeljnik.rs', 'lmd.no', 'monde-diplomatique.fr', 'mondediplo.com', 'mondediplo.fi']; +var it_gedi_nofix_domains = ['gelocal.it', 'limesonline.com']; +var it_gruppo_nem_nofix_domains = ['corrierealpi.it', 'ilnordest.it', 'ilpiccolo.it', 'mattinopadova.it', 'messaggeroveneto.it', 'nuovavenezia.it', 'tribunatreviso.it']; +var nl_mediahuis_region_nofix_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'limburger.nl', 'noordhollandsdagblad.nl']; +var se_bonnier_group_nofix_domains = ['di.se', 'expressen.se']; +var nofix_sites = ['11freunde.de', '24.hu', '444.hu', 'abplive.com', 'aerzteblatt.de', 'africa-confidential.com', 'aftenposten.no', 'aftonbladet.se', 'agefi.fr', 'al-monitor.com', 'allgaeuer-zeitung.de', 'americanscientist.org', 'arkansasonline.com', 'asahi.com', 'asiatimes.com', 'autocarpro.in', 'augsburger-allgemeine.de', 'aviationweek.com', 'badische-zeitung.de', 'bisnis.com', 'bloomberglaw.com', 'bloombergtax.com', 'bnef.com', 'bnn.de', 'borsen.dk', 'breakingviews.com', 'breitbart.com', 'businessinsider.de', 'businesslive.co.za', 'caixin.com', 'caixinglobal.com', 'capital.de', 'caravanmagazine.in', 'catalyst-journal.com', 'chegg.com', 'cieletespace.fr', 'cmjornal.pt', 'consumerreports.org', 'cookpolitical.com', 'costar.com', 'coursehero.com', 'crunchbase.com', 'dealstreetasia.com', 'defence24.pl', 'delfi.ee', 'denikn.cz', 'deraktionaer.de', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'diepresse.com', 'donaukurier.de', 'e24.no', 'echo24.cz', 'elordenmundial.com', 'endpts.com', 'entrepreneur.com', 'epochtimes.se', 'epw.in', 'euractiv.com', 'ewmagazine.nl', 'falter.at', 'fd.nl', 'finance.si', 'finanz-szene.de', 'franc-tireur.fr', 'freiepresse.de', 'ftchinese.com', 'ftchineselive.com', 'gamestar.de', 'gazetaprawna.pl', 'gazeteoksijen.com', 'geo.de', 'golem.de', 'gp.se', 'haufe.de', 'hbrarabic.com', 'hbr-caijing.com', 'hbrfrance.fr', 'hedgehogreview.com', 'heraldo.es', 'hindutamil.in', 'history.org.uk', 'hn.cz', 'hsj.co.uk', 'humanite.fr', 'idnes.cz', 'iex.nl', 'ifre.com', 'ilsecoloxix.it', 'information.dk', 'investors.com', 'iltalehti.fi', 'investing.com', 'jacobin.com', 'janes.com', 'jazziz.com', 'jn.pt', 'jota.info', 'jungefreiheit.de', 'kicker.de', 'kleinezeitung.at', 'kommunen.dk', 'krone.at', 'laprovence.com', 'lasegunda.com', 'latribune.fr', 'laverita.info', 'lavie.fr', 'lavozdegalicia.es', 'law.com', 'law360.ca', 'law360.co.uk', 'law360.com', 'lecanardenchaine.fr', 'leconomiste.com', 'ledesk.ma', 'lefilmfrancais.com', 'lesjours.fr', 'letemps.ch', 'libertiesjournal.com', 'liga.net', 'lindipendente.online', 'lorientlejour.com', 'lr-online.de', 'mailplus.co.uk', 'main-echo.de', 'mainpost.de', 'malaysiakini.com', 'maville.com', 'mediapart.fr', 'mittelbayerische.de', 'money.it', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'motorsport.com', 'moz.de', 'mz.de', 'nachrichten.at', 'naiz.eus', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newleftreview.org', 'news24.com', 'newspapers.com', 'newsroom.co.nz', 'nexos.com.mx', 'next.ink', 'nikkansports.com', 'nikkei.com', 'nn.de', 'note.com', 'nouvelobs.com', 'ntnews.com.au', 'nypost.com', 'oantagonista.com.br', 'ojogo.pt', 'on3.com', 'onetz.de', 'ouest-france.fr', 'pagina12.com.ar', 'penews.com', 'pff.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'postimees.ee', 'pressreader.com', 'publico.pt', 'quechoisir.org', 'racingpost.com', 'rbc.ru', 'reason.com', 'reforma.com', 'republic.ru', 'rhein-zeitung.de', 'rnz.de', 'sciencedirect.com', 'seekingalpha.com', 'sn.at', 'springer.com', 'statista.com', 'stern.de', 'stimme.de', 'streetinsider.com', 'studocu.com', 'substack.com', 'svd.se', 'swp.de', 'table.media', 'taxation.co.uk', 'taxjournal.com', 'test.de', 'the-ken.com', 'thebanker.com', 'theinformation.com', 'thejakartapost.com', 'themorningcontext.com', 'theparisreview.org', 'thestar.com.my', 'timeslive.co.za', 'tipranks.com', 'udn.com', 'vedomosti.ru', 'vi.nl', 'volksstimme.de', 'weltwoche.ch', 'weltwoche.de', 'wissenschaft.de', 'wiwo.de', 'worldpoliticsreview.com', 'woz.ch', 'wpolityce.pl', 'wz.de', 'xakep.ru', 'zaobao.com.sg', 'zive.cz'].concat(custom_flex_nofix_domains, de_smn_nofix_domains, de_westfalen_medien_nofix_domains, fi_sanoma_nofix_domains, fr_groupe_ebra_nofix_domains, fr_groupe_infopro_nofix_domains, fr_be_groupe_rossel_nofix_domains, fr_indigo_nofix_domains, fr_jamg_nofix_domains, fr_monde_diplo_nofix_domains, it_gedi_nofix_domains, it_gruppo_nem_nofix_domains, nl_mediahuis_region_nofix_domains, se_bonnier_group_nofix_domains); diff --git a/sites_updated.json b/sites_updated.json new file mode 100644 index 0000000..87f4b1e --- /dev/null +++ b/sites_updated.json @@ -0,0 +1,74 @@ +{ + "Bonnier News Group": { + "domain": "###_se_bonnier_group", + "group": [ + "dagensmedicin.se", + "dn.se", + "hd.se", + "sydsvenskan.se" + ], + "allow_cookies": 1, + "useragent": "googlebot", + "exception": [{ + "domain": "dn.se", + "allow_cookies": 1, + "ld_archive_is": "div.paywall-wrapper|article" + } + ], + "upd_version": "4.0.8.5" + }, + "Dagens ETC": { + "domain": "etc.se", + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"section.teaser-section\", \"rm_class\":\"teaser-section\"}, {\"cond\":\"section.prose-feature .hidden\", \"rm_class\":\"hidden\"}]", + "upd_version": "4.0.8.6" + }, + "Frankfurter Rundschau": { + "domain": "fr.de", + "allow_cookies": 1, + "block_regex": "\\.fr\\.de\\/sub\\/js\\/pc-offer-west\\.js", + "upd_version": "4.0.7.4" + }, + "MilanoFinanza.it": { + "domain": "milanofinanza.it", + "allow_cookies": 1, + "ld_json": "div.paywall-content,section.payment|div.article-locked", + "upd_version": "4.0.8.1" + }, + "NOZ/MHN Mediengruppe": { + "domain": "###_de_noz_mhn", + "group": [ + "noz.de", + "shz.de" + ], + "allow_cookies": 1, + "ld_archive_is": "div.paywall|article", + "upd_version": "4.0.8.4" + }, + "Pirate Wires": { + "allow_cookies": 1, + "domain": "piratewires.com", + "block_regex": "\\.piratewires\\.com\\/_next\\/static\\/chunks\\/1164-.+\\.js", + "useragent_custom": "Mozilla/5.0 (compatible; Twitterbot/1.0)", + "upd_version": "4.0.8.7" + }, + "Repubblica.it": { + "domain": "repubblica.it", + "allow_cookies": 1, + "block_regex": "\\.ampproject\\.org\\/v0\\/amp-subscriptions-.+\\.js", + "amp_redirect": "iframe[id^='__limio_frame']|{path}amp/", + "upd_version": "4.0.8.7" + }, + "The Scottish Sun": { + "domain": "thescottishsun.co.uk", + "allow_cookies": 1, + "block_regex": "\\.thescottishsun\\.co\\.uk\\/zephr\\/feature", + "upd_version": "4.0.7.3" + }, + "Vice": { + "domain": "vice.com", + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"iframe.swg-dialog,swg-popup-background\", \"rm_elem\":1}, {\"cond\":\"body.swg-disable-scroll\", \"rm_class\":\"swg-disable-scroll\"}]", + "upd_version": "4.0.8.6" + } +} diff --git a/updates.xml b/updates.xml new file mode 100644 index 0000000..3a107c1 --- /dev/null +++ b/updates.xml @@ -0,0 +1,6 @@ + + + + + +