commit 4bb4a3dc2596010c01680abab997bd5fa3937cae Author: Dasemu Date: Sun Jan 4 21:20:55 2026 +0100 Repository restored diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..491b850 --- /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..491b850 --- /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..1a235c1 --- /dev/null +++ b/README.html @@ -0,0 +1,984 @@ + + + + + + README.md + + + +

Bypass Paywalls Clean for Firefox

+

Add-on 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

+

Download the latest release by xpi-file from GitHub, go to downloads and install the add-on (or drag it from your file-manager anywhere on a page/tab in Firefox).
+You can also go to Tools > Add-ons (about:addons) > Extensions > Settings/Cogwheel - Install Add-on from File\

+

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). Or just request host permissions for the custom sites you've added yourself (or click clear cookies (BPC-icon) to ask for host permission for current site).
+You can also install the custom add-on version (with host permissions for all sites).

+

For easier access to the add-on options/settings you can add/pin the add-on icon to the toolbar with the toolbar extensions menu (jigsaw puzzle shaped icon).
+Minimum browser requirement: Firefox 86+.

+

PS although the add-on was removed from Mozilla's add-on store (AMO) (because of DMCA Takedown Notice) it's still signed and manually checked for security by Mozilla (hence the delay in signing).

+

If you want to permanently install the latest master ZIP-file from GitHub (with post-release fixes) use a Firefox browser which allows using unsigned add-ons like Firefox Developer Portable (go to about:config and set xpinstall.signatures.required to false) or LibreWolf (for both no automatic updates of add-on).
+Or load a temporary add-on in regular Firefox (go to about:debugging#/runtime/this-firefox & load manifest.json from unpacked (master-zip) folder).

+

Update

+

Add-on will automatically update or you can do a manual check for updates (in about:addons).
+Either way you have to allow host permissions for newly supported sites (else no update will be installed).
+You can also check for update of site rules at startup (opt-in); only available until about 10 days after fix-release.
+For new sites you also have to opt-in to custom sites/request host permissions for new domains (or wait for new release).

+

Android

+

Add-on was removed by Mozilla from the add-on store (AMO).

+

With Firefox 122+ (& Android 10+) you can still install/sideload this add-on by xpi-file of latest release from GitHub (automatic add-on updates) when you enable the debug menu (settings > about > tap Firefox logo 5 times > return to settings).

+

Or use the Firefox-fork Iceraven v2.13.2+ (manual add-on updates).
+You can install/update Iceraven manually or use the app FFUpdater

+

Or switch to Kiwi browser (Chromium) or use the adblocker filter/userscripts (much less supported sites).

+

Chrome/Chromium

+

Manually install latest release by zip or crx-file from GitHub

+

iOS/iPadOS

+

Use adblocker with custom (content)filter & userscript (manager): https://github.com/bpc-clone/bypass-paywalls-clean-filters (read instructions).

+

Although Orion Browser supports installing this add-on, 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 - +Bloomberg - +Business Insider - +CNBC - +Fast Company - +Forbes - +Fortune - +Harvard Business Review - +Inc.com - +Law.com* - +MarketWatch - +MIT Sloan Management Review - +Quartz - +S&P Global - +Seeking Alpha - +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
+

+ Bulletin of the Atomic Scientists - +Chemical & Engineering News - +Discover Magazine - +Inside Higher Ed - +Interesting Engineering - +Medscape - +MIT Technology Review - +National Geographic USA - +Nautilus - +New Scientist - +Popular Science - +Science* - +Scientific American - +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 - +SlideShare - +Statista - +StuDocu - +Study.com (only lessons; no videos)

+
Sports
+

+ ESPN USA - +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 - +Jane's Defence Weekly - +Jazziz - +Jazzwise - +National Review - +Newsweek - +Outdoor Life - +Project Syndicate - +Slate - +SofRep - +Stereogum - +Stratfor - +Texas Monthly - +The American Conservative - +The American Interest - +The Art Newspaper - +The Atlantic - +The Baffler - +The Christian Science Monitor - +The Intercept - +The Daily Beast - +The Daily Wire - +The Diplomat - +The Impression - +The Juggernaut - +The Lamp Magazine - +The Nation - +The New Atlantis - +The New Republic - +The New York Review of Books - +The Point Magazine - +The Spectator World - +The Verge - +The Week - +The Wrap - +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 cz|de|fr|jp|ro sites)
Epoch.org.il - +The Epoch Times

+
Local USA news
+

+ Albuquerque Journal - +CNN - +Fox News - +Honolulu Star-Advertiser - +Los Angeles Times - +Mountain View Voice - +New York Magazine (+ Curbed, Grub Street, The Cut & Vulture) - +Newsday - +Palo Alto Online - +Pittsburgh Post Gazette - +San Diego Union Tribune - +Star Tribune - +Tampa Bay Times - +The Advocate - +The Boston Globe - +The Columbian - +The Dallas Morning News - +The Hill - +The New Orleans Advocate/The Times-Picayune - +The New York Post - +The New York Sun - +The Salt Lake Tribune - +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
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 - +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)
TownNews sites (Blox CMS) sites (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 - +Saltwire Network - +The Globe and Mail - +The Hill Times - +The Lawyer's Daily - +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

+

Europe

+

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

+
United Kingdom/Ireland
+

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

+

Grouped in options:
Haymarket Media Group sites (opt-in to custom sites)
Haymarket Medical Network sites (opt-in to custom sites)
Incisive Media sites (opt-in to custom sites)
National World Publishing sites like (opt-in to custom sites for unlisted)
The Scotsman - +Yorkshire Post
Newsquest Media Group sites (opt-in to custom sites)
The Stage Media sites like:
The Bookseller - +The Stage

+
Denmark
+

+ Berlingske +

+
Finland
+

+ Suomen Sotilas +

+
France/Wallonia
+

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

+

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)
Le Moniteur - +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 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
+

+ Ärzte Zeitung - +Augsburger Allgemeine - +Automobilwoche - +Berliner Zeitung - +Bild - +Börsen-Zeitung - +Cicero - +Der Aktionär - +Der Freitag - +Der Spiegel - +Der Tagesspiegel - +Die Presse - +Die Welt - +Die Zeit - +Frankfurter Allgemeine Zeitung - +Freie Presse - +Jacobin Magazin - +Kölner Stadt-Anzeiger - +Kölnische Rundschau - +Krautreporter - +Kurier.at - +Mitteldeutsche Zeitung - +Neue Westfälische - +Nordwest Zeitung - +Philosophie Magazin - +Piqd - +Profil.at - +Rhein-Zeitung - +Salzburger Nachrichten - +Schwäbische Zeitung - +Spektrum - +Springer Medizin - +Süddeutsche Zeitung - +Südkurier - +Tiroler Tageszeitung - +Volksstimme - +Vorarlberg Nachrichten - +Vorarlberg Online - +Weltkunst - +Weser-Kurier - +WirtschaftsWoche

+

Grouped in options:
Deutscher Fachverlag Mediengruppe (opt-in to custom sites)
Funke Mediengruppe sites like
Berliner Morgenpost - +Braunschweiger Zeitung - +Hamburger Abendblatt - +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
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
Media Group Westfalen sites like (opt-in to custom sites for unlisted)
Ruhr Nachrichten
Medienholding Süd sites like (opt-in to custom sites for unlisted)
Schwarzwälder Bote - +Stuttgarter Nachrichten - +Stuttgarter Zeitung
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 - +Schweriner Volkszeitung
OVB Media sites like (opt-in to custom sites for ovb24.de news portals)
Oberbayerisches Volksblatt
Verlagsgruppe Rhein Main sites like (opt-in to custom sites for unlisted)
Allgemeine Zeitung (Mainz) - +Darmstädter Echo - +Wiesbadener Kurier

+
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 - +Tuttosport

+

Grouped in options:
Gruppo GEDI.it sites like
Huffingtonpost.it - +Il Secolo XIX - +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 Limburger - +De Tijd - +Doorbraak - +Financieele Dagblad - +Follow the Money - +Groene Amsterdammer - +Het Laatste Nieuws - +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 - +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
+

+ Dagsavisen +
+Grouped in options:
NHST Media Group sites like
Europower - +Fiskeribladet - +Intrafish - +Intrafish.no - +Recharge - +TradeWinds - +Upstream

+
Poland
+

+ Polityka - +Rzeczpospolita

+

Grouped in options:
Ringier Axel Springer Polska sites like
Auto Swiat - +Business Insider - +Forbes - +Komputer Swiat - +Newsweek - +Onet

+
Portugal
+

+ Correio da Manhã - +Expresso - +Observador - +Record - +Sábado

+
Russia
+

+ Wonderzine +

+
Spain
+

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

+

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 - +Dagens Industri - +NyTeknik

+

Grouped in options:
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

+

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

+
Australia/New Zealand
+

+ 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 - +Northern Territory News - +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 - +Inc. Australia - +Smart Company - +The Mandarin

+
China, Hong Kong & Taiwan
+

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

+
India
+

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

+
Israel
+

+ Globes - +The Jerusalem Post - +Ynet

+

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

+
Japan
+

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

+
Singapore
+

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

+

Latin America

+
Argentina
+

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

+

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

+
Brazil
+

+ CartaCapital - +Correio do Povo - +Crusoé - +Estado de Minas - +Exame - +GaúchaZH - +Gazeta do Povo - +Grupo Abril - +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 Segunda - +La Tercera

+
Colombia
+

+ Cambio Colombia - +El Espectador - +El Tiempo

+
Mexico
+

+ 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 sites

+
    +
  1. Open incognito window and search for article in Google search (or webcache).
  2. +
  3. Clear cookies for the site (by this add-on: 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 add-on).
  6. +
  7. Add the domain as custom site for more bypass options.
  8. +
  9. Open page in reader view (by browser or add-on).
  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 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..d0bef5c --- /dev/null +++ b/README.md @@ -0,0 +1,1106 @@ +# Bypass Paywalls Clean for Firefox + +Add-on 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 +Download the latest release by [xpi-file from GitHub](https://github.com/bpc-clone/bpc_updates/releases/latest), go to downloads and install the add-on (or drag it from your file-manager anywhere on a page/tab in Firefox).\ +You can also go to Tools > Add-ons (about:addons) > Extensions > Settings/Cogwheel - Install Add-on from File\ + +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). Or just request host permissions for the custom sites you've added yourself (or click *clear cookies* (BPC-icon) to ask for host permission for current site).\ +You can also install the custom add-on version (with host permissions for all sites). + +For easier access to the add-on options/settings you can add/pin the add-on icon to the toolbar with the toolbar extensions menu (jigsaw puzzle shaped icon).\ +Minimum browser requirement: Firefox 86+. + +PS although the add-on was removed from [Mozilla's add-on store (AMO)](https://addons.mozilla.org) (because of DMCA Takedown Notice) it's still signed and manually checked for security by Mozilla (hence the delay in signing). + +If you want to permanently install the latest [master ZIP-file from GitHub](https://github.com/bpc-clone/bpc_updates/releases/latest/download/bypass-paywalls-firefox-clean-master.zip) (with post-release fixes) use a Firefox browser which allows using unsigned add-ons like Firefox Developer Portable (go to about:config and set xpinstall.signatures.required to false) or LibreWolf (for both no automatic updates of add-on).\ +Or load a temporary add-on in regular Firefox (go to about:debugging#/runtime/this-firefox & load manifest.json from unpacked (master-zip) folder). + +### Update +Add-on will automatically update or you can do a manual check for updates (in about:addons).\ +Either way you have to allow host permissions for newly supported sites (else no update will be installed).\ +You can also check for update of site rules at startup (opt-in); only available until about 10 days after fix-release.\ +For new sites you also have to opt-in to custom sites/request host permissions for new domains (or wait for new release). + +### Android +Add-on was removed by Mozilla from the [add-on store (AMO)](https://addons.mozilla.org). + +With Firefox 122+ (& Android 10+) you can still install/sideload this add-on by [xpi-file of latest release from GitHub](https://github.com/bpc-clone/bpc_updates/releases/latest) (automatic add-on updates) when you enable the debug menu (settings > about > tap Firefox logo 5 times > return to settings). + +Or use the Firefox-fork [Iceraven](https://github.com/fork-maintainers/iceraven-browser) v2.13.2+ (manual add-on updates).\ +You can install/update Iceraven manually or use the app [FFUpdater](https://github.com/Tobi823/ffupdater) + +Or switch to [Kiwi browser (Chromium)](https://play.google.com/store/apps/details?id=com.kiwibrowser.browser) or use the [adblocker filter/userscripts](https://github.com/bpc-clone/bypass-paywalls-clean-filters) (much less supported sites). + +#### Chrome/Chromium +Manually install [latest release by zip or crx-file from GitHub](https://github.com/bpc-clone/bpc_updates/releases/latest) + +#### iOS/iPadOS +Use adblocker with custom (content)filter & userscript (manager): https://github.com/bpc-clone/bypass-paywalls-clean-filters (read instructions). + +Although [Orion Browser](https://apps.apple.com/us/app/orion-browser-by-kagi/id1484498200) supports installing this add-on, 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 add-on's icon 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. +* Some sites need to redirect to an amp-page (this may cause a redirect-loop by an amp-to-html add-on or browser setting). +* If none of these work, you can [submit an issue on X](https://twitter.com/Magnolia1234B). +* This add-on works best alongside the adblocker [uBlock Origin](https://addons.mozilla.org/firefox/addon/ublock-origin). +* 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-firefox) + +### 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) - +[Bloomberg](https://www.bloomberg.com) - +[Business Insider](https://www.businessinsider.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) - +[Law.com](https://www.law.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) - +[Seeking Alpha](https://seekingalpha.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 +[Bulletin of the Atomic Scientists](https://thebulletin.org) - +[Chemical & Engineering News](https://cen.acs.org) - +[Discover Magazine](https://www.discovermagazine.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)* - +[Scientific American](https://www.scientificamerican.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) - +[SlideShare](https://www.slideshare.net) - +[Statista](https://www.statista.com) - +[StuDocu](https://www.studocu.com) - +[Study.com (only lessons; no videos)](https://study.com) + +###### Sports +[ESPN USA](https://www.espn.com) - +[RugbyPass](https://www.rugbypass.com) - +[Sports Illustrated](https://www.si.com) - +[The Athletic](https://theathletic.com) + +##### 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) - +[Jane's Defence Weekly](https://www.janes.com/defence-news/) - +[Jazziz](https://www.jazziz.com) - +[Jazzwise](https://www.jazzwise.com) - +[National Review](https://www.nationalreview.com) - +[Newsweek](https://www.newsweek.com) - +[Outdoor Life](https://www.outdoorlife.com) - +[Project Syndicate](https://www.project-syndicate.org) - +[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 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 Intercept](https://theintercept.com) - +[The Daily Beast](https://www.thedailybeast.com) - +[The Daily Wire](https://www.dailywire.com) - +[The Diplomat](https://thediplomat.com) - +[The Impression](https://theimpression.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 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) - +[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 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) - +[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) - +[San Diego Union Tribune](https://www.sandiegouniontribune.com) - +[Star Tribune](https://www.startribune.com) - +[Tampa Bay Times](https://www.tampabay.com) - +[The Advocate](https://www.theadvocate.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 Orleans Advocate/The Times-Picayune](https://www.nola.com) - +[The New York Post](https://nypost.com) - +[The New York Sun](https://www.nysun.com) - +[The Salt Lake Tribune](https://www.sltrib.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)\ +*[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) - +[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)\ +*TownNews sites (Blox CMS)* sites (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) - +[Saltwire Network](https://www.saltwire.com) - +[The Globe and Mail](https://www.theglobeandmail.com) - +[The Hill Times](https://www.hilltimes.com) - +[The Lawyer's Daily](https://www.thelawyersdaily.ca) - +[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) + +#### 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) - +[Citywire](https://www.citywire.com) - +[Daily Mail](https://www.dailymail.co.uk) - +[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) - +[New Left Review](https://newleftreview.org) - +[Private Equity News](https://www.penews.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 Independent](https://www.independent.co.uk) - +[The Irish Examiner](https://www.irishexaminer.com) - +[The Irish Times](https://www.irishtimes.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.co.uk) - +[The Times Literary Supplement](https://www.the-tls.co.uk) - +[UnHerd](https://unherd.com) + +Grouped in options:\ +*[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)\ +*[Incisive Media](https://www.incisivemedia.com/brands)* 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)\ +*[Newsquest Media Group](https://www.newsquest.co.uk/news-brands)* sites (opt-in to custom sites)\ +*The Stage Media* sites like:\ +[The Bookseller](https://www.thebookseller.com) - +[The Stage](https://www.thestage.co.uk) + +##### Denmark +[Berlingske](https://www.berlingske.dk) + +##### Finland +[Suomen Sotilas](https://suomensotilas.fi) + +##### France/Wallonia +[60 Millions de consommateurs](https://www.60millions-mag.com) - +[Alternatives Economiques](https://www.alternatives-economiques.fr) - +[Atlantico](https://atlantico.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) - +[Ciel & espace](https://www.cieletespace.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) - +[L'Écho](https://lecho.be) - +[L'Express](https://www.lexpress.fr) - +[L'Humanité](https://www.humanite.fr) - +[L'Informé](https://www.linforme.com) - +[L'Obs](https://www.nouvelobs.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) - +[La Tribune](https://www.latribune.fr) - +[Le Courrier des Stratèges](https://lecourrierdesstrateges.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 Télégramme](https://www.letelegramme.fr) - +[Les Échos](https://www.lesechos.fr) - +[Les Inrockuptibles](https://www.lesinrocks.com) - +[Marianne](https://www.marianne.net) - +[Paris Match](https://www.parismatch.com) - +[Philosophie Magazine](https://www.philomag.com) - +[Pour l'Éco](https://www.pourleco.com) - +[Pour la Science](https://www.pourlascience.fr) - +[Public](https://www.public.fr) - +[Revue Conflits](https://www.revueconflits.com) - +[Science & Vie](https://www.science-et-vie.com) - +[Sciences et Avenir](https://www.sciencesetavenir.fr) - +[Télérama](https://www.telerama.fr) - +[Valeurs Actuelles](https://www.valeursactuelles.com) + +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)\ +[Le Moniteur](https://www.lemoniteur.fr) - +[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 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 +[Ärzte Zeitung](https://www.aerztezeitung.de) - +[Augsburger Allgemeine](https://www.augsburger-allgemeine.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 Aktionär](https://www.deraktionaer.de) - +[Der Freitag](https://www.freitag.de) - +[Der Spiegel](https://www.spiegel.de) - +[Der Tagesspiegel](https://www.tagesspiegel.de) - +[Die Presse](https://www.diepresse.com) - +[Die Welt](https://www.welt.de) - +[Die Zeit](https://www.zeit.de) - +[Frankfurter Allgemeine Zeitung](https://www.faz.net) - +[Freie Presse](https://www.freiepresse.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) - +[Mitteldeutsche Zeitung](https://www.mz.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) - +[Rhein-Zeitung](https://www.rhein-zeitung.de) - +[Salzburger Nachrichten](https://www.sn.at) - +[Schwäbische Zeitung](https://www.schwaebische.de) - +[Spektrum](https://www.spektrum.de) - +[Springer Medizin](https://www.springermedizin.de) - +[Süddeutsche Zeitung](https://www.sueddeutsche.de) - +[Südkurier](https://www.suedkurier.de) - +[Tiroler Tageszeitung](https://www.tt.com) - +[Volksstimme](https://www.volksstimme.de) - +[Vorarlberg Nachrichten](https://www.vn.at) - +[Vorarlberg Online](https://www.vol.at) - +[Weltkunst](https://www.weltkunst.de) - +[Weser-Kurier](https://www.weser-kurier.de) - +[WirtschaftsWoche](https://www.wiwo.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) - +[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)\ +*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)\ +*[Media Group Westfalen](https://mgw.de/portfolio/tageszeitungen)* sites like (opt-in to custom sites for unlisted)\ +[Ruhr Nachrichten](https://www.ruhrnachrichten.de)\ +*Medienholding Süd* sites like (opt-in to custom sites for unlisted)\ +[Schwarzwälder Bote](https://www.schwarzwaelder-bote.de) - +[Stuttgarter Nachrichten](https://www.stuttgarter-nachrichten.de) - +[Stuttgarter Zeitung](https://www.stuttgarter-zeitung.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) - +[Schweriner Volkszeitung](https://www.svz.de)\ +*OVB Media* sites like (opt-in to custom sites for ovb24.de news portals)\ +[Oberbayerisches Volksblatt](https://www.ovb-online.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) + +##### 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) - +[Tuttosport](https://www.tuttosport.com) + +Grouped in options:\ +*Gruppo GEDI.it* sites like\ +[Huffingtonpost.it](https://www.huffingtonpost.it) - +[Il Secolo XIX](https://www.ilsecoloxix.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 Limburger](https://www.limburger.nl) - +[De Tijd](https://www.tijd.be) - +[Doorbraak](https://doorbraak.be) - +[Financieele Dagblad](https://fd.nl) - +[Follow the Money](https://www.ftm.nl) - +[Groene Amsterdammer](https://www.groene.nl) - +[Het Laatste Nieuws](https://www.hln.be) - +[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) - +[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 +[Dagsavisen](https://www.dagsavisen.no)\ +Grouped in options:\ +*NHST Media Group* sites like\ +[Europower](https://www.europower.no) - +[Fiskeribladet](https://www.fiskeribladet.no) - +[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) - +[Rzeczpospolita](https://www.rp.pl) + +Grouped in options:\ +*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) + +##### Portugal +[Correio da Manhã](https://www.cmjornal.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 +[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) + +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) - +[Dagens Industri](https://www.di.se) - +[NyTeknik](https://www.nyteknik.se) + +Grouped in options:\ +*[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) + +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) + +##### Australia/New Zealand + +[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) - +[Northern Territory News](https://www.ntnews.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) - +[Inc. Australia](https://www.inc-aus.com) - +[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) + +##### India +[Bar and Bench](https://www.barandbench.com) - +[Business Standard](https://www.business-standard.com) - +[Hindu Tamil Thisai](https://www.hindutamil.in) - +[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) - +[Mid-Day](https://www.mid-day.com) - +[NDTV Profit](https://www.ndtvprofit.com) - +[Newslaundry](https://www.newslaundry.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 News Minute](https://www.thenewsminute.com) - +[The Quint](https://www.thequint.com) - +[Times of India](https://timesofindia.indiatimes.com) - +[Vikatan](https://www.vikatan.com) + +##### 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 +[Mainichi Shimbun](https://mainichi.jp) - +[Nikkei Asian Review](https://asia.nikkei.com) - +[The Japan Times](https://www.japantimes.co.jp) + +##### Singapore +[Tech in Asia](https://www.techinasia.com)\ +Grouped in options:\ +*SPH Media* sites like\ +[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 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) + +##### Brazil +[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) - +[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 Segunda](https://digital.lasegunda.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) +##### Mexico +[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-firefox) + +### 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 sites +1. Open incognito window and search for article in Google search (or webcache). +2. Clear cookies for the site (by this add-on: 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 add-on). +4. Add the domain as custom site for more bypass options. +5. Open page in reader view (by browser or add-on). +6. Try one of the archive sites: +* 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 Tool test url & copy html (tab) code to https://codebeautify.org/htmlviewer + +### 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 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 +* 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 or Google webcache 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://bitbucket.org/bpc-updates/bpc_updates/downloads/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](changelog.txt). +* [Download the latest release](https://github.com/bpc-clone/bpc_updates/releases/latest) + +### 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-firefox) diff --git a/background.js b/background.js new file mode 100644 index 0000000..60c6015 --- /dev/null +++ b/background.js @@ -0,0 +1,1719 @@ +'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 navigator_ua = navigator.userAgent; +var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile'); +var kiwi_browser = navigator_ua_mobile && (url_loc === 'chrome') && !navigator_ua.toLowerCase().includes('yabrowser') && (navigator_ua.includes('Chrome/') && navigator_ua.match(/Chrome\/(\d+)/)[1] < 116); + +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 = { + '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\/).)*$/, + 'ilsole24ore.com': /^((?!\/ntplus.+\.ilsole24ore\.com\/).)*$/, + '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\/).)*$/, + 'statista.com': /^((?!\.statista\.com\/study\/).)*$/, + 'study.com': /\/study\.com\/.+\/lesson\//, + 'tagesspiegel.de': /^((?!\/(background|checkpoint)\.tagesspiegel\.de\/).)*$/, + 'techinasia.com': /\.techinasia\.com\/.+/, + 'thetimes.co.uk': /^((?!epaper\.thetimes\.co\.uk).)*$/, + 'timeshighereducation.com': /\.timeshighereducation\.com\/((books|features|news|people)\/|.+((\w)+(\-)+){3,}.+|sites\/default\/files\/)/, + 'timesofindia.indiatimes.com': /\/timesofindia\.indiatimes\.com($|\/($|toi-plus(\/.+)?|.+\.cms))/, + 'uol.com.br': /^((?!(conta|email|piaui\.folha)\.uol\.com\.br).)*$/, +} + +for (let domain of au_news_corp_domains) + restrictions[domain] = new RegExp('^((?!todayspaper\\.' + domain.replace(/\./g, '\\.') + '\\/).)*$'); +for (let domain of ch_media_domains) + 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 +var use_google_bot, use_bing_bot, use_facebook_bot, use_useragent_custom, use_useragent_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; +// block contentScript +var cs_block; +// clear localStorage in contentScript +var cs_clear_lclstrg; +// code for contentScript +var cs_code; +// 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 (link[rel="alternate"][type="application/json"][href]) +var ld_json_url; +// load text from archive.is +var ld_archive_is; +// load text from Google webcache +var ld_google_webcache; +// add external link to article +var add_ext_link; + +// custom: block javascript +var block_js_custom = []; +var block_js_custom_ext = []; + +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_facebook_referer = []; + use_google_referer = []; + use_twitter_referer = []; + use_referer_custom = []; + use_referer_custom_obj = {}; + random_ip = {}; + change_headers = []; + amp_unhide = []; + amp_redirect = {}; + cs_block = {}; + cs_clear_lclstrg = []; + cs_code = {}; + ld_json = {}; + ld_json_next = {}; + ld_json_url = {}; + ld_archive_is = {}; + ld_google_webcache = {}; + 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_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(function (err) { + false; + }); +} + +var ext_path = 'https://bitbucket.org/bpc-updates/bpc_updates/downloads/'; +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") +} + +function addRules(domain, rule) { + 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) { + if (!use_useragent_custom.includes(domain)) { + use_useragent_custom.push(domain); + use_useragent_custom_obj[domain] = rule.useragent_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_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.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_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_google_webcache) + ld_google_webcache[domain] = rule.ld_google_webcache; + if (rule.ld_json || rule.ld_json_next || rule.ld_json_url || rule.ld_archive_is || rule.ld_google_webcache || 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.googlebot > 0) + use_google_bot.push(domain); // legacy + if (rule.block_js > 0 || rule.block_javascript > 0) + block_js_custom.push(domain); + if (rule.block_js_ext > 0 || rule.block_javascript_ext > 0) + block_js_custom_ext.push(domain); +} + +function customFlexAddRules(custom_domain, rule) { + addRules(custom_domain, rule); + if (blockedRegexes[custom_domain]) + blockedRegexesDomains.push(custom_domain); + if (blockedJsInline[custom_domain]) { + blockedJsInlineDomains.push(custom_domain); + disableJavascriptInline(); + } + if (rule.useragent || rule.referer || rule.random_ip) + change_headers.push(custom_domain); + if (rule.random_ip) + use_random_ip.push(custom_domain); + ext_api.tabs.reload({bypassCache: true}); +} + +function set_rules(sites, sites_updated, sites_custom) { + initSetRules(); + 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) { + 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 && !(sites_custom[customSite_title].add_ext_link || 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; + } + } + addRules(domain, rule); + } + } + } + blockedRegexesDomains = Object.keys(blockedRegexes); + blockedJsInlineDomains = Object.keys(blockedJsInline); + disableJavascriptInline(); + use_random_ip = Object.keys(random_ip); + change_headers = use_google_bot.concat(use_bing_bot, use_facebook_bot, use_useragent_custom, use_facebook_referer, use_google_referer, use_twitter_referer, use_referer_custom, use_random_ip); +} + +// 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_domains = Object.values(customSites).map(x => x.group ? x.group.split(',').map(x => x.trim()).concat([x.domain]) : x.domain).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; + // reset ungrouped sites + let ungrouped_sites = { + 'The Athletic': 'theathletic.com', + '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 = ['###_au_private_media', '###_ch_ringier', '###_fr_groupe_infopro', '###_pl_ringier', '###_usa_digiday']; + 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_domains, updatedSites_domains_new).filter(x => !enabledSites.includes(x)); + add_grouped_enabled_domains(grouped_sites); + 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_domains, updatedSites_domains_new).filter(x => !enabledSites.includes(x)); + add_grouped_enabled_domains(grouped_sites); + 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_domains = Object.values(sites_custom).map(x => x.group ? x.group.split(',').map(x => x.trim()).concat([x.domain]) : x.domain).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 + 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) + }); + } +}); + +// 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"] +); + +const userAgentMobile = "Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5790.171 Mobile Safari/537.36"; + +// webcache.googleusercontent.com set user-agent to Chrome (on Firefox for Android) +if ((typeof browser === 'object') && navigator_ua_mobile) { + ext_api.webRequest.onBeforeSendHeaders.addListener(function (details) { + let headers = details.requestHeaders; + headers = headers.map(function (header) { + if (header.name.toLowerCase() === 'user-agent') + header.value = userAgentMobile; + return header; + }); + return { + requestHeaders: headers + }; + }, { + urls: ["*://webcache.googleusercontent.com/*"], + types: ["main_frame", "xmlhttprequest"] + }, + ["blocking", "requestHeaders"]); +} + +// economictimes redirect +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + if (!isSiteEnabled(details) || details.url.includes('.com/epaper/') || !navigator_ua_mobile) { + return; + } + var updatedUrl = details.url.split('?')[0].replace('economictimes.indiatimes.com', 'm.economictimes.com'); + return { redirectUrl: updatedUrl }; +}, +{urls:["*://economictimes.indiatimes.com/*?from=mdr"], types:["main_frame"]}, +["blocking"] +); + +// infzm.com redirect to wap (mobile) +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + if (!isSiteEnabled(details)) { + return; + } + var updatedUrl = details.url.replace('.com/contents/', '.com/wap/#/content/'); + return { redirectUrl: updatedUrl }; +}, +{urls:["*://www.infzm.com/contents/*"], types:["main_frame"]}, +["blocking"] +); + +// telegraaf.nl redirect error-page +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + if (!isSiteEnabled(details)) { + return; + } + let updatedUrl = details.url.split('&')[0].replace('error?ref=/', '');; + return { redirectUrl: updatedUrl }; +}, +{urls:["*://www.telegraaf.nl/error?ref=/*"], types:["main_frame"]}, +["blocking"] +); + +// Australia News Corp redirect subscribe to amp +var au_news_corp_no_amp_fix = ['ntnews.com.au']; +var au_news_corp_subscr = au_news_corp_domains.filter(domain => !au_news_corp_no_amp_fix.includes(domain)).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']); + +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); + 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 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_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_google_webcache_domain = matchUrlDomain(Object.keys(ld_google_webcache), url); + if (ld_google_webcache_domain) + bg2csData.ld_google_webcache = ld_google_webcache[ld_google_webcache_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 tab_runs = 5; + for (let n = 0; n < tab_runs; n++) { + setTimeout(function () { + if (!cs_block_domain) { + // run contentScript.js on page + ext_api.tabs.executeScript(tabId, { + file: lib_file, + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError) + return; + ext_api.tabs.executeScript(tabId, { + file: 'contentScript.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }) + }); + // send bg2csData to contentScript.js + if (Object.keys(bg2csData).length) { + setTimeout(function () { + try { + ext_api.tabs.sendMessage(tabId, {msg: "bg2cs", data: bg2csData}); + } catch (err) { + false; + } + }, 500); + } + } // !cs_block_domain + // remove cookies after page load + if (rc_domain_enabled && !['huffingtonpost.it', 'lastampa.it', 'repubblica.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))) { + ext_api.tabs.executeScript(tabId, { + file: 'contentScript_once.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } + // load toggleIcon.js (icon for dark or incognito mode in Chrome)) + if (typeof browser !== 'object') { + ext_api.tabs.executeScript(tabId, { + file: 'options/toggleIcon.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } + } + + var set_var_sites = ['dagsavisen.no', 'journaldemontreal.com', 'journaldequebec.com', 'nzherald.co.nz'].concat(de_madsack_domains); + 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)) { + ext_api.tabs.executeScript(tabId, { + file: 'contentScript_once_var.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } + } + +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); + } +}); + +setTimeout(function () { +setInterval(function () { + let current_date_str = currentDateStr(); + if (last_date_str < current_date_str) { + bpc_count_daily_users(current_date_str); + last_date_str = current_date_str; + } +}, 60 * 60 * 1000); +}, 1000); + +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 = ['timeshighereducation.com']; + 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 && matchUrlDomain(domain_blockjs, details.url) && details.type === 'script') { + return { cancel: true }; + } + + var useUserAgentMobile = false; + var setReferer = false; + +var ignore_types = ['font', 'image', 'stylesheet']; +if (matchUrlDomain(au_news_corp_domains, details.url)) + ignore_types = ['font', 'image', 'stylesheet', 'other', 'script', 'xmlhttprequest']; + +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(es_grupo_vocento_domains, details.url) && mobile) && + !(matchUrlDomain(['economictimes.com', 'economictimes.indiatimes.com'], details.url) && !details.url.split(/\?|#/)[0].endsWith('.cms')) && + !(matchUrlDomain(au_news_corp_domains, details.url) && (details.url.includes('?amp') || (!matchUrlDomain(au_news_corp_no_amp_fix, details.url) && enabledSites.includes('#options_disable_gb_au_news_corp')))) && + !(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); + + // 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(au_news_corp_domains, details.url)) && !matchUrlDomain(['telerama.fr', 'theatlantic.com'], 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 to custom + else if (domain = useragent_customEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": use_useragent_custom_obj[domain] + }) + } + + // 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; + }); + } + + if (kiwi_browser) { + let tabId = details.tabId; + if (tabId !== -1) { + if (['main_frame', 'sub_frame', 'xmlhttprequest'].includes(details.type)) { + ext_api.tabs.get(tabId, function (tab) { + if (!ext_api.runtime.lastError && tab && isSiteEnabled(tab)) { + runOnTab(tab); + } + runOnTab_once(tab); + runOnTab_once_var(tab); + }); + } + } else { + if (['xmlhttprequest'].includes(details.type)) { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let tab = tabs[0]; + if (isSiteEnabled(tab)) { + runOnTab(tab); + } + runOnTab_once(tab); + runOnTab_once_var(tab); + } + }); + } + } + } + + return { requestHeaders: requestHeaders }; +}, { + urls: ['*://*/*'] +}, extraInfoSpec); +// extraInfoSpec is ['blocking', 'requestHeaders'] + possible 'extraHeaders' + +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(function (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); }); + +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('webcache.googleusercontent.com', 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.substring(0, ext_version_len) <= ext_version.substring(0, ext_version_len)) + ext_version_new = ''; + 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(function (err) { + false; + }); + } else + setExtVersionNew(json_ext_version_new); + }) + } + }).catch(function (err) { + false; + }); +} + +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)) { + ext_api.tabs.executeScript({ + file: 'options/clearCookies.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + ext_api.tabs.update(tabs[0].id, { + 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); + } + 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 = ['###_beehiiv', '###_fi_alma_talent', '###_fi_kaleva', '###_ghost', '###_it_citynews', '###_nl_vmnmedia', '###_se_gota_media', '###_substack_custom', '###_uk_delinian', '###_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 (group === '###_de_madsack') { + if (!set_var_sites.includes(custom_domain)) + set_var_sites.push(custom_domain); + } else if (group === '###_usa_townnews') { + if (['berkshireeagle.com'].includes(custom_domain)) + rules.useragent = 'googlebot'; + } + } 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 === '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 === 'getExtSrc' && message.data) { + message.data.html = ''; + function getArticleSrc(message) { + let url_src = message.data.url_src || message.data.url; + fetch(url_src) + .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 (typeof DOMParser === 'function') { + let parser = new DOMParser(); + let doc = parser.parseFromString(html, 'text/html'); + let article_new = doc.querySelector(message.data.selector_source); + if (article_new) + html = article_new.outerHTML; + else + html = ''; + } + } + message.data.html = html; + ext_api.tabs.sendMessage(sender.tab.id, {msg: "showExtSrc", data: message.data}); + } + }); + } + }).catch(function (err) { + ext_api.tabs.sendMessage(sender.tab.id, {msg: "showExtSrc", data: message.data}); + }); + } + getArticleSrc(message); + } + 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('.'); +} + +// 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/bpc_count_daily_users.js b/bpc_count_daily_users.js new file mode 100644 index 0000000..e1d3abf --- /dev/null +++ b/bpc_count_daily_users.js @@ -0,0 +1,45 @@ +var ext_api = (typeof browser === 'object') ? browser : chrome; +var manifestData = ext_api.runtime.getManifest(); +var url_loc = manifestData.key ? 'chrome' : 'firefox'; + +// daily users counter +function bpc_count_daily_users(dateStr) { + ext_api.storage.local.get({ + daily_users: {}, + }, function (items_local) { + daily_users = items_local.daily_users; + if (daily_users.date !== dateStr) { + daily_users.date = dateStr; + ext_api.storage.local.set({ + daily_users: daily_users + }, function () { + true; + }); + let count_json = 'https://bitbucket.org/bpc_redux/bpc-' + url_loc + '-daily-users/downloads/bpc-daily-users-' + dateStr + '.json'; + try { + fetch(count_json, {mode: 'no-cors'}); + let count_mobile_json = 'https://bitbucket.org/bpc_redux/bpc-' + url_loc + '-mobile-daily-users/downloads/bpc-daily-users-' + dateStr + '.json'; + let count_desktop_json = 'https://bitbucket.org/bpc_redux/bpc-' + url_loc + '-desktop-daily-users/downloads/bpc-daily-users-' + dateStr + '.json'; + if (window.navigator && window.navigator.userAgent.match(/(mobile|android)/i)) + fetch(count_mobile_json, {mode: 'no-cors'}); + else + fetch(count_desktop_json, {mode: 'no-cors'}); + } catch (err) { + false; + } + } + }); +} + +function currentDateStr() { + let date = new Date(); + let dateStr = new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString().split("T")[0]; + return dateStr; +} +var last_date_str = currentDateStr(); +var daily_users; +ext_api.storage.local.get({counter: true}, function (result) { + if (result.counter) + bpc_count_daily_users(last_date_str); +}); + diff --git a/bypass-dark.png b/bypass-dark.png new file mode 100644 index 0000000..54af653 Binary files /dev/null and b/bypass-dark.png differ diff --git a/bypass.png b/bypass.png new file mode 100644 index 0000000..6418ed9 Binary files /dev/null and b/bypass.png differ diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..7801040 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,2544 @@ + +Changelog Bypass Paywalls Clean - Firefox +Updates (install signed xpi-file): https://github.com/bpc-clone/bpc_updates/releases/latest (or check X/Twitter) + +Post-release +Add DigiTimes Asia +Add NDTV Profit (former BQ Prime) +Fix El Espanol (css) +Fix Faz.net (ld_json_nuxt) +Fix Seeking Alpha (source) + +* 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 (fix obsolete) +Remove The Banker (fix obsolete) +Fix Humanite.fr +Fix LeMonde.fr (bug; update rules) +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 +Add Newslaundry +Remove Bild.de (fix obsolete) +Remove Hln.be (fix obsolete) +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 obsolete) +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 (fix obsolete) +Remove Dn.se (fix obsolete) +Remove LeFigaro.fr (fix obsolete) +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 (fix obsolete) +Remove EWmagazine.nl (fix obsolete) +Remove Funke Mediengruppe (fix obsolete) +Remove Groupe Rossel (fix obsolete) +Remove Mediahuis Nederland Regional (fix obsolete) +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 obsolete) +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 obsolete) +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) +Maintenance check update signed (self-hosted) + +* 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 (fix obsolete) +Remove Otz.de, Thueringer-allgemeine.de & Tlz.de (Funke; fix obsolete) +Remove Wz.de (fix obsolete) +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 (fix obsolete) +Remove Westfalische Mediengruppe (fix obsolete) +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 useragent/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 Sueddeutsche Zeitung (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 (fix obsolete) +Remove LeTemps.ch (fix obsolete) +Remove Money.it (fix obsolete) +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 +Enable optional host permissions on Android (Firefox 120+) +Update block general paywall script (EverCookie) +Update 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 (fix obsolete) +Remove Groupe EBRA (fix obsolete) +Remove Nordwest Zeitung (fix obsolete) +Remove Wissenschaft.de (fix obsolete) +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; fix obsolete) +Remove The Star Malaysia (fix obsolete) +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) +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 obsolete) +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 (fix obsolete) +Remove Schwarzwaelder-bote.de (fix obsolete) +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 Sueddeutsche Zeitung (link to archive.is) +Add The Epoch Times & Epoch.org.il (+ international; opt-in to custom sites) +Add The Impression +Remove Delinian Group (fix obsolete) +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 (fix obsolete) +Remove Hln.be (fix obsolete) +Remove VosgesMatin.fr (EBRA; fix obsolete) +Fix Albuquerque Journal (css) +Fix Apollo Magazine +Fix Barron's (amp-redirect) +Fix Faz.net (json) +Fix Financial News (London) +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 obsolete) +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 (India) +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 Salzburger Nachrichten +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 (fix obsolete) +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 (India) +Add Vikatan (India) +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) + +* 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 obsolete) +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) + +* 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 obsolete) +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 (proper) +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 (India) +Add Crikey.com.au +Add Swarajyamag (India) +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 obsolete) +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 Süd (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 (fix obsolete) +Remove VmnMedia.nl Group (fix obsolete) +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 (fix obsolete) +Remove Dn.se (fix obsolete) +Remove Golem.de (fix obsolete) +Remove LeFigaro.fr (fix obsolete) +Remove Limburger.nl (fix obsolete) +Remove Quillette (fix obsolete) +Remove Tagesspiegel.de (fix obsolete) +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 (fix obsolete) +Remove LePoint.fr (fix obsolete) +Remove Stratfor (fix obsolete) +Remove The Times Literary Supplement (fix obsolete) +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 Hindu Tamil Thisai (India) +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 (Argentina) +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 (fix obsolete) +Remove Weltkunst.de (fix obsolete) +Fix Challenges.fr & Sciences et Avenir.fr +Fix Defector (cookie) +Fix Mediahuis Noord (json) +Fix Quora (AI bot crash) +Fix TheTimes.co.uk (overlay) +Fix TownNews sites (encrypted) +Update popup (link to Google Search Tool) + +* v3.1.9.0 (2023-05-21) +Remove (custom) Substack (fix obsolete) +Remove Sueddeutsche Zeitung (fix obsolete) +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 obsolete) +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 obsolete) +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 obsolete) +Fix Bloomberg (Live TV limit) +Fix Gannett Group (redirect restricted) +Fix La Vanguardia (xhr) +Fix Mediahuis Noord (refresh) +Fix Roularta Media Group (js) + +* v3.1.5.0 (2023-04-23) +Add Cox First Media (opt-in to custom sites) +Remove NK News (fix obsolete) +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 obsolete) +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 obsolete) +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 obsolete) +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 obsolete) +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 (fix obsolete) +Remove RheinPfalz.de (fix obsolete) +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 (fix obsolete) +Remove TagesAnzeiger.ch (fix obsolete) +Remove Welt.de (fix obsolete) +Fix Berliner Zeitung +Fix Mediahuis Noord +Fix mobile user-agent for Google webcache +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 (fix obsolete) +Remove Lequipe.fr (fix obsolete) +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 The Atlanta Journal-Constitution (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 (fix obsolete) +Remove Finance.si (fix obsolete) +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 +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 (fix obsolete) +Remove L'Opinion.fr (fix obsolete) +Remove Spiegel.de (fix obsolete) +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 (fix obsolete) +Remove Nordwest Zeitung (fix obsolete) +Remove Wiwo.de (fix obsolete) +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) +Update popup (fix clear cookies; custom version) + +* v3.0.1.0 (2023-01-15) +Remove Repubblica.it (fix obsolete) +Remove Republic.ru (fix obsolete) +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 (fix obsolete) +Remove Saarbruecker Zeitung (fix obsolete) +Remove (custom) Substack (fix obsolete) +Remove The-Village.ru (fix obsolete) +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 obsolete) +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 (fix obsolete) +Remove Law360 (fix obsolete) +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 useragent Facebookbot) + +* v2.9.6.0 (2022-12-04) +Add DN.no +Add Sueddeutsche Zeitung (link to archive.is) +Add Welt.de (link to archive.is) +Remove BusinessPost.ie (fix obsolete) +Remove Philonomist (fix obsolete) +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 (fix obsolete) +Remove Mediapart.fr (fix obsolete) +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 obsolete) +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 +Add Record.pt +Add The New York Post +Remove DN.no (fix obsolete) +Remove GElocal.it & Huffintonpost.it (fix obsolete) +Remove Il Secolo XIX, La Stampa & Limes Online (fix obsolete) +Fix Cmjornal.pt +Fix Grupo Vocento +Fix Ksta.de & Rundschau-online.de +Fix La Croix +Fix NHST Media Group +Fix Tagesspiegel.de (link to archive.is) +Fix The Spectator UK +Fix for Kiwi Browser/Android (Chrome-synch) + +* 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 obsolete) +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 +Add NTNews.com.au +Remove Mediahuis Belgie (fix obsolete) +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 NTNews.com.au (fix obsolete) +Remove Nuernberger Nachrichten (fix obsolete) +Fix Corriere dello Sport (subdomains) +Fix GEDI.it (only Googlebot) +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 The Spectator 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 obsolete) +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 (fix obsolete) +Remove Golem.de, Tagesspiegel.de, Welt.de & Wiwo.de (fix obsolete) +Remove World Politics Review (fix obsolete) +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 (load text from 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 obsolete) +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 (Canada) +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 (India) +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 obsolete) +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 (fix obsolete) +Remove Valor Economico (fix obsolete) +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 (fix obsolete) +Remove Study.com (fix obsolete) +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 (India) +Remove Scribd (fix obsolete) +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 The Lawyer's Daily (Canada) +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 obsolete) +Fix Lequipe.fr (json) +Fix Live Law (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 obsolete) +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 obsolete) +Fix Barron's (continue reading) +Fix El Pais (amp/video) +Fix Fortune (magazine) +Fix The Spectator UK (amp-redirect) + +* v2.6.5.0 (2022-04-18) +Add Aftonbladet.se +Add Investors' Chronicle (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 (fix obsolete) +Remove NK News (fix obsolete) +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 obsolete) +Fix Australian Community Media (json) + +* v2.6.1.0 (2022-03-20) +Add Franc-Tireur.fr +Add group Hearst Communications magazines +Add Mid-Day (India) +Add Winnipeg Free Press (Canada) +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 (France) +Add El Tiempo (Colombia) +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 (Canada) +Remove NewcastleHerald.com.au (fix obsolete) +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 obsolete) +Fix Live Law +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 SeekingAlpha (captcha) +Fix TheTimes.co.uk (epaper & archive) +Update block general paywall script (limit NewsMemory) + +* v2.5.5.0 (2022-02-06) +Remove Iltalehti.fi (fix obsolete) +Remove The Logic (fix obsolete) +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 obsolete) +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) +Update popup (no more version-check) + +* v2.5.3.1 (2022-01-23) +Hotfix block inline script + +* 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 (fix obsolete) +Remove De Tijd & L'Echo (fix obsolete) +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 (France) +Add Il Foglio (Italy) +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 (permission to clear cookies) + +* v2.4.9.0 (2021-12-26) +Add El Espectador (Colombia) +Add ESPN USA (news only) +Add Les Inrockuptibles (France) +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 (permission block js) +Fix National Geographic USA (magazine) +Remove tabs-permission (amo - Firefox 86+) + +* v2.4.7.0 (2021-12-12) +Add Ksta.de & Rundschau-online.de +Add The (New Orleans) Advocate +Remove Caixin Global (fix obsolete) +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 (permissions for listed sites) +Fix Live Law (permission) +Fix The Business of Fashion +Fix The New Yorker (amp) +Fix TheTimes.co.uk (only link to archive.today) +Remove Saechsische Zeitung (fix obsolete) +Updated sites: check (options) & missing permission (badge) + +* v2.4.5.0 (2021-11-21) +Add Advance Local (local USA) +Add Code Sports (Australia) +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 obsolete) +Fix ElMundo.es (amp) +Fix Lee Enterprises Group +Fix LesEchos.fr (json) +Fix WaPo (images) +Fix WSJ (timing) +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 Boston Globe (incognito mode) +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 (France) +Remove Irish Times (fix obsolete) +Remove Sueddeutsche Zeitung (fix obsolete) +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 Athletic +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 (Germany) +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 (fix obsolete) +Remove Republic.ru (fix obsolete) +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 +Update daily users counter (amo) + +* v2.3.7.0 (2021-09-26) +Add Aachener-Zeitung.de +Add Grupo Prensa Iberica (Spain) +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 obsolete) +Fix Estadao.com.br +Fix Gestion & El Comercio (Peru) +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 Live Law (India) +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 (India) +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 (Spain) +Grouping Quotidiano.net sites (Italy) +Remove Le Un (fix obsolete) +Fix Australia Nine sites +Fix Commentary Magazine (new domain) +Fix Gestion & El Comercio (Peru) +Fix Grupo Vocento +Fix Financial News (London) +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 useragent/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 obsolete) +Fix blocked referer +Update custom sites (set useragent 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 Tribune Publishing Company (overlay) +Fix The Globe and Mail +Fix The Spectator UK (amp) + +* 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 The Atlanta Journal-Constitution (local USA) +Fix Modern Healthcare + +* v2.2.3.0 (2021-05-30) +Add Grupo Abril (Brazil) +Add Hindustan Times (India) +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 (India) +Remove Mitteldeutsche Zeitung (fix obsolete) +Fix Medium/Towards Data Science +Fix National Geographic USA +Fix Prensa Iberica +Fix Saechsische Zeitung (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 (Spain) +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 (Chile) +Fix Reuters + +* v2.1.9.0 (2021-05-02) +Add GenomeWeb, 360Dx & Precision Oncology News +Add Levante-EMV (Spain) +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 (Italy) +Add L'Express.fr +Add La Nazione (Italy) +Add The Athletic +Remove Rheinische Post Mediengruppe (fix obsolete) +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 (France) +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 (Spain) +Add Mitteldeutsche Zeitung (Germany) +Add Thueringische Landeszeitung (Germany) +Fix Australian Community Media (anti-adblock) +Fix Gannett Group (identify on xhr only) +Fix La Stampa + +*v2.1.1.2 (2021-03-09) +Add Newsday (local USA) +Fix Gazet van Antwerpen (amo: remove external mediaplayer scripts) + +* v2.1.1.0 (2021-03-07) +Add Atlantico (France) +Add Politica Exterior (Spain) +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-21) +Fix options/cookie storeId (Firefox Android) + +* v2.0.9.0 (2021-02-21) +Add Daily Nation (Kenya) +Add Houston Chronicle (USA) +Add Schleswig-Holsteinischer Zeitungsverlag (Germany) +Add Sports Illustrated +Fix Groupe LaDepeche.fr +Fix La Croix (timing) +Grouping Repubblica.it sites (rules only) +Fix popup (update notification; GitLab CORS issue) +Fix private window (cookies/popup) +Update incognito window (Chrome-only split mode) +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 (Germany) +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 (Spain) +Add Finance.si (Slovenia) +Add Law.com (free articles only) +Add Le Un (France) +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 (Australia) +Add Stratfor +Add The Hill Times (Canada) +Add The Jerusalem Post (Israel) +Fix Adweek (amp for premium) +Fix El Mercurio (Chile) +Fix El Pais (premium/images) +Fix Funke Mediengruppe (OTZ & TA) +Update custom sites (block Javascript) + +* v2.0.5.0 (2021-01-24) +Add Ambito (Argentina) +Add Cmjornal.pt +Add El Confidencial (Spain) +Add elDiario.es +Add La Nueva Espana +Add Observador.pt +Add Prospect Magazine (United Kingdom) +Add RuhrNachrichten.de +Add The Point Magazine +Fix El Pais (Spain) +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 (Italy) +Add L'Usine Nouvelle (France) +Add LaNuovaSardegna.it +Add Schweriner Volkszeitung (Germany) +Add SudOuest.fr +Fix Discover Magazine +Fix Faz.net (Zeitung subdomain) +Fix Funke Medien (Germany) +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 (Canada) +Add New Left Review (United Kingdom) +Fix SeekingAlpha (amp) +Fix Toronto Star (overlay) +Update options (excluded sites) + +* v2.0.2.0 (2021-01-03) +Add La Vanguardia (Spain) +Fix Belfast Telegraph & Independent.ie (amp) +Fix Gestion & El Comercio (Peru) +Fix SeekingAlpha (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 (Spain) +Add FreiePresse.de +Add L'Obs (France) +Add Paris Match (France) +Fix El Mercurio (Chile) +Fix/restore El Pais (Spain) + +* v2.0.0.0 (2020-12-20) +Add Krautreporter (Germany) +Add Piqd (Germany) +Fix Foreign Affairs +Fix Paris-Normandie.fr (Groupe Rossel) +Fix Tech in Asia (homepage) +Fix show update (amo-version) + +* v1.9.9.0 (2020-12-13) +Add Berlingske.dk +Add EUobserver +Add Funke Mediengruppe (Germany) +Add Groupe EBRA (France) +Add Groupe LaDepeche.fr +Add Madsack Mediengruppe (Germany) +Fix Australian Financial Review (images) +Fix Bloomberg (inline articles/adblocker) +Fix El Pais (Spain) +Fix Funke Medien (obfuscated) +Update grouped sites (popup-toggle) + +* v1.9.8.0 (2020-12-06) +Add El Comercio, Ideal & La Voz de Cadiz (Spain) +Add Esprit.presse.fr +Add Groupe Rossel (France/Belgium) +Add The Spectator USA +Remove Aftonbladet.se (fix obsolete) +Remove NK News (fix obsolete) +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 (France) +Add The Hindu BusinessLine (India) +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 (Chile) +Fix LesEchos.fr (timing/banners) +Fix Newsweek (Pelcro) +GitLab transfer + +* v1.9.5.0 (2020-11-15) +Add AlternativesEconomiques.fr +Add Financial Post (Canada) +Add La Estrella de Valparaiso (Chile) +Add Saechsische Zeitung (Germany) +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 Sueddeutsche Zeitung (+ magazine) +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 (Italy) +Add Kurier.at +Add L'Orient-Le Jour (Lebanon) +Add The Logic (Canada) +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 (Italy) +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) +Option to clear cookies & local storage (of site) + +* v1.9.0.0 (2020-10-11) +Add Slate +Remove BusinessTimes.com.sg (fix obsolete) +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 (Italy) +Fix El Pais (Spain) +Fix The Globe and Mail (FF for Android v68) +Fix The Hindu (menu) +Fix WSJ +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 obsolete) +Fix National Review (amp for plus) +Minor update opt-in UI + +* v1.8.7.0 (2020-09-20) +Add Business Times (Singapore) +Add Domani (Italy) +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 (fix obsolete) +Remove The Athletic (fix obsolete) +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 (Chile) +Add El Mercurio de Valparaiso (Chile) +Fix Financial Times (remove copy-notice) +Fix MIT Technology Review +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 (Chile) +Add LeSoir.be +Add Sueddeutsche Zeitung (amp for plus) +Fix elMercurio Legal (Chile) +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 (Chile) +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 (Italy) +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 obsolete) +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 SeekingAlpha (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 +Add block general paywall scripts: BlueConic, OneCount, Qiota & TribDss. Remove Outbrain. + +* v1.7.3.0 (2020-05-24) +Add ilManifesto.it +Fix Gestion.pe/ElComercio.pe +Fix Haaretz English (anti-adblocker) +Fix LeJdD.fr +Limit contentScript on external content + +* v1.7.2.0 (2020-05-17) +Add Globes (Israel) +Fix Challenges.fr (proper) +Fix Nzz.ch (banners) +Fix The Hindu (timing issue) +Fix WSJ (timing issues) +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 +Resynch Chrome/Firefox code + +* v1.7.0.5 (2020-04-28) +BitBucket transfer + +* v1.7.0.4 (2020-04-26) +Add Frankfurter Allgemeine (Faz.net) +Fix Gestion.pe/ElComercio.pe +Fix ilMessaggero.it +Fix WSJ (lift restrictions) + +* v1.7.0.3 (2020-04-22) +Add Philosophy Now +Add Eureka Report, Intelligent Investor & Switzer Report (Australia) +Remove LeMonde.fr (fix obsolete) +Maintenance Ad.nl (regional) +Sort-button custom sites + +* v1.7.0.2 (2020-04-05) +Add Gestion (Peru) & fix El Comercio +Add LeScienze.it +Add Science & Vie +Fix Barron's links to sign in/read more articles +Fix Challenges.fr +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 (Peru) +Add L'Opinion.fr +Add LiveMint (India) +Add Neue Zuercher Zeitung +Add The New Republic +Remove ET Prime (fix obsolete) +Fix Telegraaf.nl +Fix blocking Javascript for new (custom)sites +Maintenance contentScript.js +Synching Chrome/Firefox scripts + +* v1.6.9.1 (2020-03-22) +Add LaDepeche.fr +Fix Barron's (remove cookies) +Fix DeMorgen.be +Fix WSJ (cookie-fix) + +* v1.6.6.6 (2020-03-17) +Fix Financial Times +Update (custom)options UI + +* v1.6.6.5 (2020-03-10) +Add The Athletic UK +Add Il Messaggero (Italy) +Fix Corriere Della Sera +Update version-check (replace innerHTML) + +* v1.6.6.4 (2020-03-09) +Add Aftonbladet.se +Fix Australian Community Media newspapers +Fix Economist (inactive links) +Fix Corriere Della Sera +Fix custom sites (domains with capitals) +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-synch) + +* v1.6.6.3 (2020-03-03) +Fix Lc.nl & DvhN.nl (newsletter) +Fix Repubblica.it +Show badge-notification if active on tab +Update custom sites UI (delete site) + +* v1.6.6.2 (2020-03-02) +Add The Port Macquarie News (Australia) +Remove NK News (fix obsolete) + +* v1.6.6.1 (2020-02-28) +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.4.4 (2020-02-20) +Add Australian Community Media (daily) +Add Clarin (Argentina) +Add WAtoday (Australia) +Fix TheNation paywall-script block +Refresh tab after saved options +Fix Leeuwarder Courant +Fix Corriere Della Sera + +* v1.6.4.3 (2020-02-12) +Add CommonWealth Magazine Taiwan +Add El Mercurio (Chile) +Add Lc.nl & DvhN.nl + +* v1.6.4.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.4.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 Townsville Bulletin (url) +Fix Wall Street Journal (blogs) + +* v1.6.4.0 (2020-01-28) +Synch sites with chrome extension (adding 31 sites and removing 3 obsolete ones) +Fix London Review of Books (allow cookies) + +* v1.6.3.6 (2020-01-15) +Fix json-bug at install/options (when not saving options) + +* v1.6.3.5 (2020-01-14) +Load sites from json +Block general paywall scripts (like TinyPass/Piano) + +* v1.6.3.4 (2020-01-13) +Add sites on Medium platform (remove cookies) +Fix The New Statesman (version US/UK) +Remove The Athletic trial-banners + +* v1.6.3.3 (2020-01-12) +Add Lecho.be +Add LesEchos.fr +Add Scribd (unblur text of documents) +Add Tech in Asia +Add The Athletic +Fix Australian Financial Review (enable Javascript/photos) +Fix Caixin Global +Fix LeParisien.fr (block TinyPass paywall) +Fix LesEchos.fr (block TinyPass) +Fix Economist (Javascript/cookies) +Fix Handelsblatt (Googlebot) +Fix MIT Tech Review +Fix Newcastle Herald (+ new domain) +Fix NYTimes (layout) +Fix The Globe and Mail +Fix Toronto Star (enable Javascript) +Fix banners on TheTimes.co.uk, Bloomberg, Asia Nikkei, Haaretz English & Hbr.org +Fix Statistica & Bloomberg Quint (manifest) + +* v1.6.3.0 (2019-12-15) +Add ET Prime +Add Harper's Magazine +Add LeParisien.fr +Add London Review of Books +Add NK News +Add Philadelphia Inquirer +Add The Times Literary Supplement +Fix Boston Globe (fix for blocking scripts while site restrictions) +Fix Economist (new option to block external scripts) +Fix ET Prime restrictions (now with regular expressions) +Fix ET Prime (bug in isSiteEnabled) +Fix Foreign Policy (block paywall-script) +Fix Quartz (gdpr) +Fix Spectator.co.uk (block paywall-script) +Fix WSJ (cookie-fix for reformatting & restriction to only articles) + +* v1.6.2.0 (2019-11-23) +Add DeMorgen.be +Add Scientific American (only free articles) +Add TheHindu +Fix Ad.nl/Ed.nl (cookie) +Fix Bloomberg (bot-alert) +Fix Caixin Global +Fix Le Monde support +Fix NYTimes (subscription form) +Fix Quora (read more) +Fix Telegraaf.nl (timing issue) +Fix The Atlantic (cookie) + +* v1.6.0.0 (2019-10-28) +Add Dutch papers: ad.nl, ed.nl, parool.nl, trouw.nl, telegraaf.nl +Add Dutch magazines: groene.nl, vn.nl +Add Le Monde +Fix Quartz +Fix WaPo (gdpr-banner) +Fix WSJ (Googlebot; mod=rsswn obsolete) diff --git a/contentScript.js b/contentScript.js new file mode 100644 index 0000000..282e37f --- /dev/null +++ b/contentScript.js @@ -0,0 +1,7278 @@ +//"use strict"; +var ext_api = (typeof browser === 'object') ? browser : chrome; +var mobile = window.navigator.userAgent.toLowerCase().includes('mobile'); +var content; +var domain; +var func_post; +var csDone; +var csDoneOnce; +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']; +var be_groupe_ipm_domains = ['dhnet.be', 'lalibre.be', 'lavenir.net']; +var be_mediahuis_domains = ['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 de_funke_medien_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'tlz.de', 'waz.de', 'wp.de', 'wr.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']; +var de_mhs_custom_domains = ['cannstatter-zeitung.de', 'esslinger-zeitung.de', 'frankenpost.de', 'insuedthueringen.de', 'krzbb.de', 'kurier.de', 'np-coburg.de']; +var de_motor_presse_domains = ['aerokurier.de', 'auto-motor-und-sport.de', 'flugrevue.de', 'motorradonline.de', 'womenshealth.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', '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', 'ilsecoloxix.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 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_nhst_media_domains = ['europower.no', 'fiskeribladet.no', '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 = ['straitstimes.com']; +var timesofindia_domains = ['epaper.indiatimes.com', 'timesofindia.com', 'timesofindia.indiatimes.com']; +var uk_incisive_media_domains = ['businessgreen.com', 'internationalinvestment.net', 'investmentweek.co.uk', 'professionaladviser.com', 'professionalpensions.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', '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', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com']; + +// clean local storage (when allow cookies) +if (matchDomain(['bloomberg.com', 'csmonitor.com', 'exame.com', 'slideshare.net'])) { + window.localStorage.clear(); +} + +function runOnMessage(bg2csData, dompurify_loaded) { +// clear local storage (when remove cookies) +if (bg2csData.cs_clear_lclstrg && !matchDomain(['nationalreview.com', 'thecritic.co.uk'].concat(usa_mcc_domains))) + window.localStorage.clear(); +// custom/updated sites: load text from json (script[type="application/ld+json"]) +if (bg2csData.ld_json && dompurify_loaded) { + if (bg2csData.ld_json.includes('|')) { + window.setTimeout(function () { + let ld_json_split = bg2csData.ld_json.split('|'); + let paywall_sel = ld_json_split[0]; + let article_sel = ld_json_split[1]; + let paywall = document.querySelectorAll(paywall_sel); + let article = document.querySelector(article_sel); + let article_append = ld_json_split[2];// optional + if (paywall.length && article) { + removeDOMElement(...paywall); + let json_script = getArticleJsonScript(); + if (json_script) { + try { + let json = JSON.parse(json_script.text.replace(/[\r\n]/g, '').replace(/(\\r)?\\n/g, '
')); + let json_key, json_text; + if (Array.isArray(json)) { + json = json.filter(x => Object.keys(x).find(key => key.match(/^articlebody$/i))) || json.filter(x => Object.keys(x).find(key => key.match(/^text$/i))); + if (json[0]) { + json_key = Object.keys(json[0]).find(key => key.match(/^(articlebody|text)$/i)); + if (json_key) + json_text = parseHtmlEntities(json[0][json_key]); + } + } else { + json_key = Object.keys(json).find(key => key.match(/^articlebody$/i)) || Object.keys(json).find(key => key.match(/^text$/i)); + json_text = parseHtmlEntities(json[json_key]); + } + if (json_text) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(breakText(json_text).replace(/\n\n/g, '

'), dompurify_options) + '
', 'text/html'); + let article_new = doc.querySelector('div'); + if (article_append || !article.parentNode) { + 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) { + if (bg2csData.ld_json_next.includes('|')) { + window.setTimeout(function () { + let ld_json_next_split = bg2csData.ld_json_next.split('|'); + let paywall_sel = ld_json_next_split[0]; + let article_sel = ld_json_next_split[1]; + let paywall = document.querySelectorAll(paywall_sel); + let article = document.querySelector(article_sel); + let article_append = ld_json_next_split[2]; // optional + 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 && !window.location.pathname.endsWith(url_next)) + refreshCurrentTab(); + let json_text = parseHtmlEntities(findKeyJson(json, ['body', 'content', 'contentHtml', 'description'], 500)); + 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) { + 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) { + if (bg2csData.ld_json_url.includes('|')) { + window.setTimeout(function () { + let ld_json_url_split = bg2csData.ld_json_url.split('|'); + let paywall_sel = ld_json_url_split[0]; + let article_sel = ld_json_url_split[1]; + // optional + let article_append = ld_json_url_split[2]; + let article_hold = ld_json_url_split[3]; + let article_id_sel = ld_json_url_split[4]; + 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; + } + getJsonUrl(paywall_sel, '', article_sel, {art_append: article_append, art_hold: article_hold, art_style: 'margin: 25px 0px;'}, article_id); + }, 1000); + } +} + +// custom/updated sites: load text from archive.is +if (bg2csData.ld_archive_is && dompurify_loaded) { + if (bg2csData.ld_archive_is.includes('|')) { + window.setTimeout(function () { + let url = window.location.href; + let ld_archive_is_split = bg2csData.ld_archive_is.split('|'); + let paywall_sel = ld_archive_is_split[0]; + let article_sel = ld_archive_is_split[1]; + let article_src_sel = ld_archive_is_split[2] || article_sel; // optional + let article_link_sel = ld_archive_is_split[3] || article_sel; // optional + getArchive(url, paywall_sel, '', article_sel, '', article_src_sel, article_link_sel); + }, 1000); + } +} + +// custom/updated sites: load text from Google webcache +if (bg2csData.ld_google_webcache && dompurify_loaded) { + if (bg2csData.ld_google_webcache.includes('|')) { + window.setTimeout(function () { + let url = window.location.href; + let ld_google_webcache_split = bg2csData.ld_google_webcache.split('|'); + let paywall_sel = ld_google_webcache_split[0]; + let article_sel = ld_google_webcache_split[1]; + getGoogleWebcache(url, paywall_sel, '', article_sel); + }, 1000); + } +} + +// custom/updated sites: add link to article +if (bg2csData.add_ext_link) { + if (bg2csData.add_ext_link.css && bg2csData.add_ext_link.css.includes('|') && bg2csData.add_ext_link.type) { + window.setTimeout(function () { + let url = window.location.href.split(/[#\?]/)[0]; + if (matchUrlDomain('zeit.de', url)) { + if (document.querySelector('head > link[rel="next"]')) + url += '/komplettansicht'; + } + let add_ext_link_split = bg2csData.add_ext_link.css.split('|'); + let paywall_sel = add_ext_link_split[0]; + let article_sel = add_ext_link_split[1]; + let paywall = document.querySelectorAll(paywall_sel); + if (paywall.length) { + removeDOMElement(...paywall); + let article = document.querySelector(article_sel); + if (article) { + switch (bg2csData.add_ext_link.type) { + case 'archive.is': + article.firstChild.before(archiveLink(url)); + break; + case '1ft.io': + article.firstChild.before(nftLink(url)); + break; + case 'google_webcache': + article.firstChild.before(googleWebcacheLink(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) { + amp_redirect(bg2csData.amp_redirect); + } + }, 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], removeDOMElement, true); + } +} + +// custom/updated sites: cs_code +if (bg2csData.cs_code) { + window.setTimeout(function () { + cs_code_elems(bg2csData.cs_code); + }, 1000); +} + +}// runOnMessage + +var msg_once; +var url_old; +if (ext_api.runtime) { + ext_api.runtime.onMessage.addListener( + function (request, sender) { + if (request.msg === 'bg2cs' && !(msg_once && (url_old === window.location.href))) { + msg_once = true; + url_old = window.location.href; + runOnMessage(request.data, dompurify_loaded); + } + }) +} + +window.addEventListener('message', function (event) { + if (event.data) { + if (event.data.type === 'from_page') { + if (domain = matchDomain(['businesspost.ie', 'lepoint.fr'])) { + 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) { + msg_once = 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) { + article.innerHTML = ''; + article.appendChild(article_new); + } + } + } + } + } +}, false); + +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, div.ad-container, div[class*="-ad-container"], div[class*="_ad-container"]'; +hideDOMStyle(ads, 10); + +if (!(csDone || csDoneOnce)) { + +var msg_once_ses; +if (ext_api.runtime) { + ext_api.runtime.onMessage.addListener( + function (request, sender) { + if (request.msg === 'showExtSrc' && !(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); + } + }) +} + +// Content workarounds/domain + +if (matchDomain('medium.com') || matchDomain(medium_custom_domains) || (!matchDomain('webcache.googleusercontent.com') && 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(googleWebcacheLink(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(/\.(com|net)\.au$/) || matchDomain('inc-aus.com')) {//australia + +if (matchDomain(['crikey.com.au', 'inc-aus.com', 'smartcompany.com.au', 'themandarin.com.au'])) { + if (matchDomain('themandarin.com.au')) { + if (dompurify_loaded) + getJsonUrl('div[data-enterprise-agreement-paywall="true"]', '', 'div.paywall-mandy'); + } else { + let ads = '.advert'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('forbes.com.au')) { + if (dompurify_loaded) + 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('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', 'ntnews.com.au', 'theaustralian.com.au', 'thechronicle.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au']; + if (matchDomain(au_news_corp_domains)) { + if (window.location.search.match(/[&\?]amp/)) { + amp_unhide_subscr_section('amp-ad, amp-embed, [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(document.querySelector('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 scripts = document.querySelectorAll('script:not([src]):not([type])'); + let json_script; + for (let script of scripts) { + if (script.text.includes('window.PAGE_DATA =')) { + json_script = script; + break; + } + } + if (json_script) { + let json_text = json_script.text.split('window.PAGE_DATA =')[1].split(' 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(['diepresse.com', 'faz.net', 'tt.com', 'wochenblatt.com'])) {//germany/austria/switzerland - ch + +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 og_url = document.querySelector('head > meta[name="og:url"][content]'); + if (og_url && !og_url.content.endsWith(url_id)) + refreshCurrentTab(); + let json; + if (html.includes('window.__NUXT__=')) + json = html.split('window.__NUXT__=')[1].split('')[0].trim().replace(/blocs:\[\{.*?\}\],/g, ''); + 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('augsburger-allgemeine.de')) { + let url = window.location.href; + if (!url.includes('-amp.html')) { + let paywall = document.querySelector('div.aa-visible-logged-out'); + if (paywall) { + removeDOMElement(paywall); + window.location.href = url.replace('.html', '-amp.html'); + } + } else { + amp_unhide_subscr_section(); + } + let ads = 'div.piano-article, div.p-ad'; + 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')) { + 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) { + 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) { + removeDOMElement(paywall); + 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('deraktionaer.de')) { + let url = window.location.href; + getArchive(url, 'div#paywall-container', '', 'div#article-body'); +} + +else if (matchDomain('diepresse.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div.premium-content'); + if (article) { + article.removeAttribute('class'); + let scripts = document.querySelectorAll('script:not([src]):not([type])'); + let json_script; + for (let script of scripts) { + if (script.text.match(/window\.contentInformation\s?=\s?/)) { + json_script = script; + break; + } + } + if (json_script) { + try { + let json = JSON.parse(json_script.text.split(/window\.contentInformation\s?=\s?/)[1].split('};')[0] + '}'); + if (json.flexmodule_list) { + let pars = json.flexmodule_list; + let par_first = false; + let split = false; + let parser = new DOMParser(); + for (let par of pars) { + if (split) { + if (par) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par) + '
', 'text/html'); + let content_new = doc.querySelector('div'); + article.appendChild(content_new); + } + } else { + if (par) + par_first = true; + else if (!par && par_first) + split = true; + } + let lazy_images = article.querySelectorAll('img.lazyload[data-src]:not([src])'); + for (let elem of lazy_images) { + elem.removeAttribute('class'); + elem.src = elem.getAttribute('data-src') + } + } + } + } catch (err) { + console.log(err); + } + } + } + } +} + +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(document.querySelector('div.article__text')); + } + let sticky_advt = document.querySelector('div.sticky-advt'); + removeDOMElement(sticky_advt); + } else { + window.setTimeout(function () { + let paywall = document.querySelector('div.paywall, div.wall__wrapper'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let fade = document.querySelector('div.regwall'); + if (fade) + fade.removeAttribute('class'); + let article = document.querySelector('div.body-elements'); + if (article) { + let json_script = document.querySelector('script#__NUXT_DATA__'); + if (json_script) { + try { + let pars = JSON.parse(json_script.text); + let par_index = pars.indexOf('paragraph'); + if (par_index) { + let intro_par = document.querySelector('.body-elements__paragraph'); + if (intro_par && (!pars[par_index + 1] || !pars[par_index + 1].startsWith(intro_par.innerHTML.substring(0, 25)))) + refreshCurrentTab(); + article.innerHTML = ''; + let sheet = document.createElement('style'); + sheet.innerText = 'div.body-elements > div {font-family: "Source Serif 4", serif; font-size: 1.25rem; font-weight: 400; line-height: 1.8; padding-bottom: 1.25rem; & a {text-decoration: underline !important;} & em {font-style: italic;} & strong {font-weight: bold;}}'; + document.head.appendChild(sheet); + let parser = new DOMParser(); + for (let i = par_index - 1; i < pars.length; i++) { + let par = pars[i]; + if (par) { + if (par === 'artikel_wall') + break; + let elem; + let type_id = par.bodyElementType; + if (type_id) { + let type = pars[type_id]; + if (par.content) { + if (['paragraph', 'heading', 'html'].includes(type)) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(pars[par.content], dompurify_options) + '
', 'text/html'); + elem = doc.querySelector('div'); + if (type === 'heading') + elem.style = 'font-weight: 700'; + } else + console.log(type); + } else if (type === 'image') { + if (par.imageId) { + let url_id = pars[par.imageId]; + let url = pars.find(x => typeof x === 'string' && x.includes('/' + url_id + '/')); + if (url) { + elem = document.createElement('figure'); + let img = document.createElement('img'); + img.src = url; + elem.appendChild(img); + let url_index = pars.indexOf(url); + if (url_index) { + let caption = document.createElement('figcaption'); + if (typeof pars[url_index - 2] === 'string') + caption.innerText += pars[url_index - 2]; + if (typeof pars[url_index - 1] === 'string') + caption.innerText += ' ' + pars[url_index - 1]; + elem.appendChild(caption); + } + elem.appendChild(document.createElement('br')); + } + } + } else if (type === 'relatedArticles') { + let rel_index = pars.indexOf(type); + if (rel_index) { + elem = document.createElement('div'); + elem.appendChild(document.createTextNode('MEHR ZUM THEMA')); + elem.appendChild(document.createElement('br')); + let rel_art = pars.find(x => x[type]); + if (rel_art) { + let rel_art_index = rel_art[type]; + let rel_articles = pars[rel_art_index]; + for (let art_id of rel_articles) { + let art = pars[art_id]; + if (art.canonicalPath && art.title) { + let art_link = document.createElement('a'); + art_link.href = pars[art.canonicalPath]; + art_link.innerText = pars[art.label] + ' - ' + pars[art.title]; + elem.appendChild(art_link); + elem.appendChild(document.createElement('br')); + } + } + } + } + } + if (elem) + article.appendChild(elem); + } + } + } + } + } catch (err) { + console.log(err); + } + } else { + let json_script = getArticleJsonScript(); + if (json_script) { + let json = JSON.parse(json_script.text); + if (json) { + let json_text = json.articleBody; + article.innerText = json_text; + } + } + } + } + } + }, 1000); + let ads = 'div.lay-PaySocial, div.iqadtile_wrapper, div.iqdcontainer'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('freiepresse.de')) { + if (window.location.pathname.includes('-artikel')) { + let url = window.location.href; + func_post = function () { + let lazy_images = document.querySelectorAll('picture.lazy'); + for (let elem of lazy_images) { + elem.removeAttribute('class'); + let source = elem.querySelector('source[data-srcset]'); + if (source) { + let img_new = document.createElement('img'); + img_new.src = source.getAttribute('data-srcset').split(' ')[0]; + source.parentNode.replaceChild(img_new, source); + } + } + } + getGoogleWebcache(url, 'div.article-teaser', '', 'article'); + } + let ads = 'div.rgt-content'; + hideDOMStyle(ads); +} + +else if (matchDomain('freitag.de')) { + let paywall = document.querySelector('div.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#x-article-text'); + if (article) { + let intro = article.querySelectorAll('p'); + 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) { + removeDOMElement(...intro); + let article_new = document.createElement('div'); + for (let par of pars) { + if (!par.startsWith('Placeholder ')) { + let par_new = document.createElement('p'); + par_new.innerText = par; + article_new.appendChild(par_new); + } + } + article.appendChild(article_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_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_new.innerText = par; + article.appendChild(par_new); + } + } + } + } + } + } +} + +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'])) { + window.setTimeout(function () { + let paywall = document.querySelector('div.dm-paywall-wrapper'); + if (paywall) { + let json_script = getArticleJsonScript(); + if (json_script) { + removeDOMElement(paywall); + try { + let json = JSON.parse(json_script.text); + if (json && json['@graph']) { + let json_data = json['@graph'].filter(x => x.articleBody)[0]; + let url_json = json_data['@id']; + if (url_json && !url_json.includes(window.location.pathname)) + refreshCurrentTab(); + let json_text = json_data.articleBody; + let article = document.querySelector('article'); + if (json_text && article) { + let article_new = document.createElement('p'); + article_new.setAttribute('class', 'dm-paragraph my-8 dm-article-content-width'); + article_new.innerText = json_text; + article.appendChild(article_new); + } + } + } catch (err) { + console.log(err); + } + } + } + }, 2000); + let banners = 'div.dm-slot'; + 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-outbrain]'; + hideDOMStyle(ads); +} + +else if (matchDomain('motorradonline.de')) { + if (window.location.pathname.endsWith('/amp/')) + ampToHtml(); +} + +else if (matchDomain(['mz.de', 'volksstimme.de'])) { + let url = window.location.href; + getGoogleWebcache(url, 'div.fp-paywall', '', 'div[data-t-name="Article"]'); +} + +else if (matchDomain(['noz.de', 'shz.de', 'svz.de'])) { + if (window.location.pathname.endsWith('/amp')) { + amp_unhide_access_hide('="NOT data.reduced"', '="data.reduced"', 'amp-ad, amp-embed, .ads-wrapper, #flying-carpet-wrapper'); + } else { + let ads = 'div.nozmhn_ad'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('nw.de')) { + if (!window.location.pathname.endsWith('.amp.html')) { + amp_redirect('a[data-event-value="paywall-overlay-click"]', '', window.location.href.replace('.html', '.amp.html')); + } else { + amp_unhide_access_hide('="loggedIn AND hasAbo"', '', 'amp-ad, amp-embed, .banner'); + } +} + +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('rhein-zeitung.de')) { + let ads = 'div[class$="board"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('schwaebische.de')) { + let url = window.location.href; + let paywall_sel = 'div > div.sve-paywall-wrapper_overlay'; + let paywall = document.querySelector(paywall_sel); + getGoogleWebcache(url, paywall_sel, '', 'div.article_body'); + if (paywall) { + removeDOMElement(paywall.parentNode); + let body = document.querySelector('body[style]'); + if (body) + body.removeAttribute('style'); + waitDOMAttribute('body', 'body', 'style', node => node.removeAttribute('style'), true); + } + let ads = 'div.fp-ad-placeholder'; + hideDOMStyle(ads); +} + +else if (matchDomain('schweizermonat.ch')) { + if (dompurify_loaded) + getJsonUrl('div.entry-paywall-login', '', 'div.entry-main > div.entry__post-content'); +} + +else if (matchDomain('sn.at')) { + let url = window.location.href; + getGoogleWebcache(url, 'div.article-sections__paywall', '', 'div.article-body-text'); +} + +else if (matchDomain('spektrum.de')) { + let paywall = document.querySelector('article.pw-premium'); + if (paywall) + paywall.classList.remove('pw-premium'); +} + +else if (matchDomain('spiegel.de')) { + let url = window.location.href; + getArchive(url, 'div[data-area="paywall"]', '', 'div[data-area="body"]'); +} + +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(['stuttgarter-nachrichten.de', 'stuttgarter-zeitung.de', 'schwarzwaelder-bote.de']) || matchDomain(de_mhs_custom_domains)) { + let banners = 'div.mod-paywall, div.Billboard'; + hideDOMStyle(banners); +} + +else if (matchDomain('sueddeutsche.de')) { + let url = window.location.href; + if (window.location.pathname.startsWith('/projekte/artikel/')) { + getArchive(url, 'div.offer-page', '', 'main'); + } else { + getArchive(url, 'p.sz-article-body__paragraph--reduced', {rm_attrib: 'class'}, 'div[itemprop="articleBody"]'); + } + let ads = 'er-ad-slot'; + hideDOMStyle(ads); +} + +else if (matchDomain('suedkurier.de')) { + let url = window.location.href; + getArchive(url, 'aside.article-paywall', '', 'main > article'); +} + +else if (matchDomain('tagesspiegel.de')) { + let url = window.location.href; + if (matchDomain('www.tagesspiegel.de')) { + getArchive(url, 'div#paywal', '', 'div#story-elements'); + } else if (matchDomain('interaktiv.tagesspiegel.de')) { + let paywall = document.querySelector('div#pw'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('div.tslr-article > p'); + if (article) + article.firstChild.before(archiveLink(url)); + } + } +} + +else if (matchDomain('tt.com')) { + 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 sub_elem = document.createElement('p'); + sub_elem.innerText = parseHtmlEntities(item.content); + 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); + } + } + } + } + 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.vodl-region-article__content[hidden]'); + if (hidden_comments) { + hidden_comments.removeAttribute('hidden'); + let blurred = hidden_comments.querySelector('div.blur'); + if (blurred) + blurred.classList.remove('blur'); + } + 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')) { + let url = window.location.href; + getArchive(url, 'div.contains_walled_content', '', 'article'); + 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('wiwo.de')) { + let url = window.location.href; + getArchive(url, 'div.o-paywall', '', 'article'); + let banner = 'div.c-overscroller'; + hideDOMStyle(banner); +} + +else if (matchDomain('zeit.de')) { + let url = window.location.href.split(/[#\?]/)[0]; + if (document.querySelector('head > link[rel="next"]')) + url += '/komplettansicht'; + getArchive(url, 'aside#paywall', '', 'article'); +} + +else if (matchDomain(de_funke_medien_domains)) { + let url = window.location.href; + getArchive(url, 'div#paywall-container', '', 'article'); + 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_madsack_domains) || document.querySelector('head > link[href*=".rndtech.de/"]')) { + // plus code in contentScript_once_var.js (timing) + if (!window.location.search.startsWith('?outputType=valid_amp')) { + let ads = 'div[class^="Adstyled__AdWrapper"]'; + hideDOMStyle(ads); + } else { + ampToHtml(); + } +} + +else if (matchDomain(de_motor_presse_domains)) { + let ads = 'div#ads-container, div.va-sponsored, div.mps_markAd'; + hideDOMStyle(ads); +} + +else if (matchDomain('ovb-online.de') || matchDomain(['bgland24.de', 'chiemgau24.de', 'innsalzach24.de', 'mangfall24.de', 'rosenheim24.de', 'wasserburg24.de'])) { + let ads = 'div.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]; + if (dompurify_loaded) + 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('etc.se')) { + let paywall = document.querySelector('div.paywalled'); + if (paywall) { + paywall.removeAttribute('class'); + let gradient = document.querySelector('div.bg-gradient-white'); + if (gradient) + gradient.removeAttribute('class'); + let footer = document.querySelector('section > footer'); + removeDOMElement(footer.parentNode); + } + let ads = 'div[class$="-ad"]'; + 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(['cmjornal.pt', 'record.pt', 'sabado.pt'])) { + if (!window.location.pathname.includes('/amp/')) { + amp_redirect('.bloqueio_exclusivos, .container_assinatura, .bloco_bloqueio'); + } else { + amp_unhide_access_hide('="subscriber"', '="NOT subscriber"', 'amp-ad, amp-embed, amp-consent, .detalheAds, .exclusivos_bar'); + let amp_links = document.querySelectorAll('a[href^="https://www-cmjornal-pt.cdn.ampproject.org/c/s/"]'); + for (let amp_link of amp_links) + amp_link.href = amp_link.href.replace('www-cmjornal-pt.cdn.ampproject.org/c/s/', ''); + } +} + +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'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('elespanol.com')) { + if (window.location.pathname.endsWith('.amp.html')) { + amp_unhide_subscr_section('amp-ad, amp-embed'); + } 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')) { + let paywall = document.querySelector('div.ue-c-article__premium'); + if (paywall) { + removeDOMElement(paywall); + header_nofix(document.querySelector('main p')); + } else { + paywall = document.querySelector('div.ue-c-paywall'); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector('table'); + if (article) + article.before(googleWebcacheLink(url)); + } + } + } + } else { + amp_unhide_access_hide('="authorized=true"', '="authorized!=true"'); + amp_unhide_subscr_section('amp-ad, amp-embed, div.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\'"', 'amp-ad, amp-embed, 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)) { + if (window.location.href.includes('.amp.html')) { + let truncated = document.querySelector('div.article-body--truncated'); + if (truncated) + truncated.classList.remove('article-body--truncated'); + amp_unhide_access_hide('="NOT access"], [amp-access="FALSE"', '="access"', 'amp-ad, amp-embed, span.ad-signature'); + } else if (['amp.elperiodico.com', 'amp.epe.es'].includes(window.location.hostname)) { + amp_unhide_access_hide('="loggedIn"', '="NOT loggedIn"', 'amp-ad, amp-embed, amp-next-page'); + let amp_images = document.querySelectorAll('div > 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); + } + } else { + let paywall = document.querySelector('div.ft-helper-closenews'); + if (paywall) + paywall.removeAttribute('class'); + 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 = document.createElement('figure'); + let img = document.createElement('img'); + img.src = par.urlOriginal; + img.style = 'width:100%'; + par_new.appendChild(img); + if (par.caption) { + let caption = document.createElement('p'); + caption.innerText = par.caption; + par_new.appendChild(caption); + } + } + } 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 = document.createElement('figure'); + let img = document.createElement('img'); + img.src = elem.urlOriginal; + img.style = 'width:100%'; + elem_new.appendChild(img); + if (elem.caption) { + let caption = document.createElement('p'); + caption.innerText = elem.caption; + elem_new.appendChild(caption); + } + } + 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 + csDone = true; + +} else if ((window.location.hostname.endsWith('.fr') && !matchDomain(['lemagit.fr'])) || matchDomain(['connaissancedesarts.com', 'journaldunet.com', 'la-croix.com', 'legrandcontinent.eu', 'lesinrocks.com', 'loeildelaphotographie.com', 'marianne.net', 'nouvelobs.com', 'parismatch.com', 'pourleco.com', 'science-et-vie.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 paywall = document.querySelector('div.markup[class*="Paywall"]'); + if (paywall) + paywall.setAttribute('class', 'markup'); +} + +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'); + let poool_widget = document.querySelector('div#poool-widget'); + removeDOMElement(poool_widget); + }, 500); +} + +else if (matchDomain('cieletespace.fr')) { + let url = window.location.href; + getGoogleWebcache(url, 'div.article-content__subscribe', '', 'div.article-content'); +} + +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)) { + if (window.location.pathname.startsWith('/amp/')) { + amp_unhide_subscr_section('amp-ad, amp-embed'); + } else { + let paywall = document.querySelector('div.paywall'); + let amphtml = document.querySelector('head > link[rel="amphtml"]'); + if (paywall) { + removeDOMElement(paywall); + if (amphtml) + amp_redirect_not_loop(amphtml); + else { + let json_script = getArticleJsonScript(); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json) { + if (json[0]) + json = json[0]; + let json_text = parseHtmlEntities(json.articleBody); + let content = document.querySelector('div.article-full__body-content'); + if (json_text && content) { + content.innerHTML = ''; + let article_new = document.createElement('p'); + article_new.innerText = json_text; + content.appendChild(article_new); + content.removeAttribute('style'); + content.removeAttribute('data-state'); + } + } + } catch (err) { + console.log(err); + } + } + } + } + } +} + +else if (matchDomain(fr_groupe_nice_matin_domains)) { + if (window.location.pathname.startsWith('/amp/')) { + amp_unhide_access_hide('="access"', '="NOT access"', 'amp-ad, amp-embed'); + } else { + let paywall = document.querySelector('div#article-teaser'); + if (paywall) + paywall.removeAttribute('id'); + } + let ads = 'div[class^="ad-slot-"], div#poool-widget-content, div[class*="Rhoo"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('humanite.fr')) { + let paywall = document.querySelector('div.single__categories svg'); + if (paywall && dompurify_loaded) { + csDoneOnce = true; + let url = window.location.href; + let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split(/[#\?]/)[0]; + replaceDomElementExt(url_cache, true, false, 'div.rich-text > div.gs-row'); + } +} + +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')) { + let url = window.location.href; + if (!url.includes('la-croix.com/amp/')) { + let ads = 'div[class^="ads-wrapper-"], div#poool-widget'; + hideDOMStyle(ads); + } else { + let paywall_block = '#paywall_block'; + let ads = 'amp-ad, amp-embed'; + hideDOMStyle(paywall_block + ', ' + ads); + } +} + +else if (matchDomain('lanouvellerepublique.fr')) { + let alert_didacticiel = document.querySelector('div.alert-didacticiel'); + let loading = document.querySelectorAll('span.loading'); + removeDOMElement(alert_didacticiel, ...loading); +} + +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('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 = '#poool-container, #poool-widget-content, #poool-widget, .forbidden'; + let ads = 'div[class^="lmn-"], div.premium-hidden, div.p-aside--placeholder'; + 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 paywall_sel = 'section.paywall'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + let article_sel = 'article'; + let figure = document.querySelector('figure.article__media'); + func_post = function () { + if (figure) { + let figure_new = document.querySelector('article figure'); + let article = document.querySelector(article_sel); + if (!figure_new && article) + article.firstChild.before(figure); + } + let view_more = document.querySelector('section > label[for^="view-more-"]'); + if (view_more) { + let view_more_div = view_more.parentNode.querySelector('div[style*="max-height"]'); + if (view_more_div) + view_more_div.removeAttribute('style'); + removeDOMElement(view_more); + } + } + let url = window.location.href; + getArchive(url, paywall_sel, '', article_sel); + let hide = document.querySelector('section.article__wrapper--premium'); + if (hide) + removeClassesByPrefix(hide, 'article__content--restricted'); + } +} + +else if (matchDomain('lemoniteur.fr')) { + let url = window.location.href; + getGoogleWebcache(url, 'div.blocPasEncoreAbonne', '', 'div.articleContent'); + let ads = 'div[data-ad-id], div.ad2hsBox'; + 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, div.slotpub, div.sticky-block'; + hideDOMStyle(ads); + } else { + let url = window.location.href; + getArchive(url, 'div.accnt-cmp', '', 'article'); + } +} + +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 scripts = document.querySelectorAll('script:not([src]):not([type])'); + let json_script; + for (let script of scripts) { + if (script.text.match(/window\.__REACT_QUERY_STATE__\s?=\s?/)) { + json_script = script; + break; + } + } + if (json_script) { + try { + let json = JSON.parse(json_script.text.split(/window\.__REACT_QUERY_STATE__\s?=\s?/)[1].split('};')[0] + '}'); + let data_article = json.queries[1].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.replace(/allowfullscreen='(true)?'/g, ''); + 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'); + 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 = '[class*="jzxvkd"]'; + 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.bottom-bar-full, div.tead, div.ban-bottom, div.placeholder--ban-atf'; + 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('marianne.net')) { + let paywall = document.querySelector('div.paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article_source = document.querySelector('div.article-body[data-content-src]'); + if (article_source) { + let article_text = decode_utf8(atob(article_source.getAttribute('data-content-src'))); + let parser = new DOMParser(); + let html = parser.parseFromString('
' + DOMPurify.sanitize(article_text) + '
', 'text/html'); + let article = html.querySelector('div'); + let lazy_images = article.querySelectorAll('img.lazyload[data-src]:not([src])'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('data-src'); + elem.classList.remove('lazyload'); + } + article_source.innerHTML = ''; + article_source.appendChild(article); + article_source.removeAttribute('data-content-src'); + } + } + let ads = 'div[class*="--placeholder"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('nouvelobs.com')) { + let paywall = document.querySelector('.paywall'); + removeDOMElement(paywall); + let fade = document.querySelector('div.paywall--gradient-top'); + if (fade) + fade.classList.remove('paywall--gradient-top'); + let ads = 'section.slice--ad'; + hideDOMStyle(ads); +} + +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('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(['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('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('amp-ad, amp-embed'); + } 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 { + let ads = 'amp-ad, amp-embed'; + 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 = document.querySelector('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')) { + let url = window.location.href; + if (url.includes('/amp/')) { + amp_unhide_subscr_section('amp-ad, amp-embed, div#_4sVideoContainer'); + let comments = document.querySelector('div.content.comments'); + removeDOMElement(comments); + } else if (window.location.pathname.match(/\/\d{4}\/\d{2}\/\d{2}\//)) { + let paywall = document.querySelector('div.read-more'); + if (paywall) { + removeDOMElement(paywall); + window.location.href = 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')) { + window.setTimeout(function () { + if (window.location.pathname.match(/((\w)+(\-)+){3,}/)) { + let paywall = document.querySelector('div[class^="PostPaywall_PostPaywall__"]'); + 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.pageProps.content && json.props.pageProps.content.content) { + let article_new = json.props.pageProps.content.content; + let article = document.querySelector('div.ArticleBody'); + 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 + refreshCurrentTab(); + } + } + } + let service_page = document.querySelector('div.service-page'); + if (service_page) { + refreshCurrentTab(); + } + }, 1000); +} + +else if (matchDomain('ilsole24ore.com')) { + let paywall = document.querySelector('div.lock'); + if (paywall) { + removeDOMElement(paywall); + header_nofix(document.querySelector('div.paywalltext')); + } + let ads = 'div.background-adv, div.abox, div.ob-smartfeed-wrapper'; + 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('amp-ad, amp-embed'); + } 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-ad, amp-embed, 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 (matchDomain(it_gedi_domains)) { + if (domain = matchDomain(['huffingtonpost.it', 'lastampa.it', 'repubblica.it'])) { + if (window.location.pathname.includes('/news/')) { + if (!window.location.pathname.match(/\amp(\/)?$/)) { + csDoneOnce = true; + let paywall = document.querySelector('iframe#__limio_frame'); + if (paywall) { + ext_api.runtime.sendMessage({request: 'clear_cookies_domain', data: {domain: domain}}); + refreshCurrentTab(); + } + let modal = document.querySelector('aside#widgetDP'); + removeDOMElement(modal); + } else + ampToHtml(); + } + } else { + if (!window.location.pathname.match(/\amp(\/)?$/)) { + let paywall = document.querySelector('div#ph-paywall'); + removeDOMElement(paywall); + } else + ampToHtml(); + } + let ads = 'div[id^="adv"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('tuttosport.com')) { + if (!window.location.pathname.startsWith('/amp/')) { + let article_images = document.querySelectorAll('div > img[data-src]:not([src])'); + for (let elem of article_images) { + elem.src = elem.getAttribute('data-src'); + elem.removeAttribute('class'); + elem.parentNode.removeAttribute('style'); + } + let main_images = document.querySelectorAll('div > img[class*="ArticleImage_image__"][src]'); + for (let elem of main_images) { + elem.removeAttribute('class'); + } + let video = document.querySelector('div[class^="VideoFloat_videoFloatCont__"]'); + if (video) { + let og_image = document.querySelector('head > meta[property="og:image"][content]'); + if (og_image) { + let og_image_url = og_image.getAttribute('content'); + if (og_image_url) { + let elem = document.createElement('img'); + elem.src = og_image_url; + elem.style = 'width: 95%;'; + video.parentNode.replaceChild(elem, video); + } + } + } + let ads = 'div[class^="AdUnit_"]'; + hideDOMStyle(ads); + } else { + let ads = 'amp-ad, amp-embed'; + 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.concat(['limburger.nl']))) { + window.setTimeout(function () { + let paywall_sel = 'div[data-cj-root="subscription-wall"]'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + let article_sel = 'div[data-fragment-name="articleDetail"]'; + let article = document.querySelector(article_sel); + if (article) { + let article_new = document.createElement('div'); + article_new.id = 'bpc_fetch'; + article.appendChild(article_new); + let url = window.location.href; + getArchive(url, paywall_sel, '', 'div#bpc_fetch', '', 'div[data-auth-premium-content]', article_sel); + } + } + let button_close = document.querySelector('span[data-testid="button-close"]'); + if (button_close) + button_close.click(); + let banners = 'div.paywall--titel'; + hideDOMStyle(banners); + }, 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 scripts = document.querySelectorAll('script:not([src]):not([type])'); + let content_script; + for (let script of scripts) { + if (script.text.match(/window\.fullcontent64\s?=\s?"/)) { + content_script = script; + break; + } + } + if (content_script) { + try { + let content = decode_utf8(atob(content_script.text.split(/window\.fullcontent64\s?=\s?"/)[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')) { + if (dompurify_loaded) + 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('fd.nl')) { + let paywall = document.querySelectorAll('section.upsell, div.upsell-modal-background'); + if (paywall.length) { + removeDOMElement(...paywall); + refreshCurrentTab(); + } + let header = document.querySelector('div.fd-message[data-slot="Artikel/Header"]'); + removeDOMElement(header); +} + +else if (matchDomain('ftm.nl')) { + let banners = document.querySelectorAll('div.banner-pp, a.readmore'); + removeDOMElement(...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)+(\-)+){3,}/)) { + 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(['lc.nl', 'dvhn.nl']) || document.querySelector('head > link[href*=".ndcmediagroep.nl/"]')) { + let ads = 'div.top__ad, div.marketingblock-article'; + hideDOMStyle(ads); +} + +else if (matchDomain(nl_dpg_adr_domains.concat(['hln.be']))) { + func_post = function () { + let shades = document.querySelectorAll('div[style*="background-color"][style*=";width"]'); + for (let elem of shades) + elem.style.width = '85%'; + } + let url = window.location.href; + getArchive(url, 'div#remaining-paid-content[data-reduced="true"]', '', 'div.article__body', '', 'div#remaining-paid-content'); +} + +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')) { + if (window.location.href.startsWith('https://www.telegraaf.nl/error?ref=/')) { + window.setTimeout(function () { + window.location.href = window.location.href.split('&')[0].replace('error?ref=/', ''); + }, 500); + } + let refresh = document.querySelector('div[id="content"] > meta[http-equiv="refresh"]'); + if (refresh) { + refreshCurrentTab(); + } + let premium = document.querySelector('div[class^="Article__premium"] > p'); + 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) + '
', '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'; + } + } + 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 banners = document.querySelectorAll('.ArticleBodyBlocks__inlineArticleSpotXBanner, .WebpushOptin'); + removeDOMElement(...banners); +} + +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 if (matchDomain('vn.nl')) { + if (dompurify_loaded) + getJsonUrl('div.content__message-no-access-container', '', 'div[data-article-content-target]', {art_append: true}); + let content_restriction = document.querySelector('div.content__restriction'); + removeDOMElement(content_restriction); + let article_content = document.querySelector('section[data-article-content-element]'); + if (article_content) { + article_content.style = 'max-height:none !important;'; + let body = document.querySelector('body'); + if (body) + body.style = 'height:auto !important;'; + } +} + +else if (document.querySelector('head > link[href="//ppt.promedia.nl"]') || document.querySelector('head > script[src*="/pmgnews/scripts/promedia.js"]')) { + let paywall_sel = 'div.pmgsub'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + let article_sel = 'div.post-body, div.text'; + let article = document.querySelector(article_sel); + if (article) { + let pars = article.querySelectorAll('p:first-child'); + if (pars.length > 2) + removeDOMElement(paywall); + else { + func_post = function () { + let paywall = document.querySelector(paywall_sel); + removeDOMElement(paywall); + } + let url = window.location.href; + getGoogleWebcache(url, paywall_sel, '', article_sel); + } + } + } +} + +else + csDone = true; + +} else if ((window.location.hostname.match(/\.(ie|uk)$/) && !matchDomain(['investmentweek.co.uk', 'vogue.co.uk'])) || matchDomain(['apollo-magazine.com', 'autosport.com', 'citywire.com', 'fnlondon.com', 'ft.com', 'gbnews.com', 'granta.com', 'scotsman.com', 'tes.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 url = window.location.href; + getGoogleWebcache(url, 'div.ms-block, div.register-block', '', 'div.content-wrapper'); +} + +else if (matchDomain('autosport.com')) { + let paywall = document.querySelector('div.ms-piano_article-banner'); + if (paywall) { + removeDOMElement(paywall); + header_nofix(document.querySelector('div.ms-article-content > p')); + } +} + +else if (matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) { + let flip_pay = document.querySelector('div#flip-pay'); + if (flip_pay && flip_pay.hasChildNodes() && dompurify_loaded) { + let content = document.querySelector('script[data-fragment-type="ArticleContent"]'); + if (content) { + let fade = document.querySelector('div[class*="_fadetowhite"]'); + removeDOMElement(flip_pay, fade); + 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 = sub_item; + ul.appendChild(li); + } + elem.appendChild(ul); + } else if (type === 'image') { + let figure = document.createElement('figure'); + let img = document.createElement('img'); + img.src = item.url; + if (item.cropped && item.cropped.url) + img.src = item.cropped.url; + figure.appendChild(img); + let caption = document.createElement('figcaption'); + caption.innerText = item.caption; + figure.appendChild(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.appendChild(elem_link); + elem.appendChild(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'); + 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[id^="ad_article"]'; + 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); + } + }, 500); +} + +else if (matchDomain('citywire.com')) { + let url = window.location.href; + func_post = function () { + let banners = document.querySelectorAll('div#lockedLoginPanel, div#lockedContentPlaceholder'); + removeDOMElement(...banners); + let article = document.querySelector('div.cw-article-body'); + if (article) + removeDOMElement(article.nextSibling); + } + getGoogleWebcache(url, 'div.locked-content.cw-article-body', {rm_class: 'locked-content'}, 'div.cw-article-body'); +} + +else if (matchDomain('fnlondon.com')) { + let signin = document.querySelector('div[data-testid="articleSignInSubscribeWrapper"]'); + removeDOMElement(signin); +} + +else if (matchDomain('ft.com')) { + let paywall = document.querySelector('div.js-primary-offers-container'); + if (paywall) { + removeDOMElement(paywall); + refreshCurrentTab(); + } + 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'; + hideDOMStyle(ads); +} + +else if (matchDomain('granta.com')) { + if (dompurify_loaded) + getJsonUrl('div.article-sign-up-container', '', 'div.article-excerpt'); +} + +else if (matchDomain('independent.co.uk')) { + func_post = function () { + let lazy_images = document.querySelectorAll('img[loading="lazy"][width]'); + for (let elem of lazy_images) { + elem.removeAttribute('width'); + elem.style = 'width: 100%;'; + } + } + let url = window.location.href; + if (window.location.search.match(/(\?|&)amp/)) { + let ads = 'amp-ad, amp-embed, [id^="ad-"]'; + hideDOMStyle(ads); + } else { + let related = document.querySelector('div.related'); + if (!related) { + getArchive(url, 'div.article-premium', {rm_class: 'article-premium'}, 'div#main'); + } + } +} + +else if (matchDomain('literaryreview.co.uk')) { + if (dompurify_loaded) + getJsonUrl('p.subscribe-for-more', '', 'div#_articlereview'); +} + +else if (matchDomain('prospectmagazine.co.uk')) { + let url = window.location.href; + getGoogleWebcache(url, 'div.paywall_overlay_blend, div.paywall', '', 'main'); + let ads = '.ad-banner, .advert'; + hideDOMStyle(ads); +} + +else if (matchDomain('spectator.co.uk')) { + let ads = '#subscribe-ribbon, div.ad-slot'; + 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 = document.createElement('figure'); + let img = document.createElement('img'); + img.src = img_elem.url; + img.alt = img_elem.alt; + img.style = 'width: 95%;'; + figure.appendChild(img); + if (img_elem.caption || img_elem.description || img_elem.alt) { + let caption = document.createElement('figcaption'); + caption.innerText = img_elem.caption ? (img_elem.caption + ' ' + img_elem.description) : img_elem.alt; + figure.appendChild(caption); + } + 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')) { + if (window.location.pathname.endsWith('/amp/')) { + let paywall = document.querySelectorAll('.premium-paywall'); + if (paywall.length) { + let truncated_content = document.querySelector('.truncated-content'); + removeDOMElement(...paywall, truncated_content); + amp_unhide_access_hide('="c.result=\'ALLOW_ACCESS\'"', '', 'amp-ad, amp-embed', false); + } else { + let ads = 'amp-ad, amp-embed'; + hideDOMStyle(ads); + } + } else { + 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')) { + if (dompurify_loaded) + 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('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-"]'); +} + +else if (matchDomain('thetimes.co.uk')) { + let url = window.location.href; + if (window.location.hostname !== 'epaper.thetimes.co.uk') { + 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 !important; height: 100% !important;'; + }, n * 500); + } + } + if (!url.includes('?shareToken=')) { + getArchive(url, 'div#paywall-portal-article-footer', '', 'article#article-main'); + } + 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 premium = document.querySelector('div.premium'); + if (premium) + premium.removeAttribute('class'); + let amp_images = document.querySelectorAll('article 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') + }); + amp_image.parentNode.replaceChild(elem, amp_image); + } + let ads = 'div[class^="MarkupAds__Container-"], div[class*="_AdContainer-"], div[class^="Dailymotion__Wrapper-"]'; + hideDOMStyle(ads); +} + +else + csDone = true; + +} else if (window.location.hostname.match(/\.(ar|br|cl|pe|uy)$/) || matchDomain(['cambiocolombia.com', 'clarin.com', 'elespectador.com', 'elmercurio.com', 'eltiempo.com', 'eltribuno.com', 'exame.com', 'globo.com', 'lasegunda.com', 'latercera.com', 'revistaoeste.com'])) {//south america + +if (matchDomain('abril.com.br')) { + if (window.location.pathname.endsWith('/amp/')) { + let paywall = document.querySelector('.piano-modal'); + removeDOMElement(paywall); + let ads = 'amp-ad, amp-embed'; + hideDOMStyle(ads); + } 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[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')) { + if (!window.location.pathname.startsWith('/amp/')) { + let paywall = document.querySelector('div#require-access'); + if (paywall) { + removeDOMElement(paywall); + window.location.href = '/amp' + window.location.pathname; + } + } else { + amp_unhide_subscr_section('amp-ad, amp-embed'); + } +} + +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('crusoe.com.br')) { + let ads = '#gpt-leaderboard, .ads_desktop, .catchment-box'; + hideDOMStyle(ads); +} + +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.match(/(\?|&)outputType=amp/)) { + amp_unhide_subscr_section('amp-ad, amp-embed, [class^="Widget"], amp-fx-flying-carpet'); + } else { + amp_redirect('div.exclusive_validation'); + } +} + +else if (matchDomain(['elmercurio.com', 'lasegunda.com'])) { + window.setTimeout(function () { + let elem_hidden = document.querySelectorAll('[style="visibility:hidden"]'); + for (let elem of elem_hidden) + elem.removeAttribute('style'); + let page_pdf_content = document.querySelector('div.page_pdf_content'); + let close_html = document.querySelector('div.close_html'); + let cont_page_full = document.querySelector('div.cont_page_full'); + removeDOMElement(page_pdf_content, close_html, cont_page_full); + }, 1000); + window.setTimeout(function () { + let cont_articlelight = document.querySelector('div.cont_articlelight'); + if (cont_articlelight) + cont_articlelight.setAttribute('style', 'height: 100% !important; width: 90% !important'); + }, 3000); + if (window.location.pathname.startsWith('/mobile')) { + let lessreadmore = document.querySelectorAll('article.lessreadmore'); + for (let article of lessreadmore) + article.classList.remove('lessreadmore'); + let bt_readmore = document.querySelectorAll('div[id*="bt_readmore_"]'); + removeDOMElement(...bt_readmore); + } +} + +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 { + let paywall = document.querySelector('div.mensaje_member'); + if (paywall) { + removeDOMElement(paywall); + window.location.href = window.location.pathname + '/amp'; + } + } +} + +else if (matchDomain('eltiempo.com')) { + let modulos = document.querySelector('div.modulos'); + if (modulos) + modulos.classList.remove('modulos'); +} + +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('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-ad, amp-embed, 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-ad, amp-embed, 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 (window.location.pathname.startsWith('/amp/')) { + amp_unhide_subscr_section('amp-ad, amp-sticky-ad, amp-embed'); + } 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.body.blink'); + 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, amp-embed, div.tpl-wrapper', false); + } else { + let ads = 'div.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-ad, amp-embed'); + 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'; + 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('lanacion.com.ar')) { + let ads = 'div.mod-banner'; + hideDOMStyle(ads); +} + +else if (matchDomain('latercera.com')) { + let subscr_banner = document.querySelector('.empty'); + removeDOMElement(subscr_banner); +} + +else if (matchDomain('revistaoeste.com')) { + if (window.location.pathname.startsWith('/revista/')) { + let intro = document.querySelector('div.is-locked'); + let sub_panel = document.querySelector('div.subscribe-panel'); + removeDOMElement(intro, sub_panel); + let div_hidden = document.querySelector('div.hidden[data-url]'); + if (div_hidden) + div_hidden.classList.remove('hidden'); + } else { + let div_expandable = document.querySelector('div.expandable'); + if (div_expandable) + div_expandable.classList.remove('expandable'); + } +} + +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 ads = 'amp-embed'; + hideDOMStyle(ads); + } else { + let paywall_sel = 'div.paywall'; + let paywall = document.querySelector(paywall_sel); + let article = document.querySelector('div.entry-content'); + if (paywall && article && dompurify_loaded) { + let fusion_script = document.querySelector('script#fusion-metadata'); + if (fusion_script && fusion_script.text.includes('Fusion.globalContent=')) { + paywall.classList.remove('paywall'); + try { + let json = JSON.parse(fusion_script.text.split('Fusion.globalContent=')[1].split('};')[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.image_type) { + if (par.url) { + par_new = document.createElement('figure'); + par_new.className = 'article__image'; + par_new.style = 'width: 75%; margin-left: auto; margin-right: auto;'; + let img = document.createElement('img'); + img.src = par.url; + if (par.alt_text) + img.alt = par.alt_text; + par_new.appendChild(img); + let caption = document.createElement('figcaption'); + caption.className = 'article__image-caption'; + let cap_par = document.createElement('p'); + cap_par.innerText = par.caption; + if (par.credits && par.credits.by && par.credits.by[0] && par.credits.by[0].byline) + cap_par.innerText += ' - ' + par.credits.by[0].byline; + caption.appendChild(cap_par); + par_new.appendChild(caption); + } + } else if (!['raw_html'].includes(par.type)) { + console.log(par); + } + if (par_new) + article.appendChild(par_new); + } + } + } catch (err) { + console.log(err); + } + } else + amp_redirect(paywall_sel, '', window.location.pathname + '?outputType=amp'); + } + } +} + +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 > div.tp-container-inner'); + if (paywall) { + removeDOMElement(paywall); + refreshCurrentTab(); + } + let popup = document.querySelector('#pianoj_ribbon'); + removeDOMElement(popup); +} + +else if (matchDomain('axios.com')) { + function axios_noscroll(node) { + node.removeAttribute('style'); + let overlay = 'div[class^="Modal_paywallContainer"]'; + hideDOMStyle(overlay, 2); + } + waitDOMAttribute('html', 'HTML', 'style', axios_noscroll, true); + let banners = 'div[data-vars-experiment="pro-paywall"], .apexAd'; + hideDOMStyle(banners); + csDoneOnce = true; +} + +else if (matchDomain('balkaninsight.com')) { + if (dompurify_loaded) + getJsonUrl('div.subscribeWrapper', '', 'div.post_teaser', {art_append: true, art_hold: true}); +} + +else if (matchDomain(['barandbench.com', 'thenewsminute.com'])) { + let paywall = document.querySelector('div[id*="paywall-banner"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div[class^="paywall-story-"]'); + 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('/amp/')) { + amp_redirect('div#cx-interstitial-snippet', '', '/amp' + window.location.pathname); + let continue_buttons = document.querySelectorAll('button.snippet__buttons--continue'); + for (let elem of continue_buttons) + elem.addEventListener('click', function () { window.location.reload(); }); + let ads = 'div[class*="_AdWrapper-"], div[class*="-adWrapper-"]'; + hideDOMStyle(ads); + } else { + amp_unhide_subscr_section('.wsj-ad, amp-ad'); + amp_images_replace(); + let login = document.querySelector('div.login-section-container'); + removeDOMElement(login); + } +} + +else if (matchDomain('billboard.com')) { + if (window.location.pathname.endsWith('/amp/')) { + amp_unhide_subscr_section('amp-ad, amp-embed'); + } +} + +else if (matchDomain('bizjournals.com')) { + let paywall = document.querySelector('div[data-dev="CxWidget_article:wall"]'); + if (paywall) { + removeDOMElement(paywall); + let hidden_content = document.querySelector('article div[style="display: none;"]'); + if (hidden_content) + hidden_content.removeAttribute('style'); + } else { + let paywall = document.querySelector('div#cxense-paywall'); + if (paywall) { + removeDOMElement(paywall); + let paywalled_content = document.querySelectorAll('.paywalled-content[style]'); + for (let elem of paywalled_content) + elem.removeAttribute('style'); + } + } + let dialog = document.querySelector('div[id^="headlessui-dialog-"]'); + if (dialog) { + removeDOMElement(dialog); + let body = document.querySelector('body'); + if (body) + body.click(); + } + 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 { + let ads = 'div.arc_ad'; + 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.l-ad, div.in-post-sticky, aside.has-video-ad, div.ad-callout-wrapper'; + hideDOMStyle(ads); +} + +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('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.contentBody[hidden]'); + if (article_hidden) { + let attributes = article_hidden.attributes; + for (let elem of attributes) { + let name = elem.name; + if (name !== 'class') + article_hidden.removeAttribute(name); + } + } +} + +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 0px; 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'); + } + } +} + +else if (matchDomain('cnn.com')) { + 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('columbian.com')) { + let url = window.location.href; + func_post = function () { + let modal = document.querySelector('div.modal'); + let fade = document.querySelector('div[style*="background-image: linear-gradient"]'); + removeDOMElement(modal, fade); + } + getGoogleWebcache(url, 'div#inline-paywall', '', 'div[itemprop="articleBody"]'); +} + +else if (matchDomain('csmonitor.com')) { + let paywall = document.querySelector('div.paywall'); + removeDOMElement(paywall); +} + +else if (matchDomain('dailywire.com')) { + let paywall = document.querySelector('#post-body-text > div > div[class]'); + if (paywall) + paywall.removeAttribute('class'); +} + +else if (matchDomain('dallasnews.com')) { + if (window.location.search.startsWith('?outputType=amp')) { + amp_unhide_subscr_section('amp-ad, amp-embed'); + } +} + +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(['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.startsWith('/article/')) { + let paywall = document.querySelector('div#mainPanel div[class^="FCR_"]'); + if (!window.location.search.startsWith('?rel=plus')) { + if (paywall) { + removeDOMElement(paywall); + window.location.href = window.location.pathname + '?rel=plus'; + } + } else { + let article = document.querySelector('div > section[class]'); + if (paywall && article && dompurify_loaded) { + removeDOMElement(paywall); + article.classList.remove('_2S7l9_l2eDI5b8DSR29ijf'); + let scripts = document.querySelectorAll('script:not([src]):not([type])'); + let json_script; + for (let script of scripts) { + if (script.text.match(/window.INITIAL_STATE\s?=\s?/)) { + json_script = script; + break; + } + } + if (json_script) { + let split1 = json_script.text.split(/window.INITIAL_STATE\s?=\s?/)[1]; + let state = (split1.split('};')[0] + '}').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'); + } +} + +else if (matchDomain('economist.com')) { + if (window.location.pathname.startsWith('/interactive/')) { + let paywall = document.querySelector('div.paywall'); + if (paywall) { + let hide_style = document.querySelector('body > style'); + removeDOMElement(paywall, hide_style); + } + } else { + let url = window.location.href; + getGoogleWebcache(url, 'div#tp-regwall', '', 'section[data-body-id]'); + } + let ads = 'div[class*="_advert__"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('enotes.com')) { + let paywall = document.querySelectorAll('section.c-cta-section'); + if (paywall.length) { + removeDOMElement(...paywall); + let blurred = document.querySelectorAll('div[class^="_"]'); + for (let elem of blurred) + elem.removeAttribute('class'); + let intro = document.querySelectorAll('div.o-rte-text > p:not([class]), div.o-rte-text > h3'); + for (let elem of intro) + removeDOMElement(elem); + let section_words = pageContains('p[class="u-align--center"]', /\(The entire section contains/); + let ads = document.querySelectorAll('.ad-hfu'); + hideDOMElement(...section_words, ...ads); + } +} + +else if (matchDomain('epoch.org.il')) { + if (dompurify_loaded) + getJsonUrl('div.register-login-box', '', 'div.paywall'); +} + +else if (matchDomain('espn.com')) { + let url = window.location.href; + let paywall = document.querySelector('aside.espn-plus-container-wrapper'); + if (paywall) { + removeDOMElement(paywall); + replaceDomElementExt(url, false, false, 'div.article-body'); + } +} + +else if (matchDomain('euobserver.com')) { + let div_hidden = document.querySelector('div.membership-upsell.show'); + if (div_hidden) + div_hidden.classList.remove('show'); +} + +else if (matchDomain('fastcompany.com')) { + let paywall = document.querySelector('div.paywall'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let scripts = document.querySelectorAll('script:not([src]):not([type])'); + let json_script; + for (let script of scripts) { + if (script.text.match(/window\.appState\s=\s/)) { + json_script = script; + break; + } + } + if (json_script) { + try { + let json = JSON.parse(json_script.text.split(/window\.appState\s=\s/)[1].split('};')[0].replace(/:undefined([,}])/g, ':"undefined"$1') + '}'); + if (json) { + let pars_array = json.post.data.post.content; + let article = document.querySelector('article'); + if (pars_array.length && article) { + article.innerHTML = ''; + article.classList.remove('post__article--lock'); + let parser = new DOMParser(); + for (let par_array of pars_array) { + for (let par of par_array) { + let content_new = parser.parseFromString('
' + DOMPurify.sanitize(par, dompurify_options) + '
', 'text/html'); + let elem = content_new.querySelector('div'); + 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/') ? 'amp-ad, amp-embed, .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('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'; + hideDOMStyle(ads); +} + +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'); + } +} + +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 banners = document.querySelectorAll('div.banner-pp, a.readmore'); + removeDOMElement(...banners); +} + +else if (matchDomain(['haaretz.co.il', 'haaretz.com', 'themarker.com'])) { + let url = window.location.href; + let body_wrapper_sel = 'section[data-testid="article-body-wrapper"]'; + let paywall_sel = 'div[data-test="paywallMidpage"], ' + body_wrapper_sel + ' a[href^="https://promotion."]'; + let article_sel = 'div[data-test="articleBody"], ' + body_wrapper_sel; + let article_link_sel = 'article header, main.article-page p, ' + article_sel; + if (window.location.pathname.includes('/.')) { + let page_script = document.querySelector('script[src*="/page-"]'); + if (page_script) { + let disabled_items = 'section[data-testid="zoidberg-list"], section#comments-section'; + hideDOMStyle(disabled_items); + let noprint = document.querySelectorAll('div.no-print'); + for (let elem of noprint) + if (!elem.hasChildNodes()) + hideDOMElement(elem); + } + func_post = function () { + let article_link = document.querySelector(article_link_sel); + if (article_link) { + let article_new = document.querySelector(article_sel); + let paywall = article_new.querySelector(paywall_sel); + if (paywall) { + removeDOMElement(paywall); + article_link.firstChild.before(googleSearchToolLink(url)); + } + } + } + window.setTimeout(function () { + getArchive(url, paywall_sel, '', article_sel, '', article_sel, article_link_sel); + }, 1000); + } else if (window.location.pathname.includes('/ty-article-live/')) { + let paywall = document.querySelector(paywall_sel); + if (paywall) { + removeDOMElement(paywall); + let article = document.querySelector(article_sel); + if (article) { + //article.before(archiveLink_renew(url)); + article.before(archiveLink(url)); + } + } + } else if (window.location.pathname === '/') { + let overlays = document.querySelectorAll('div > div > svg[data-test="IconAlefLogoTransparent"]'); + for (let elem of overlays) + removeDOMElement(elem.parentNode.parentNode); + let inert_links = document.querySelectorAll('article[inert]'); + for (let elem of inert_links) + elem.removeAttribute('inert'); + } else if (window.location.pathname === '/error') { + window.setTimeout(function () { + let params = new URL(window.location).searchParams; + let path = params.get('path'); + if (path) + window.location.pathname = path; + }, 500); + } +} + +else if (matchDomain('hbr.org')) { + function hbr_main() { + window.top.postMessage({type: 'article-paywall:full-content'}, '*'); + } + let popup = document.querySelector('.persistent-banner'); + removeDOMElement(popup); + let paywall = document.querySelector('div#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('hindutamil.in')) { + if (!window.location.pathname.startsWith('/amp/')) { + amp_redirect('div.premium-class-bt'); + } +} + +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('inc42.com')) { + if (window.location.pathname.endsWith('/amp/')) { + amp_unhide_access_hide('="status"', '="NOT status"', 'amp-ad, amp-embed, div.wru-widget'); + } else { + let div_hidden = document.querySelector('div.single-post-content'); + if (div_hidden) + div_hidden.removeAttribute('class'); + let banner = 'div[id*="_leaderboard_"]'; + hideDOMStyle(banner); + } +} + +else if (matchDomain('indianexpress.com')) { + if (window.location.pathname.endsWith('/lite/')) + amp_unhide_access_hide('="metering.result=\'ALLOW_ACCESS\'"', '', 'div.amp-ad, amp-embed'); + 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"', 'amp-ad, amp-embed'); + } + } +} + +else if (matchDomain('infzm.com')) { + let url = window.location.href; + if (url.includes('/wap/#/')) { + 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 (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.querySelectorAll('div#paywall-div'); + if (paywall.length) { + hideDOMElement(...paywall); + let blurred = document.querySelectorAll('div[class*="Product_makeBlur__"]'); + for (let elem of blurred) + elem.removeAttribute('class'); + csDoneOnce = true; + } +} + +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('janes.com')) { + let articles = document.querySelectorAll('div.article-box'); + for (let article of articles) { + let gated_text = article.querySelector('div > div.gated-text'); + if (gated_text) { + let art_link = article.querySelector('a[href^="mailto:"][href*="&body="]'); + if (art_link) { + let url = decodeURIComponent(art_link.href.split('&body=')[1]); + let url_pathname = new URL(url).pathname; + let og_url = url_pathname.match(/\/[\w-]+\//)[0] + 'news-detail' + url_pathname.match(/\/[\w-]+$/)[0]; + let par = document.createElement('p'); + let weblink = document.createElement('a'); + weblink.href = og_url; + weblink.innerText = 'BPC > full text'; + par.appendChild(weblink); + gated_text.parentNode.replaceChild(par, gated_text); + } + } + } +} + +else if (matchDomain('japantimes.co.jp')) { + if (!window.location.pathname.endsWith('/amp')) { + window.setTimeout(function () { + let paywall = document.querySelector('div.subscribe'); + if (paywall) { + let banner = document.querySelector('div.blocker > div.tp-container-inner'); + removeDOMElement(paywall, banner); + let article = document.querySelector('div.article-body'); + if (article) { + let url = window.location.href; + article.firstChild.before(nftLink(url)); + } + } + }, 2000); + } else + ampToHtml(); +} + +else if (matchDomain('jazziz.com')) { + if (dompurify_loaded) { + let art_options = {}; + if (window.location.pathname.startsWith('/jazziz-discovery-')) + art_options = {art_append: true, art_hold: true}; + getJsonUrl('div.emoxie-pay-wall', '', 'div.restricted-content', art_options); + window.setTimeout(function () { + let slideshow = document.querySelector('div[data-slider-id][style]'); + if (slideshow) + slideshow.removeAttribute('style'); + }, 1000); + } +} + +else if (matchDomain('jpost.com')) { + let premium_banners = document.querySelectorAll('.hide-for-premium, #hiddenPremiumForm, #hiddenLink'); + removeDOMElement(...premium_banners); +} + +else if (matchDomain(['latimes.com', 'sandiegouniontribune.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 paywall = document.querySelector('div#subscription_paid_message, div.subscribeNow'); + if (paywall) { + let intro = document.querySelector('div.story'); + removeDOMElement(paywall, intro); + let restricted_message = document.querySelector('div.restricted_message'); + if (restricted_message) + restricted_message.classList.remove('restricted_message'); + let paywall_content = document.querySelector('div.paywall-content.hide'); + if (paywall_content) + paywall_content.classList.remove('hide'); + } + 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('marketwatch.com')) { + if (!window.location.pathname.startsWith('/amp/')) { + amp_redirect('div#cx-snippet'); + } else { + let meter = document.querySelector('div.meter'); + let container_sponsored = document.querySelector('div.container--sponsored'); + removeDOMElement(meter, container_sponsored); + amp_unhide_subscr_section('.display-ad'); + } + let ads = 'div.element--ad, div.j-ad'; + 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"', 'amp-ad, amp-embed, [class*="BannerAd"], div.midday-wrapper'); + } else { + amp_redirect('div.modal.fade'); + 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'); + let ads = 'div.ad-slot, div.InsertedAd'; + hideDOMStyle(ads); + }, 2000); +} + +else if (matchDomain('nationalreview.com')) { + if (!window.location.pathname.endsWith('/amp/')) { + window.setTimeout(function () { + let paywall = document.querySelector('div.continue-reading'); + if (paywall) { + removeDOMElement(paywall); + refreshCurrentTab(); + } + }, 5000); + } + 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('newleftreview.org')) { + window.setTimeout(function () { + let url = window.location.href; + getGoogleWebcache(url, 'div.promo-wrapper', '', 'div.article-page'); + }, 500); +} + +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')) { + let url = window.location.href; + func_post = function () { + let lazy_images = document.querySelectorAll('img.lazyload[data-src]:not([src])'); + for (let elem of lazy_images) + elem.src = elem.getAttribute('data-src').split('?')[0] + '?width=800'; + let break_pre_array = pageContains('div.non-paywall > p', /…\s?$/); + if (break_pre_array.length) { + let break_pre = break_pre_array[0]; + let break_post = document.querySelector('div.paywall > p'); + if (break_post) { + let parser = new DOMParser(); + let doc = parser.parseFromString('

' + DOMPurify.sanitize(break_pre.innerHTML.replace(/\s?…\s?/, ' ') + break_post.innerHTML) + '

', 'text/html'); + let content_new = doc.querySelector('p'); + break_pre.parentNode.replaceChild(content_new, break_pre); + removeDOMElement(break_post); + } + } + } + getGoogleWebcache(url, 'section#subscription-barrier', '', 'div.article-body, article'); + let ads = 'div[class*="Advert"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('newsday.com')) { + if (window.location.pathname.startsWith('/amp/')) { + amp_unhide_access_hide('="AccessLevel = \'Full Content Access\' OR Error = true"', '="Error != true AND UserState != \'Subscribed\'"'); + } else { + let nd_lock = document.querySelector('html[class]'); + if (nd_lock) + nd_lock.removeAttribute('class'); + let ads = 'div[class^="ad_full-banner_"]'; + 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); + 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', '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 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')) { + 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('nzherald.co.nz')) { + // plus code in contentScript_once_var.js (timing) + let premium_toaster = '#premium-toaster'; + hideDOMStyle(premium_toaster); +} + +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(pl_ringier_domains)) { + if (matchDomain('businessinsider.com.pl')) { + let paywall = document.querySelector('div#content-premium-offer'); + removeDOMElement(paywall); + } else if (matchDomain('newsweek.pl')) { + let premium = document.querySelector('div.contentPremium[style]'); + if (premium) { + premium.removeAttribute('class'); + premium.removeAttribute('style'); + } + let premium_videos = document.querySelectorAll('div.videoPremiumWrapper > div.embed__mainVideoWrapper'); + for (let video of premium_videos) { + video.removeAttribute('class'); + video.parentNode.removeAttribute('class'); + } + let placeholder = document.querySelector('div#contentPremiumPlaceholder[class]'); + if (placeholder) + placeholder.removeAttribute('class'); + } else if (matchDomain('onet.pl')) { + function onet_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) { + let article = document.querySelector('section[class^="Body_content__"] > div') || document.querySelector('article section'); + if (article) { + let parser = new DOMParser(); + let blocks = json.props.pageProps.story ? json.props.pageProps.story.blocks : json.props.pageProps.blocks; + let pars = blocks.find(x => x.type === 'contentPremium').elements; + for (let par of pars) { + let par_elem; + if (['heading', 'paragraph'].includes(par.type)) { + if (par.text) { + let doc = parser.parseFromString('
' + DOMPurify.sanitize(par.text, dompurify_options) + '
', 'text/html'); + par_elem = doc.querySelector('div'); + } + } else if (par.type === 'unordered_list') { + if (par.entries) { + par_elem = document.createElement('ul'); + par_elem.style = 'list-style-type: disc;'; + for (let item of par.entries) { + let doc = parser.parseFromString('
  • ' + DOMPurify.sanitize(item, dompurify_options) + '
  • ', 'text/html'); + par_item = doc.querySelector('li'); + par_elem.appendChild(par_item); + } + } + } else if (par.parameters) { + if (par.parameters.embedCode) { + let doc = parser.parseFromString('
    ' + DOMPurify.sanitize(par.parameters.embedCode, dompurify_options) + '
    ', 'text/html'); + par_elem = doc.querySelector('div'); + } + } else if (!(par.slotId || ['commentsButton'].includes(par.type))) + console.log(par); + if (par_elem) + article.appendChild(par_elem); + } + } + } + } catch (err) { + console.log(err); + } + } + } + let tp_container_sel = ' div.tp-container-inner'; + waitDOMElement('div#pianoOffer' + tp_container_sel + ', div.contentPremium' + tp_container_sel, 'DIV', onet_main); + } else { + function archive_main(node) { + removeDOMElement(node); + let article_sel; + if (matchDomain('forbes.pl')) + article_sel = 'div[data-run-module="local/main_amd.premiumPlaceholder"]'; + else if (matchDomain('auto-swiat.pl')) + article_sel = 'div[data-header="header#pageHeader"]'; + else if (matchDomain('komputerswiat.pl')) + article_sel = 'div[data-run-module="local/main.adult"] > div:nth-last-of-type(1) article'; + let url = window.location.href; + let url_archive = 'https://' + archiveRandomDomain() + '/' + url.split(/[#\?]/)[0]; + replaceDomElementExt(url_archive, true, false, article_sel); + } + waitDOMElement('div.contentPremium div.tp-container-inner', 'DIV', archive_main); + } + let ads = 'div[class^="AdPlaceholder_"], div[data-placeholder-caption], div[data-run-module$=".floatingAd"], aside[data-ad-container], [class^="pwAds"], .hide-for-paying, div.onet-ad, div.bottomBar'; + 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('project-syndicate.org')) { + let url = window.location.href; + let paywall_sel = 'div.paywall--base'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + let article_sel = 'div[data-page-area="article-body"]'; + let article = document.querySelector(article_sel); + if (article) + getArchive(url, paywall_sel, '', article_sel); + else { + removeDOMElement(paywall); + let split_top = document.querySelector('div.split-top'); + if (split_top) + split_top.after(archiveLink(url)); + } + } +} + +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('rp.pl')) { + let url = window.location.href; + getGoogleWebcache(url, 'div.paywallComponentWrapper', '', 'div.main--content--body'); +} + +else if (matchDomain('rugbypass.com')) { + if (window.location.pathname.startsWith('/plus/')) { + 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'); + } + } else + csDoneOnce = true; +} + +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')) { + if (window.location.hostname.startsWith('amp.')) { + amp_unhide_subscr_section('amp-ad, div.ad-banner, div.advert-fly-carpet-container, div.inline-advert'); + let default_meters = document.querySelectorAll('div[id^="default-meter-page-views"]'); + removeDOMElement(...default_meters); + } else { + let section_hidden = document.querySelectorAll('section[data-qa="ContentBody-ContentBodyContainer"][class]'); + for (let elem of section_hidden) + elem.removeAttribute('class'); + let paywalled = document.querySelector('div.paywalled-content'); + if (paywalled) + paywalled.removeAttribute('class'); + let ads = 'div[data-qa*="AdSlot"], div.adblock-message'; + hideDOMStyle(ads); + } +} + +else if (matchDomain('seattletimes.com')) { + let ads = '.top-ad-wrapper'; + hideDOMStyle(ads); +} + +else if (matchDomain('seekingalpha.com')) { + if (window.location.pathname.match(/^\/(article|news)\//)) { + let article = document.querySelector('div > div[data-test-id="article-content"]'); + if (article) { + if (!content) + content = article.outerHTML; + function sa_main(node) { + hideDOMElement(node); + let parser = new DOMParser(); + let doc = parser.parseFromString(DOMPurify.sanitize(content, dompurify_options), 'text/html'); + let article_new = doc.querySelector('div'); + article_new.id = 'done'; + if (article.parentNode) + article.parentNode.replaceChild(article_new, article); + let unfade = document.querySelector('head > style#fade'); + if (!unfade && document.head) { + let sheet = document.createElement('style'); + sheet.id = 'fade'; + sheet.innerText = 'div.vibB6, div.bg-share-card-bg {position:unset !important;}'; + document.head.appendChild(sheet); + } + } + if (content && !article.id && dompurify_loaded) { + let paywall_sel = 'div[data-test-id="after-layout-content-slot"], div[aria-modal="true"]'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + sa_main(paywall); + } else { + waitDOMElement(paywall_sel, 'DIV', sa_main, true); + } + function sa_noscroll(node) { + node.removeAttribute('style'); + node.removeAttribute('class'); + } + let body = document.querySelector('body'); + if (body) + sa_noscroll(body); + waitDOMAttribute('body', 'BODY', 'style', sa_noscroll, true); + waitDOMAttribute('body', 'BODY', 'class', sa_noscroll, true); + } + } + } +} + +else if (matchDomain(sg_sph_media_domains)) { + let url = window.location.href; + getArchive(url, 'div#nocx_paywall_area', '', 'main#content'); + let ads = 'div.ads, div[id^="dfp-ad-"], div.cx_paywall_placeholder'; + 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.stickyAd, div[class^="sltrib_medrec"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('sloanreview.mit.edu')) { + let url = window.location.href; + let article_sel = 'div.article-content'; + func_post = function () { + let pars = document.querySelectorAll(article_sel + ' > p'); + if (pars.length < 5) { + let article = document.querySelector(article_sel); + if (article) + article.firstChild.before(archiveLink(url)); + } + } + getGoogleWebcache(url, 'body.is-paywall', {rm_class: 'is-paywall'}, article_sel); +} + +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('sportico.com')) { + if (window.location.pathname.endsWith('/amp/')) + amp_unhide_subscr_section('amp-ad, amp-embed'); +} + +else if (matchDomain('staradvertiser.com')) { + if (window.location.pathname.endsWith('/amp/')) { + amp_unhide_subscr_section(); + } else { + let paywall = document.querySelector('div#hsa-paywall-overlay'); + if (paywall) { + removeDOMElement(paywall); + let div_hidden = document.querySelector('div#hsa-paywall-content[style]'); + if (div_hidden) + div_hidden.removeAttribute('style'); + } + } +} + +else if (matchDomain('startribune.com')) { + let noscroll = document.querySelector('body[class]'); + if (noscroll) + noscroll.style = 'overflow: auto !important; position: static !important;'; + let modal = document.querySelector('div.modal-backdrop'); + removeDOMElement(modal); +} + +else if (matchDomain('statista.com')) { + if (window.location.pathname.startsWith('/outlook/')) { + let promo = document.querySelector('section#promotionElement'); + let chartbox_paywall = document.querySelectorAll('div.xmoChartBoxPaywall'); + removeDOMElement(promo, ...chartbox_paywall); + let blurred = document.querySelectorAll('.blurred'); + for (let elem of blurred) + elem.removeAttribute('class'); + } +} + +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('studocu.com')) { + window.setTimeout(function () { + let paywall = document.querySelector('button[data-test-selector^="preview-banner-"]'); + if (paywall) { + let paywall_banner = document.querySelector('#document-wrapper > div:not([style])'); + let banners = document.querySelectorAll('div.pf > :not(.page-content), div#premium-page-header'); + removeDOMElement(paywall_banner, ...banners); + window.setTimeout(function () { + let blurred_pages = document.querySelectorAll('div.page-content[style]'); + for (let blurred_page of blurred_pages) { + let page = document.createElement('span'); + page.setAttribute('class', 'page-content'); + page.appendChild(blurred_page.firstChild); + blurred_page.parentNode.replaceChild(page, blurred_page); + } + }, 2000); + } + }, 1000); +} + +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('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 && dompurify_loaded) { + let art_options = { + art_append: true, + 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('theathletic.com')) { + if (!(window.location.search.match(/(\?|&)amp/) && !document.querySelector('head > link[rel="amphtml"]'))) { + function theathletic_func(node) { + removeDOMElement(node); + let overlays = 'div[id*="overlay"], div:empty:not([data-rjs])'; + hideDOMStyle(overlays); + let body = document.querySelector('body'); + if (body) { + body.style.overflow = 'visible'; + body.style.position = 'relative'; + window.scrollTo(0, 1000); + } + } + waitDOMElement('div[id^="slideup-"]', 'DIV', theathletic_func); + csDoneOnce = true; + } else { + amp_unhide_subscr_section(); + amp_unhide_access_hide('', '*="NOT granted"'); + } + let apron = document.querySelector('div#free-apron-cta, div.slideup-free-apron-container'); + removeDOMElement(apron); +} + +else if (matchDomain('theatlantic.com')) { + let lazy_images = document.querySelectorAll('img[class*="Image_lazy__"]'); + for (let elem of lazy_images) + removeClassesByPrefix(elem, 'Image_lazy__'); + let videos = document.querySelectorAll('iframe[data-src]:not([src])'); + for (let video of videos) + video.src = video.getAttribute('data-src'); + let banners = 'aside#paywall, div[class^="LostInventoryMessage_"]'; + hideDOMStyle(banners); +} + +else if (matchDomain('thebulletin.org')) { + if (dompurify_loaded) + getJsonUrl('div.article--cropped', '', 'div#body-copy', {art_append: true}); +} + +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 = document.createElement('figure'); + let par_img = document.createElement('img'); + par_img.src = card[1].url; + par_fig.appendChild(par_img); + par_elem.appendChild(par_fig); + let par_cap = document.createElement('figcaption'); + par_cap.innerText = card[1].title + ' ' + card[1].credit; + par_elem.appendChild(par_cap); + } 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 = 'aside.AdSlot, div.FooterAd'; + hideDOMStyle(ads); +} + +else if (matchDomain('thediplomat.com')) { + if (matchDomain('magazine.thediplomat.com')) { + let preview = document.querySelector('article.dpl-preview'); + if (preview) + preview.classList.remove('dpl-preview'); + } +} + +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, div[class^="BaseAd__"]'; + hideDOMStyle(ads); +} + +else if (matchDomain(['thehindu.com', 'thehindubusinessline.com'])) { + if (!window.location.pathname.endsWith('/amp/')) { + let counter = '#test'; + let ads = 'div.article-ad, div.dfp-ad, div#paywallbox, div[id^="piano-art-"]'; + hideDOMStyle(counter + ', ' + ads); + } else { + let ads = 'amp-ad, amp-embed, [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) { + let url_next = json.query.slug; + if (url_next && !window.location.pathname.includes(url_next)) + refreshCurrentTab(); + let pars = json.props.pageProps.post.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 = document.createElement('figure'); + let img = document.createElement('img'); + img.src = par.data.target.fields.file.url; + figure.appendChild(img); + if (par.data.target.fields.description) { + let caption = document.createElement('figcaption'); + caption.innerText = par.data.target.fields.description; + figure.appendChild(caption); + } + 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('thelawyersdaily.ca')) { + if (window.location.pathname.startsWith('/amp/')) { + ampToHtml(); + } else { + let modal = document.querySelectorAll('#NewsletterModal, .modal-backdrop'); + removeDOMElement(...modal); + } +} + +else if (matchDomain('thenewatlantis.com')) { + let article_gated = document.querySelector('.article-gated'); + if (article_gated) + article_gated.classList.remove('article-gated'); +} + +else if (matchDomain('thepointmag.com')) { + let overlay = document.querySelectorAll('div.overlay, div#tpopup-'); + removeDOMElement(...overlay); +} + +else if (matchDomain('thequint.com')) { + let lock = document.querySelector('div > img[alt^="lock"]'); + if (lock && dompurify_loaded) { + lock.removeAttribute('alt'); + window.setTimeout(function () { + 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'); + } + }, 4000); + function thequint_unhide(node) { + node.removeAttribute('style'); + } + waitDOMAttribute('div#story-body-wrapper', 'DIV', 'style', thequint_unhide, true); + } +} + +else if (matchDomain('theverge.com')) { + let paywall = document.querySelector('div.bg-paywall-fade'); + 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); + let article = document.querySelector('div.duet--article--article-body-component-container'); + if (json && article) { + let json_pars = json.props.pageProps.hydration.responses[0].data.entryRevision.body.components; + article.innerHTML = ''; + let parser = new DOMParser(); + for (let par of json_pars) { + let elem = document.createElement('p'); + elem.style = 'margin: 20px 0px;'; + let type = par.__typename; + if (['EntryBodyParagraph', 'EntryBodyHeading'].includes(type)) { + if (par.contents && par.contents.html) { + if (type === 'EntryBodyHeading') + elem.style = 'font-weight: bold;'; + let doc = parser.parseFromString('

    ' + DOMPurify.sanitize(par.contents.html) + '
    ', 'text/html'); + elem.appendChild(doc.querySelector('div')); + } + } else if (type === 'EntryBodyHorizontalRule') { + elem.appendChild(document.createElement('hr')); + } else if (type === 'EntryBodyImage') { + if (par.image && par.image.url) { + let figure = document.createElement('figure'); + if (par.image.asset && par.image.asset.title) + figure.appendChild(document.createTextNode(par.image.asset.title)); + let img = document.createElement('img'); + img.src = par.image.url; + figure.appendChild(img); + if (par.image.caption && par.image.caption.html) { + let caption = document.createElement('figcaption'); + caption.innerText = par.image.caption.html; + if (par.image.credit && par.image.credit.html) + caption.innerText += ' - ' + par.image.credit.html; + figure.appendChild(caption); + } + elem.appendChild(figure); + } + } else if (type === 'EntryBodyPullquote') { + if (par.quote && par.quote.html) { + let doc = parser.parseFromString('
    ' + DOMPurify.sanitize(par.quote.html) + '
    ', 'text/html'); + elem.appendChild(doc.querySelector('div')); + } + } else if (type === 'EntryBodyBlockquote') { + if (par.paragraphs) { + for (let quote_par of par.paragraphs) { + if (quote_par.contents && quote_par.contents.html) { + let doc = parser.parseFromString('
    ' + DOMPurify.sanitize(quote_par.contents.html) + '
    ', 'text/html'); + elem.appendChild(doc.querySelector('div')); + } + } + } + } else if (type === 'EntryBodyList') { + if (par.items) { + let ul = document.createElement('ul'); + for (let item of par.items) { + if (item.line && item.line.html) { + let li = document.createElement('li'); + let doc = parser.parseFromString('
    ' + DOMPurify.sanitize(item.line.html) + '
    ', 'text/html'); + li.appendChild(doc.querySelector('div')); + ul.appendChild(li); + } + } + elem.appendChild(ul); + } + } else + console.log(par); + if (elem.hasChildNodes()) + article.appendChild(elem); + } + } + } catch (err) { + console.log(err); + } + } + } +} + +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')) { + if (dompurify_loaded) + getJsonUrl('div#zephr-payment-form-root', '', 'div.entry-content', {art_append: true}); + let fade = document.querySelector('div.content-area div[style*="background-image: linear-gradient"]'); + removeDOMElement(fade); +} + +else if (matchDomain('timeshighereducation.com')) { + let paywall_cta = document.querySelector('div.paywall-cta'); + if (paywall_cta) { + paywall_cta.removeAttribute('style'); + let hidden_divs = document.querySelectorAll('div[style="display: none;"]'); + for (let hidden_div of hidden_divs) + hidden_div.removeAttribute('style'); + let paywall_fade = document.querySelector('div.paywall-fade'); + if (paywall_fade) + paywall_fade.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[id^="div-gpt-in-article-ad-"], div[class^="the-dfp__in-article-ATD"]'; + 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 = ''; + let sheet = document.createElement('style'); + sheet.innerText = '[type="synopsis"]::after {background: none !important;}'; + document.head.appendChild(sheet); + 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_')) { + amp_redirect('div[id^="story-blocker"]', '', url.replace('/articleshow/', '/amp_articleshow/')); + } else { + let amp_images = document.querySelectorAll('div.inline-image > div.inline-imgecontent > amp-img[src]'); + for (let amp_image of amp_images) { + amp_image.parentNode.removeAttribute('class'); + amp_image.parentNode.parentNode.removeAttribute('class'); + let elem = document.createElement('img'); + Object.assign(elem, { + src: amp_image.getAttribute('src'), + alt: amp_image.getAttribute('alt') + }); + amp_image.parentNode.replaceChild(elem, amp_image); + } + } + } +} + +else if (matchDomain(no_nhst_media_domains)) { + let url = window.location.href; + if (url.includes('.tradewindsnews.com/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 if (matchDomain('upstreamonline.com')) { + 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.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 { + elem = document.createElement('figure'); + elem.className = 'dn-image'; + let img = document.createElement('img'); + img.src = pars[par.src]; + elem.appendChild(img); + if (par.caption) { + let caption = document.createElement('p'); + caption.innerText = pars[par.caption]; + if (par.credit) + caption.innerText += ' (' + pars[par.credit] + ')'; + elem.appendChild(caption); + } + } + } else if (type === 'news' && par.title && par.url) { + elem = document.createElement('a'); + elem.href = pars[par.url]; + elem.innerText = 'Related: ' + pars[par.title]; + elem.style = 'font-weight: bold;'; + } else if (!['ad', 'author', 'break', 'Location', 'news', 'Organisation', 'promobox', 'Person', 'Region', 'Regions', 'related', 'Sectors'].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); + } + } + } + }, 1000); + } else { + let fade = document.querySelector('div[style*="background-image: linear-gradient"]'); + if (fade) { + removeDOMElement(fade); + let header = document.querySelector('div.article-body > div'); + header_nofix(header); + } + } +} + +else if (matchDomain(uk_incisive_media_domains)) { + let url = window.location.href; + let paywall_sel = 'div#d-wrapper'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + let live_blog = document.querySelector('head > meta[name="description"][content^="In this live blog"]'); + let article_sel = 'div.article-content'; + let article = document.querySelector(article_sel); + if (article) { + if (live_blog) { + removeDOMElement(paywall); + article.firstChild.before(googleWebcacheLink(url)); + } else { + getGoogleWebcache(url, 'div#d-wrapper', '', article_sel); + } + } + } +} + +else if (matchDomain(usa_conde_nast_domains)) { + let banners = document.querySelectorAll('aside.paywall-bar, div[class^="MessageBannerWrapper-"], div.ad-stickyhero'); + removeDOMElement(...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 { + 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); + 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'; + hideDOMStyle(ads); +} + +else if (matchDomain(usa_outside_mag_domains)) { + let ads = 'div.js-ad'; + hideDOMStyle(ads); +} + +else if (matchDomain(usa_tribune_domains)) { + let overlay = document.querySelector('div#zephr-overlay'); + removeDOMElement(overlay); +} + +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('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_sel = 'div[data-testid="ArticlePageChunks"]'; + let article = document.querySelector(article_sel); + if (article) { + let pars = article.querySelectorAll('p'); + if (pars.length < 5) { + let url = window.location.href; + let url_archive = 'https://' + archiveRandomDomain() + '/' + url.split(/[#\?]/)[0]; + csDoneOnce = true; + replaceDomElementExt(url_archive, true, false, article_sel); + } + } +} + +else if (matchDomain('washingtonpost.com')) { + let leaderboard = '#leaderboard-wrapper'; + let ads = 'div[data-qa$="-ad"]'; + hideDOMStyle(leaderboard + ', ' + ads); +} + +else if (matchDomain('winnipegfreepress.com')) { + let ads = '.billboard-ad-space, .article-ad, .fixed-sky'; + hideDOMStyle(ads); +} + +else if (matchDomain('wsj.com')) { + if (window.location.pathname.startsWith('/livecoverage/')) { + window.setTimeout(function () { + let paywall = document.querySelector('div#cx-lc-snippet'); + let amphtml = document.querySelector('head > link[rel="amphtml"]'); + if (paywall) { + removeDOMElement(paywall); + if (amphtml) { + amp_redirect_not_loop(amphtml); + } else { + let fade = document.querySelectorAll('div[class*="-CardWrapper"]'); + for (let elem of fade) + elem.removeAttribute('class'); + } + } + }, 1000); + } else { + let url_article = window.location.pathname.includes('/articles/'); + let path_article = window.location.pathname.match(/((\w)+(\-)+){3,}\w+/); + if (url_article || path_article) { + if (window.location.pathname.startsWith('/amp/')) { + amp_unhide_subscr_section(); + } else { + let paywall_sel = '.snippet-promotion, div#cx-snippet-overlay'; + let paywall = document.querySelector(paywall_sel); + if (paywall) { + if (!matchDomain('www.wsj.com')) { + removeDOMElement(paywall); + if (url_article) + window.location.href = window.location.href.replace('wsj.com', 'wsj.com/amp'); + else + window.location.href = '/amp/articles/' + path_article[0]; + } else if (dompurify_loaded) { + let url = window.location.href; + let article_sel = 'article section'; + let wsj_pro = paywall.querySelector('a[href^="https://wsjpro.com/"]'); + if (wsj_pro) + article_sel = 'article'; + let video_sel = 'div[data-type="video"]'; + let video = document.querySelector(video_sel); + func_post = function () { + if (video) { + let video_new = document.querySelector(video_sel); + if (video_new && video_new.parentNode) + video_new.parentNode.replaceChild(video, video_new); + } + if (mobile) { + let inline_images = document.querySelectorAll('div[style] > figure > picture > img'); + for (let elem of inline_images) { + elem.style = 'width: 100%;'; + elem.removeAttribute('height'); + elem.removeAttribute('width'); + elem.parentNode.removeAttribute('style'); + elem.parentNode.parentNode.parentNode.removeAttribute('style'); + } + let inline_data = document.querySelectorAll('div[data-layout="inline"][style]'); + for (let elem of inline_data) + elem.removeAttribute('style'); + } + let read_next = document.querySelector('div#cx-what-to-read-next'); + removeDOMElement(read_next); + let inline_wrappers = document.querySelectorAll('div[style*="background-position"] > div[id^="wrapper-INLINEIMM_"]'); + for (let elem of inline_wrappers) + removeDOMElement(elem.parentNode); + } + getArchive(url, paywall_sel, '', article_sel); + } + } + } + } + } + let ads = 'div.wsj-ad, div.adWrapper, div.css-xgokil-Box'; + 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(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-ad, amp-embed, .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"]'; + hideDOMStyle(ads); + } +} + +else if ((domain = matchDomain(usa_mcc_domains)) || + (window.location.hostname.startsWith('account.') && document.querySelector('script[src*=".mcclatchyinteractive.com/"]')) || + (window.location.href.match(/\/\/amp\..+\.com\/(.+\/)?article(\d){8,}\.html/) && document.querySelector('a[href^="https://classifieds.mcclatchy.com/"]'))) { + let url = window.location.href; + let hostname = window.location.hostname; + if (!domain) + domain = hostname.replace(/^(www|account|amp)\./, ''); + if (hostname.startsWith('account.') && window.location.search.startsWith('?resume=')) { + window.setTimeout(function () { + window.location.href = 'https://amp.' + domain + '/article' + url.split('resume=')[1].split(/[#&]/)[0] + '.html'; + }, 500); + } else if (hostname.startsWith('amp.')) { + amp_unhide_subscr_section('amp-ad, amp-embed'); + let subscriptions_action = document.querySelector('div[subscriptions-action][subscriptions-display="NOT data.hasError"]'); + if (subscriptions_action) + subscriptions_action.removeAttribute('subscriptions-action'); + 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); + } + } + let premium_svgs = document.querySelectorAll('h3 > a > svg'); + let premium_link; + for (let premium_svg of premium_svgs) { + premium_link = premium_svg.parentElement; + if (premium_link.href.includes('www.')) + premium_link.href = premium_link.href.replace('www.', 'amp.'); + } + let ads = 'div[id^="zone-el-"]'; + 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('amp-ad, amp-embed, div.ampWrapperInside, div#paywall'); + else if (dompurify_loaded) + getJsonUrl('#server-paywall', '', 'div.body-copy', {art_append: 1}); +} + +else if (document.querySelector('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 > 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'); + } + } +} + +else + csDone = true; +} + +} // end bpc_done + +// 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 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 header_nofix(header, msg = 'BPC > no fix') { + if (header && !document.querySelector('div#bpc_nofix')) { + 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 getGoogleWebcache(url, paywall_sel, paywall_action = '', selector, selector_source = selector) { + let url_cache = 'https://webcache.googleusercontent.com/search?q=cache:' + url.split(/[#\?]/)[0]; + let paywall = document.querySelectorAll(paywall_sel); + if (paywall.length && dompurify_loaded) { + clearPaywall(paywall, paywall_action); + csDoneOnce = true; + replaceDomElementExt(url_cache, true, false, selector, '', selector_source); + } +} + +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 replaceDomElementExt(url, proxy, base64, selector, text_fail = '', selector_source = selector, selector_archive = selector) { + let article = document.querySelector(selector); + if (!article) + return; + if (proxy) { + if (!text_fail) { + if (url.startsWith('https://webcache.googleusercontent.com')) + text_fail = 'BPC > failed to load from Google webcache:\r\n'; + else if (url.startsWith('https://archive.')) + text_fail = 'BPC > Try for full article text (no need to report issue for 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}}); + } else { + let options = {}; + if (matchUrlDomain('espn.com', url)) + options.headers = { + 'X-Forwarded-For': randomIP(185, 185) + }; + fetch(url, options) + .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) { + false; + }); + } +} + +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 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); + let article_new = doc.querySelector(getSelectorLevel(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(window.location.href)); + 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, proxy, text_fail.replace(':', no_content_msg)); + }, 200); + } else { + replaceTextFail(url, article, 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.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'), + 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) { + let amp_redirect_date = Number(sessionStorage.getItem('###_amp_redirect')); + if (!(amp_redirect_date && Date.now() - amp_redirect_date < 2000)) { + sessionStorage.setItem('###_amp_redirect', Date.now()); + 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 = 'amp-ad', 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 = 'amp-ad', 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 refreshCurrentTab() { + window.setTimeout(function () { + window.location.reload(true); + }, 500); +} + +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([archiveRandomDomain()], 'https://{domain}?renew=1&url={url}', url, text_fail); +} + +function googleWebcacheLink(url, text_fail = 'BPC > Try for full article text:\r\n') { + if (!matchUrlDomain(['hbrchina.org'], url)) + url = url.split('?')[0]; + return externalLink(['webcache.googleusercontent.com'], 'https://{domain}/search?q=cache:{url}', url, text_fail); +} + +function googleSearchToolLink(url, text_fail = 'BPC > 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 nftLink(url, text_fail = 'BPC > Full article text:\r\n') { + return externalLink(['1ft.io'], 'https://{domain}/{url}', 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 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 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 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 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 (!['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 findKeyJson(json, keys, min_val_len = 0) { + let source = ''; + if (Array.isArray(json)) { + for (let elem of json) + source = source || findKeyJson(json[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' && keys.includes(elem)) { + if (json_elem.length > min_val_len) + return json_elem; + } else + source = source || findKeyJson(json_elem, keys, min_val_len); + } + } + return source; +} + +function getJsonUrlText(article, callback, article_id = '') { + 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; + if (!json_url && article_id) + json_url = window.location.origin + '/wp-json/wp/v2/posts/' + article_id; + if (json_url) { + fetch(json_url) + .then(response => { + if (response.ok) { + response.json().then(json => { + try { + let json_text = parseHtmlEntities(json.content.rendered); + 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); +} + +function getJsonUrl(paywall_sel, paywall_action = '', article_sel, art_options = {}, article_id = '') { + 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); + } +} + +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)); +} diff --git a/contentScript_once.js b/contentScript_once.js new file mode 100644 index 0000000..dfa4f6a --- /dev/null +++ b/contentScript_once.js @@ -0,0 +1,186 @@ +//'use strict'; +var ext_api = (typeof browser === 'object') ? browser : chrome; + +window.setTimeout(function () { + + let hostname = window.location.hostname; + let custom_domain = getCookieDomain(hostname); + let group; + if (hostname && ext_api.runtime) { + if (document.querySelector('head > link[href*=".medium.com/"]') || matchDomain(['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 (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\.(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 (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 (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(['cannstatter-zeitung.de', 'esslinger-zeitung.de', 'frankenpost.de', 'insuedthueringen.de', 'krzbb.de', 'kurier.de', 'np-coburg.de'])) + group = '###_de_mhs'; + else if (matchDomain(['bgland24.de', 'chiemgau24.de', 'innsalzach24.de', 'mangfall24.de', 'rosenheim24.de', 'wasserburg24.de'])) + group = '###_de_ovb_media'; + 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 (document.querySelector('head > link[href*="/assets.static-chmedia.ch/"]')) + group = '###_ch_media'; + else if (document.querySelector('head > link[href*=".tamedia.ch/"]')) + group = '###_ch_tamedia';// 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', '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('.se')) { + if (document.querySelector('footer > div > div > a[href="https://www.nwtmedia.se/"]')) + group = '###_se_nwt_media'; + 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 (document.querySelector('footer > div a[href^="https://www.nationalworldplc.com"]')) + group = '###_uk_nat_world'; + else if (matchDomain(['investmentweek.co.uk'])) + group = '###_uk_incisive_media'; + else if (document.querySelector('footer li > a[href^="https://www.newsquest.co.uk/"]')) + group = '###_uk_newsquest'; + } 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 (document.querySelector('script[src*=".postmedia.digital/"], head > meta[content*=".postmedia.digital/"]')) + group = '###_ca_postmedia'; + else if (document.querySelector('script[src*=".axate.io/"], script[src*=".agate.io/"]')) + group = '###_uk_axate.io'; + else if (matchDomain(['businessgreen.com', 'internationalinvestment.net', 'professionaladviser.com', 'professionalpensions.com'])) + group = '###_uk_incisive_media'; + else if (document.querySelector('footer li > a[href^="https://www.newsquest.co.uk/"]')) + group = '###_uk_newsquest'; + 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('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('head > meta[content^="https://www.mcclatchy-wires.com/"], a[href^="https://classifieds.mcclatchy.com/"], script[src*=".mcclatchyinteractive.com/"]')) + 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 (matchDomain(['journalauto.com', 'journaldupneu.com', 'j2rauto.com'])) + group = '###_fr_synerj'; + else if (matchDomain(['argusdelassurance.com', 'lagazettedescommunes.com'])) + group = '###_fr_groupe_infopro'; + else if (!matchDomain('institutionalinvestor.com') && (matchDomain('thedeal.com') || document.querySelector('footer.Page-footer a.Link[href="https://www.delinian.com/privacy-policy"]'))) + group = '###_uk_delinian';// no fix + 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'; + } + + 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..c77a4ef --- /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']; + +if (hostname.match(/\.de$/)) { + +if (matchDomain(de_madsack_domains) || document.querySelector('head > link[href*=".rndtech.de/"]')) { + function madsack_main() { + for (let n = 0; n < 10; 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 < 10; n++) { + window.setTimeout(function () { + if (window.Fusion) { + 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 < 10; 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 < 10; 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..f520f68 --- /dev/null +++ b/custom/manifest.json @@ -0,0 +1,47 @@ +{ + "background": { + "scripts": ["sites.js", "bpc_count_daily_users.js", "background.js"] + }, + "content_security_policy": "script-src 'self'; object-src 'self'", + "browser_specific_settings": { + "gecko": { + "id": "magnolia_limited_permissions@12.34", + "update_url": "https://bitbucket.org/bpc-updates/bpc_updates/downloads//updates_custom.json", + "strict_min_version": "86.0" + } + }, + "browser_action": { + "default_popup": "options/popup.html", + "default_icon": { + "128": "bypass.png" + }, + "theme_icons": [{ + "light": "bypass-dark.png", + "dark": "bypass.png", + "size": 128 + } + ] + }, + "description": "Bypass Paywalls of news sites", + "homepage_url": "https://twitter.com/Magnolia1234B", + "icons": { + "128": "bypass.png" + }, + "manifest_version": 2, + "name": "Bypass Paywalls Clean (c)", + "short_name": "Bypass Paywall", + "options_ui": { + "browser_style": true, + "open_in_tab": true, + "page": "options/options.html" + }, + "permissions": [ + "cookies", + "storage", + "activeTab", + "webRequest", + "webRequestBlocking", + "*://*/*" + ], + "version": "3.6.4.5" +} diff --git a/custom/sites_custom.json b/custom/sites_custom.json new file mode 100644 index 0000000..8822915 --- /dev/null +++ b/custom/sites_custom.json @@ -0,0 +1,935 @@ +{ + "###_remove_sites": { + "cs_code": "dn.se, faithfullymagazine.com, gazetaprawna.pl, lyrik.fr, mailplus.co.uk, onet.pl, portfolio.hu, rp-online.de", + "domain": "###" + }, + "Abajournal.com": { + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "domain": "abajournal.com" + }, + "Abcmais.com": { + "allow_cookies": 1, + "domain": "abcmais.com", + "ld_json_url": "section#section-iframe-assinante|div.degressing-opacity" + }, + "Acadienouvelle.com": { + "allow_cookies": 1, + "block_regex": "\\.acadienouvelle\\.com\\/script\\.js", + "domain": "acadienouvelle.com" + }, + "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|div.article-text|div[data-article-target='body']" + }, + "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" + }, + "Artsprofessional.co.uk": { + "allow_cookies": 1, + "block_regex": "\\.artsprofessional\\.co\\.uk\\/.+\\/js\\/content_paywall\\.js", + "domain": "artsprofessional.co.uk" + }, + "Asiamoney.com": { + "allow_cookies": 1, + "domain": "asiamoney.com", + "useragent": "googlebot" + }, + "Athensreviewofbooks.com": { + "allow_cookies": 1, + "domain": "athensreviewofbooks.com", + "ld_json": "div.freeUser|div.itemBody" + }, + "Bisnisindonesia.id": { + "allow_cookies": 1, + "domain": "bisnisindonesia.id", + "ld_json_next": "div.bottom-10|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" + }, + "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" + }, + "Bt.no": { + "allow_cookies": 1, + "domain": "bt.no", + "useragent": "facebookbot" + }, + "Btc-echo.de": { + "allow_cookies": 1, + "domain": "btc-echo.de", + "ld_json_url": "div.btc-echo-plus-paywall|div.entry-content|1" + }, + "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" + }, + "Businessnews.com.au": { + "allow_cookies": 1, + "domain": "businessnews.com.au", + "useragent": "googlebot" + }, + "Cafe.com (articles only)": { + "allow_cookies": 1, + "domain": "cafe.com", + "ld_json_url": "div.login-module|div.article-bottom-content-text-content" + }, + "Capital.bg": { + "allow_cookies": 1, + "domain": "capital.bg", + "ld_json": "div.paywall|div.story-content|1", + "useragent": "googlebot" + }, + "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": "\\.clareecho\\.ie\\/.+\\/flip-pay\\.js", + "cs_code": "[{\"cond\":\"div.td-post-content\", \"rm_class\": \"td-post-content\"}]", + "domain": "clareecho.ie" + }, + "Connexionfrance.com": { + "domain": "connexionfrance.com" + }, + "Craftscouncil.org.uk": { + "allow_cookies": 1, + "block_regex": "\\/steadyhq\\.com", + "domain": "craftscouncil.org.uk" + }, + "Dailyherald.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "dailyherald.com" + }, + "Dealstreetasia.com": { + "allow_cookies": 1, + "domain": "dealstreetasia.com", + "ld_json_next": "div.subscribe-now,div.overlay|article" + }, + "Deutsche-wirtschafts-nachrichten.de": { + "add_ext_link": "div#article-teaser-blocks|div.teaser_extra", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "deutsche-wirtschafts-nachrichten.de" + }, + "Diabeteshealth.co.in": { + "allow_cookies": 1, + "domain": "diabeteshealth.co.in", + "ld_json": "div#paywall-banner|div[class^='text-story-m_gap']" + }, + "Diariodenavarra.es": { + "allow_cookies": 1, + "domain": "diariodenavarra.es", + "ld_json": "div#paywall_message|div.free-html" + }, + "Dn.no": { + "add_ext_link": "div#sub-paywall-container|article", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "dn.no" + }, + "Edweek.org (not Market Brief)": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "edweek.org" + }, + "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" + }, + "Eluniversal.com.mx": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "eluniversal.com.mx" + }, + "Endpts.com": { + "allow_cookies": 1, + "domain": "endpts.com", + "ld_json_url": "div.epn_limit|div.epn_content" + }, + "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" + }, + "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#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" + }, + "Finanz-szene.de": { + "allow_cookies": 1, + "domain": "finanz-szene.de", + "useragent": "googlebot" + }, + "Flz.de": { + "allow_cookies": 1, + "domain": "flz.de", + "useragent": "googlebot" + }, + "Fokus.se": { + "allow_cookies": 1, + "block_regex": "\\.fokus\\.se\\/app\\/.+\\/sesamy-fpg\\.js", + "domain": "fokus.se" + }, + "Frieze.com": { + "allow_cookies": 1, + "block_regex": "js\\.pelcro\\.com", + "domain": "frieze.com" + }, + "Gazette.com": { + "allow_cookies": 1, + "block_regex": "loader-cdn\\.azureedge\\.net", + "domain": "gazette.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_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_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_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_nation_media": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.modal\",\"rm_elem\":1,\"elems\":[{\"cond\":\".nmgp\",\"rm_class\":\"nmgp\"}]}]", + "domain": "group_nation_media", + "group": "monitor.co.ug,nation.africa,thecitizen.co.tz" + }, + "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_solar_media": { + "allow_cookies": 1, + "domain": "group_uk_solar_media", + "group": "energy-storage.news,pv-tech.org", + "ld_json_url": "div.wkwp-paywall|div.wpwp-non-paywall" + }, + "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" + }, + "Heidi.news": { + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "domain": "heidi.news", + "useragent": "googlebot" + }, + "Heraldo.es": { + "allow_cookies": 1, + "block_js_inline": "\\.heraldo\\.es\\/noticias", + "domain": "heraldo.es" + }, + "Himalmag.com": { + "allow_cookies": 1, + "domain": "himalmag.com", + "ld_json": "div#metered-paywall-banner|div[class^='paywall-story-']" + }, + "Hochparterre.ch": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.pageWrapper\", \"rm_class\":\"pageWrapper\"}]", + "domain": "hochparterre.ch", + "ld_google_webcache": "div.paywall|div.article__content" + }, + "Hsj.co.uk": { + "allow_cookies": 1, + "domain": "hsj.co.uk", + "useragent": "googlebot" + }, + "Huisartsvandaag.nl": { + "allow_cookies": 1, + "domain": "huisartsvandaag.nl", + "ld_json_url": "div.article__paywall|div.article__body" + }, + "Ilglobo.com": { + "allow_cookies": 1, + "domain": "ilglobo.com", + "useragent": "googlebot" + }, + "Insidemortgagefinance.com": { + "allow_cookies": 1, + "domain": "insidemortgagefinance.com", + "ld_google_webcache": "div.article-preview|div.main-body" + }, + "Institutionalinvestor.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div[style*='background-image: linear-gradient']\", \"rm_elem\":1}]", + "domain": "institutionalinvestor.com", + "ld_google_webcache": "div.call_to_action|div.Page-articleBody" + }, + "Internationalepolitik.de": { + "allow_cookies": 1, + "domain": "internationalepolitik.de" + }, + "Investmentnews.com": { + "allow_cookies": 1, + "domain": "investmentnews.com", + "ld_google_webcache": "div.leaky_paywall_message_wrap|div#article-main-featured-content" + }, + "Ipe.com": { + "allow_cookies": 1, + "domain": "ipe.com", + "useragent": "googlebot" + }, + "Irishnews.com": { + "block_regex": "\\.irishnews\\.com\\/.+\\/js\\/(bundle|mpppaywall)\\.js", + "domain": "irishnews.com" + }, + "Jornaldocomercio.com": { + "allow_cookies": 1, + "block_regex": "\\.jornaldocomercio\\.com\\/.+\\/json\\/paywall\\.json", + "domain": "jornaldocomercio.com" + }, + "Jota.info": { + "allow_cookies": 1, + "domain": "jota.info", + "ld_json_url": "div.jota-paywall-visible|div.jota-article__content>span>p" + }, + "Jworldtimes.com": { + "allow_cookies": 1, + "domain": "jworldtimes.com", + "ld_json_url": "head>meta[property='article:publisher']|div.entry-content" + }, + "Kapital.no": { + "allow_cookies": 1, + "domain": "kapital.no", + "useragent": "googlebot" + }, + "Keymilitary.com": { + "allow_cookies": 1, + "domain": "keymilitary.com", + "useragent": "googlebot" + }, + "Kristeligt-dagblad.dk": { + "allow_cookies": 1, + "domain": "kristeligt-dagblad.dk", + "useragent": "googlebot" + }, + "Lagaceta.com.ar": { + "allow_cookies": 1, + "block_regex": "\\.lagaceta\\.com\\.ar\\/ajax\\/getInfo", + "domain": "lagaceta.com.ar", + "useragent": "facebookbot" + }, + "Lasvegasadvisor.com": { + "allow_cookies": 1, + "block_regex": "\\.lasvegasadvisor\\.com\\/(opt\\/.+|js\\/access\\.min)\\.js", + "domain": "lasvegasadvisor.com" + }, + "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" + }, + "Limerickpost.ie": { + "allow_cookies": 1, + "block_regex": "\\.limerickpost\\.ie\\/.+\\/flip-pay\\.js", + "cs_code": "[{\"cond\":\"div.td-post-content\", \"rm_class\": \"td-post-content\"}]", + "domain": "limerickpost.ie" + }, + "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" + }, + "Lindipendente.online": { + "allow_cookies": 1, + "domain": "lindipendente.online", + "useragent": "googlebot" + }, + "Luxurydaily.com": { + "allow_cookies": 1, + "domain": "luxurydaily.com", + "ld_json_url": "div.call-to-action|div.body|||meta[name='id']" + }, + "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" + }, + "Marketscreener.com (only free articles)": { + "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" + }, + "Mediapost.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"body[class]\", \"rm_attrib\":\"class\"}, {\"cond\":\"div.fade\", \"rm_elem\":1}]", + "domain": "mediapost.com", + "ld_google_webcache": "div.modal|div#article_body" + }, + "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" + }, + "Mining-journal.com": { + "allow_cookies": 1, + "domain": "mining-journal.com", + "ld_json": "div.article-teaser|div.article-content>p" + }, + "Montelnews.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div[class*='articleText_cover_'\", \"rm_class\":\"articleText_cover__98U9v\"}]", + "domain": "montelnews.com", + "ld_json_next": "div[class^='articleTeaser_teaser_']|div[class^='articleText_mainText_']" + }, + "Mopo.de": { + "allow_cookies": 1, + "domain": "mopo.de", + "ld_json_url": "div#paywall|div.paywall-fade" + }, + "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" + }, + "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" + }, + "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": { + "allow_cookies": 1, + "domain": "nordsee-zeitung.de", + "ld_google_webcache": "div.UserLoggedInContainer|article" + }, + "Novethic.fr": { + "allow_cookies": 1, + "domain": "novethic.fr", + "ld_json_url": "div#paywall|div.entry-content" + }, + "Nu.nl": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"article#LOGIN\",\"rm_elem\":1},{\"cond\":\"div.authorized-content\",\"rm_class\":\"authorized-content\"}]", + "domain": "nu.nl" + }, + "Nv.ua": { + "allow_cookies": 1, + "amp_redirect": "div[id^='media_paywall']", + "domain": "nv.ua" + }, + "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" + }, + "Pebmed.com.br": { + "allow_cookies": 1, + "block_regex": "\\/pebmed\\.com\\.br\\/wp-content\\/.+\\/paywall\\/dist\\/js\\/app\\.js", + "domain": "pebmed.com.br" + }, + "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" + }, + "Piratewires.com": { + "allow_cookies": 1, + "domain": "piratewires.com", + "useragent": "googlebot" + }, + "Policinginsight.com": { + "allow_cookies": 1, + "domain": "policinginsight.com", + "ld_json_url": "div#pi-content-gating|article|1|1" + }, + "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" + }, + "Quickmath.com": { + "domain": "quickmath.com" + }, + "Racketmn.com (refresh)": { + "allow_cookies": 1, + "domain": "racketmn.com", + "ld_google_webcache": "div[class^='ContentGate_']|div[class^='PostContent_']" + }, + "Rawstory.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "rawstory.com" + }, + "Researchprofessionalnews.com": { + "allow_cookies": 1, + "domain": "researchprofessionalnews.com", + "ld_json_url": "section.single-locked-message|section.single-locked-content" + }, + "Reviewjournal.com": { + "allow_cookies": 1, + "block_regex": "js\\.matheranalytics\\.com", + "domain": "reviewjournal.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" + }, + "Schwaebische-post.de": { + "allow_cookies": 1, + "block_regex": "\\.schwaebische-post\\.de\\/sub\\/js\\/pc-offer-west\\.js", + "domain": "schwaebische-post.de" + }, + "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" + }, + "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" + }, + "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" + }, + "Spokesman.com": { + "allow_cookies": 1, + "block_regex": "loader-cdn\\.azureedge\\.net", + "domain": "spokesman.com" + }, + "Sportsbusinessjournal.com": { + "domain": "sportsbusinessjournal.com" + }, + "Stateaffairs.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.c-memberships-message\", \"rm_elem\":1, \"elems\":[{\"cond\":\"body.access-restricted\",\"rm_class\":\"access-restricted\"}]}]", + "domain": "stateaffairs.com" + }, + "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" + }, + "Supchina.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "supchina.com" + }, + "Swp.de": { + "add_ext_link": "div.swpPayWall|section.paywall", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "swp.de" + }, + "T3n.de": { + "allow_cookies": 1, + "domain": "t3n.de", + "ld_json": "div.c-pro-wall__wrapper|div.pro-blur>p" + }, + "Tamedia.ch": { + "add_ext_link": "div#piano-premium>div|article p", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "###_ch_tamedia" + }, + "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" + }, + "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" + }, + "Thecaterer.com": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\".locked-content\",\"rm_attrib\":\"class\"}]", + "domain": "thecaterer.com", + "useragent": "googlebot" + }, + "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" + }, + "Thedispatch.com": { + "add_ext_link": "article:not(.newsletter) section.paywall-section|div.content", + "add_ext_link_type": "archive.is", + "allow_cookies": 1, + "domain": "thedispatch.com", + "ld_archive_is": "article:not(.newsletter) section.paywall-section|main>article", + "ld_json_url": "article.newsletter section.paywall-section|div.content|1" + }, + "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" + }, + "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" + }, + "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" + }, + "Tijorifinance.com": { + "allow_cookies": 1, + "domain": "tijorifinance.com", + "useragent": "googlebot" + }, + "Toledoblade.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "toledoblade.com" + }, + "Toolkits.com": { + "allow_cookies": 1, + "block_regex": "\\.toolkits\\.com\\/app\\/js\\/api\\.min\\.js", + "domain": "toolkits.com" + }, + "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" + }, + "Washingtontimes.com": { + "allow_cookies": 1, + "block_regex": "\\.tinypass\\.com", + "domain": "washingtontimes.com" + }, + "Wissenschaft.de": { + "add_ext_link": "div.plenigo-teaser|div.entry-content", + "add_ext_link_type": "google_search_tool", + "allow_cookies": 1, + "domain": "wissenschaft.de" + }, + "Wuv.de": { + "allow_cookies": 1, + "domain": "wuv.de", + "ld_google_webcache": "div.paid-article|div.font-serif" + }, + "Zeitzeichen.net": { + "allow_cookies": 1, + "block_regex": "\\/zeitzeichen\\.net\\/sites\\/default\\/files\\/js\\/js_.+\\.js", + "domain": "zeitzeichen.net" + }, + "Zvw.de": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.paywall\", \"rm_class\":\"paywall\", \"elems\":[{\"cond\":\"div.nfy-products-teaser\", \"rm_elem\":1}]}, {\"cond\":\"div.nfy-banner\", \"rm_elem\":1}]", + "domain": "zvw.de" + } +} 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..bb5263e --- /dev/null +++ b/lib/purify.min.js @@ -0,0 +1,3 @@ +/*! @license DOMPurify 3.1.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.0/LICENSE */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),A=b(RegExp.prototype.test),_=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t/gm),B=a(/\${[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:z,TMPLIT_EXPR:B,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:X,DOCTYPE_NAME:q,CUSTOM_ELEMENT:$});const V=function(){return"undefined"==typeof window?null:window},Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var J=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V();const o=e=>t(e);if(o.version="3.1.0",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:b,Element:R,NodeFilter:H,NamedNodeMap:z=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=L(j,"cloneNode"),$=L(j,"nextSibling"),J=L(j,"childNodes"),Q=L(j,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ee,te="";const{implementation:ne,createNodeIterator:oe,createDocumentFragment:re,getElementsByTagName:ie}=r,{importNode:ae}=a;let le={};o.isSupported="function"==typeof e&&"function"==typeof Q&&ne&&void 0!==ne.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:se,TMPLIT_EXPR:ue,DATA_ATTR:me,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:de,CUSTOM_ELEMENT:he}=K;let{IS_ALLOWED_URI:ge}=K,Te=null;const ye=S({},[...D,...C,...O,...v,...M]);let Ee=null;const Ae=S({},[...I,...U,...P,...F]);let _e=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ne=null,be=null,Se=!0,Re=!0,we=!1,Le=!0,De=!1,Ce=!0,Oe=!1,xe=!1,ve=!1,ke=!1,Me=!1,Ie=!1,Ue=!0,Pe=!1;const Fe="user-content-";let He=!0,ze=!1,Be={},We=null;const Ge=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ye=null;const je=S({},["audio","video","img","source","image","track"]);let Xe=null;const qe=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let Ze=Ve,Je=!1,Qe=null;const et=S({},[$e,Ke,Ve],d);let tt=null;const nt=["application/xhtml+xml","text/html"],ot="text/html";let rt=null,it=null;const at=r.createElement("form"),lt=function(e){return e instanceof RegExp||e instanceof Function},ct=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!it||it!==e){if(e&&"object"==typeof e||(e={}),e=w(e),tt=-1===nt.indexOf(e.PARSER_MEDIA_TYPE)?ot:e.PARSER_MEDIA_TYPE,rt="application/xhtml+xml"===tt?d:f,Te=E(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,rt):ye,Ee=E(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,rt):Ae,Qe=E(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,d):et,Xe=E(e,"ADD_URI_SAFE_ATTR")?S(w(qe),e.ADD_URI_SAFE_ATTR,rt):qe,Ye=E(e,"ADD_DATA_URI_TAGS")?S(w(je),e.ADD_DATA_URI_TAGS,rt):je,We=E(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,rt):Ge,Ne=E(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,rt):{},be=E(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,rt):{},Be=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,Re=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Le=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,De=e.SAFE_FOR_TEMPLATES||!1,Ce=!1!==e.SAFE_FOR_XML,Oe=e.WHOLE_DOCUMENT||!1,ke=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,Pe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,ge=e.ALLOWED_URI_REGEXP||Y,Ze=e.NAMESPACE||Ve,_e=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&<(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&<(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Re=!1),Me&&(ke=!0),Be&&(Te=S({},M),Ee=[],!0===Be.html&&(S(Te,D),S(Ee,I)),!0===Be.svg&&(S(Te,C),S(Ee,U),S(Ee,F)),!0===Be.svgFilters&&(S(Te,O),S(Ee,U),S(Ee,F)),!0===Be.mathMl&&(S(Te,v),S(Ee,P),S(Ee,F))),e.ADD_TAGS&&(Te===ye&&(Te=w(Te)),S(Te,e.ADD_TAGS,rt)),e.ADD_ATTR&&(Ee===Ae&&(Ee=w(Ee)),S(Ee,e.ADD_ATTR,rt)),e.ADD_URI_SAFE_ATTR&&S(Xe,e.ADD_URI_SAFE_ATTR,rt),e.FORBID_CONTENTS&&(We===Ge&&(We=w(We)),S(We,e.FORBID_CONTENTS,rt)),He&&(Te["#text"]=!0),Oe&&S(Te,["html","head","body"]),Te.table&&(S(Te,["tbody"]),delete Ne.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ee=e.TRUSTED_TYPES_POLICY,te=ee.createHTML("")}else void 0===ee&&(ee=Z(G,c)),null!==ee&&"string"==typeof te&&(te=ee.createHTML(""));i&&i(e),it=e}},st=S({},["mi","mo","mn","ms","mtext"]),ut=S({},["foreignobject","desc","title","annotation-xml"]),mt=S({},["title","style","font","a","script"]),pt=S({},[...C,...O,...x]),ft=S({},[...v,...k]),dt=function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!Qe[e.namespaceURI]&&(e.namespaceURI===Ke?t.namespaceURI===Ve?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===o||st[o]):Boolean(pt[n]):e.namespaceURI===$e?t.namespaceURI===Ve?"math"===n:t.namespaceURI===Ke?"math"===n&&ut[o]:Boolean(ft[n]):e.namespaceURI===Ve?!(t.namespaceURI===Ke&&!ut[o])&&(!(t.namespaceURI===$e&&!st[o])&&(!ft[n]&&(mt[n]||!pt[n]))):!("application/xhtml+xml"!==tt||!Qe[e.namespaceURI]))},ht=function(e){p(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},gt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ee[e])if(ke||Me)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Tt=function(e){let t=null,n=null;if(ve)e=""+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===tt&&Ze===Ve&&(e=''+e+"");const o=ee?ee.createHTML(e):e;if(Ze===Ve)try{t=(new W).parseFromString(o,tt)}catch(e){}if(!t||!t.documentElement){t=ne.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=Je?te:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ze===Ve?ie.call(t,Oe?"html":"body")[0]:Oe?t.documentElement:i},yt=function(e){return oe.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},Et=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},At=function(e){return"function"==typeof b&&e instanceof b},_t=function(e,t,n){le[e]&&u(le[e],(e=>{e.call(o,t,n,it)}))},Nt=function(e){let t=null;if(_t("beforeSanitizeElements",e,null),Et(e))return ht(e),!0;const n=rt(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:n,allowedTags:Te}),e.hasChildNodes()&&!At(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return ht(e),!0;if(7===e.nodeType)return ht(e),!0;if(Ce&&8===e.nodeType&&A(/<[/\w]/g,e.data))return ht(e),!0;if(!Te[n]||Ne[n]){if(!Ne[n]&&St(n)){if(_e.tagNameCheck instanceof RegExp&&A(_e.tagNameCheck,n))return!1;if(_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))return!1}if(He&&!We[n]){const t=Q(e)||e.parentNode,n=J(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(X(n[o],!0),$(e))}}return ht(e),!0}return e instanceof R&&!dt(e)?(ht(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,u([ce,se,ue],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),_t("afterSanitizeElements",e,null),!1):(ht(e),!0)},bt=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in at))return!1;if(Re&&!be[t]&&A(me,t));else if(Se&&A(pe,t));else if(!Ee[t]||be[t]){if(!(St(e)&&(_e.tagNameCheck instanceof RegExp&&A(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&A(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t))||"is"===t&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&A(_e.tagNameCheck,n)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))))return!1}else if(Xe[t]);else if(A(ge,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Ye[e]){if(we&&!A(fe,g(n,de,"")));else if(n)return!1}else;return!0},St=function(e){return"annotation-xml"!==e&&h(e,he)},Rt=function(e){_t("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=rt(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,_t("uponSanitizeAttribute",e,n),p=n.attrValue,n.forceKeepAttr)continue;if(gt(a,e),!n.keepAttr)continue;if(!Le&&A(/\/>/i,p)){gt(a,e);continue}De&&u([ce,se,ue],(e=>{p=g(p,e," ")}));const f=rt(e.nodeName);if(bt(f,s,p)){if(!Pe||"id"!==s&&"name"!==s||(gt(a,e),p=Fe+p),ee&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ee.createHTML(p);break;case"TrustedScriptURL":p=ee.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),m(o.removed)}catch(e){}}}_t("afterSanitizeAttributes",e,null)},wt=function e(t){let n=null;const o=yt(t);for(_t("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)_t("uponSanitizeShadowNode",n,null),Nt(n)||(n.content instanceof s&&e(n.content),Rt(n));_t("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(Je=!e,Je&&(e="\x3c!--\x3e"),"string"!=typeof e&&!At(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||ct(t),o.removed=[],"string"==typeof e&&(ze=!1),ze){if(e.nodeName){const t=rt(e.nodeName);if(!Te[t]||Ne[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Tt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!ke&&!De&&!Oe&&-1===e.indexOf("<"))return ee&&Ie?ee.createHTML(e):e;if(n=Tt(e),!n)return ke?null:Ie?te:""}n&&ve&&ht(n.firstChild);const c=yt(ze?e:n);for(;i=c.nextNode();)Nt(i)||(i.content instanceof s&&wt(i.content),Rt(i));if(ze)return e;if(ke){if(Me)for(l=re.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ee.shadowroot||Ee.shadowrootmode)&&(l=ae.call(a,l,!0)),l}let m=Oe?n.outerHTML:n.innerHTML;return Oe&&Te["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(m="\n"+m),De&&u([ce,se,ue],(e=>{m=g(m,e," ")})),ee&&Ie?ee.createHTML(m):m},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ct(e),xe=!0},o.clearConfig=function(){it=null,xe=!1},o.isValidAttribute=function(e,t,n){it||ct({});const o=rt(e),r=rt(t);return bt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(le[e]=le[e]||[],p(le[e],t))},o.removeHook=function(e){if(le[e])return m(le[e])},o.removeHooks=function(e){le[e]&&(le[e]=[])},o.removeAllHooks=function(){le={}},o}();return J})); +//# sourceMappingURL=purify.min.js.map diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..702ebca --- /dev/null +++ b/manifest.json @@ -0,0 +1,874 @@ +{ + "background": { + "scripts": ["sites.js", "bpc_count_daily_users.js", "background.js"] + }, + "content_security_policy": "script-src 'self'; object-src 'self'", + "browser_specific_settings": { + "gecko": { + "id": "magnolia@12.34", + "update_url": "https://bitbucket.org/bpc-updates/bpc_updates/downloads/updates.json", + "strict_min_version": "86.0" + } + }, + "browser_action": { + "default_popup": "options/popup.html", + "default_icon": { + "128": "bypass.png" + }, + "theme_icons": [{ + "light": "bypass-dark.png", + "dark": "bypass.png", + "size": 128 + } + ] + }, + "description": "Bypass Paywalls of news sites", + "homepage_url": "https://twitter.com/Magnolia1234B", + "icons": { + "128": "bypass.png" + }, + "manifest_version": 2, + "name": "Bypass Paywalls Clean", + "short_name": "Bypass Paywall", + "options_ui": { + "browser_style": true, + "open_in_tab": true, + "page": "options/options.html" + }, + "optional_permissions": [ + "" + ], + "permissions": [ + "cookies", + "storage", + "activeTab", + "webRequest", + "webRequestBlocking", + "*://*.360dx.com/*", + "*://*.60millions-mag.com/*", + "*://*.aargauerzeitung.ch/*", + "*://*.abc.es/*", + "*://*.abendblatt.de/*", + "*://*.abqjournal.com/*", + "*://*.abril.com.br/*", + "*://*.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/*", + "*://*.augsburger-allgemeine.de/*", + "*://*.auto-motor-und-sport.de/*", + "*://*.auto-swiat.pl/*", + "*://*.autocar.co.uk/*", + "*://*.automobilwoche.de/*", + "*://*.autonews.com/*", + "*://*.autoplus.fr/*", + "*://*.autosport.com/*", + "*://*.axios.com/*", + "*://*.azcentral.com/*", + "*://*.backpacker.com/*", + "*://*.balkaninsight.com/*", + "*://*.baltimoresun.com/*", + "*://*.barandbench.com/*", + "*://*.barrons.com/*", + "*://*.bd.nl/*", + "*://*.beleggersbelangen.nl/*", + "*://*.belfasttelegraph.co.uk/*", + "*://*.bendigoadvertiser.com.au/*", + "*://*.beobachter.ch/*", + "*://*.berliner-zeitung.de/*", + "*://*.berlingske.dk/*", + "*://*.betamtb.com/*", + "*://*.betternutrition.com/*", + "*://*.betterprogramming.pub/*", + "*://*.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/*", + "*://*.brisbanetimes.com.au/*", + "*://*.britannica.com/*", + "*://*.buffalonews.com/*", + "*://*.business-standard.com/*", + "*://*.businessam.be/*", + "*://*.businessinsider.com.pl/*", + "*://*.businessinsider.com/*", + "*://*.businessinsider.nl/*", + "*://*.businessoffashion.com/*", + "*://*.businesspost.ie/*", + "*://*.cairnspost.com.au/*", + "*://*.calgaryherald.com/*", + "*://*.cambiocolombia.com/*", + "*://*.canarias7.es/*", + "*://*.canberratimes.com.au/*", + "*://*.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/*", + "*://*.cieletespace.fr/*", + "*://*.cincinnati.com/*", + "*://*.citywire.com/*", + "*://*.clarin.com/*", + "*://*.cleaneatingmag.com/*", + "*://*.cleveland.com/*", + "*://*.clicrbs.com.br/*", + "*://*.climbing.com/*", + "*://*.cmjornal.pt/*", + "*://*.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/*", + "*://*.dagsavisen.no/*", + "*://*.dailyadvertiser.com.au/*", + "*://*.dailyliberal.com.au/*", + "*://*.dailymail.co.uk/*", + "*://*.dailypress.com/*", + "*://*.dailytelegraph.com.au/*", + "*://*.dailywire.com/*", + "*://*.dallasnews.com/*", + "*://*.defector.com/*", + "*://*.delish.com/*", + "*://*.democratandchronicle.com/*", + "*://*.demorgen.be/*", + "*://*.denverpost.com/*", + "*://*.deraktionaer.de/*", + "*://*.desmoinesregister.com/*", + "*://*.destentor.nl/*", + "*://*.detroitnews.com/*", + "*://*.df.cl/*", + "*://*.dhnet.be/*", + "*://*.di.se/*", + "*://*.diariocorreo.pe/*", + "*://*.diariodemallorca.es/*", + "*://*.diariosur.es/*", + "*://*.diariovasco.com/*", + "*://*.diepresse.com/*", + "*://*.digiday.com/*", + "*://*.digitimes.com/*", + "*://*.discovermagazine.com/*", + "*://*.dispatch.com/*", + "*://*.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/*", + "*://*.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/*", + "*://*.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/*", + "*://*.fd.nl/*", + "*://*.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/*", + "*://*.foreignaffairs.com/*", + "*://*.foreignpolicy.com/*", + "*://*.fortune.com/*", + "*://*.foxnews.com/*", + "*://*.freep.com/*", + "*://*.freiepresse.de/*", + "*://*.freitag.de/*", + "*://*.fresnobee.com/*", + "*://*.ft.com/*", + "*://*.ftm.eu/*", + "*://*.ftm.nl/*", + "*://*.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/*", + "*://*.haaretz.co.il/*", + "*://*.haaretz.com/*", + "*://*.handelszeitung.ch/*", + "*://*.harpers.org/*", + "*://*.harpersbazaar.com/*", + "*://*.haz.de/*", + "*://*.hbr.org/*", + "*://*.heraldsun.com.au/*", + "*://*.hilltimes.com/*", + "*://*.hindustantimes.com/*", + "*://*.hindutamil.in/*", + "*://*.historyextra.com/*", + "*://*.hln.be/*", + "*://*.housebeautiful.com/*", + "*://*.houstonchronicle.com/*", + "*://*.hoy.es/*", + "*://*.huffingtonpost.it/*", + "*://*.humanite.fr/*", + "*://*.humo.be/*", + "*://*.ideal.es/*", + "*://*.ilfattoquotidiano.it/*", + "*://*.ilfoglio.it/*", + "*://*.ilgazzettino.it/*", + "*://*.ilgiorno.it/*", + "*://*.illawarramercury.com.au/*", + "*://*.ilmanifesto.it/*", + "*://*.ilmattino.it/*", + "*://*.ilmessaggero.it/*", + "*://*.ilrestodelcarlino.it/*", + "*://*.ilsecoloxix.it/*", + "*://*.ilsole24ore.com/*", + "*://*.iltelegrafolivorno.it/*", + "*://*.iltirreno.it/*", + "*://*.inc-aus.com/*", + "*://*.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/*", + "*://*.irishtimes.com/*", + "*://*.italian.tech/*", + "*://*.italiaoggi.it/*", + "*://*.jacksonville.com/*", + "*://*.jacobin.de/*", + "*://*.janes.com/*", + "*://*.japantimes.co.jp/*", + "*://*.jazziz.com/*", + "*://*.jazzwise.com/*", + "*://*.jgnt.co/*", + "*://*.journaldemillau.fr/*", + "*://*.journaldemontreal.com/*", + "*://*.journaldequebec.com/*", + "*://*.journaldunet.com/*", + "*://*.journalnow.com/*", + "*://*.journalstar.com/*", + "*://*.jpost.com/*", + "*://*.jsonline.com/*", + "*://*.kansas.com/*", + "*://*.kansascity.com/*", + "*://*.kentucky.com/*", + "*://*.kn-online.de/*", + "*://*.knack.be/*", + "*://*.knoxnews.com/*", + "*://*.komputerswiat.pl/*", + "*://*.krautreporter.de/*", + "*://*.ksta.de/*", + "*://*.kurier.at/*", + "*://*.kw.be/*", + "*://*.la-croix.com/*", + "*://*.labusinessjournal.com/*", + "*://*.lacote.ch/*", + "*://*.ladepeche.fr/*", + "*://*.ladiaria.com.uy/*", + "*://*.lalibre.be/*", + "*://*.lamontagne.fr/*", + "*://*.lanacion.com.ar/*", + "*://*.lanazione.it/*", + "*://*.lanouvellerepublique.fr/*", + "*://*.lanuovasardegna.it/*", + "*://*.laprovincia.es/*", + "*://*.larepubliquedespyrenees.fr/*", + "*://*.larioja.com/*", + "*://*.lasegunda.com/*", + "*://*.lasprovincias.es/*", + "*://*.lastampa.it/*", + "*://*.latercera.com/*", + "*://*.latimes.com/*", + "*://*.latribune.fr/*", + "*://*.lavanguardia.com/*", + "*://*.lavenir.net/*", + "*://*.laverdad.es/*", + "*://*.lavoz.com.ar/*", + "*://*.lavozdigital.es/*", + "*://*.law.com/*", + "*://*.lc.nl/*", + "*://*.lecho.be/*", + "*://*.lecourrierdesstrateges.fr/*", + "*://*.ledevoir.com/*", + "*://*.legrandcontinent.eu/*", + "*://*.lehighvalleylive.com/*", + "*://*.lejdd.fr/*", + "*://*.lemagit.fr/*", + "*://*.lemonde.fr/*", + "*://*.lemoniteur.fr/*", + "*://*.lenouveleconomiste.fr/*", + "*://*.lenouvelliste.ch/*", + "*://*.leparisien.fr/*", + "*://*.lepoint.fr/*", + "*://*.lescienze.it/*", + "*://*.lesechos.fr/*", + "*://*.lesinrocks.com/*", + "*://*.lesoleil.com/*", + "*://*.letelegramme.fr/*", + "*://*.levante-emv.com/*", + "*://*.levif.be/*", + "*://*.lexpress.fr/*", + "*://*.libelle.be/*", + "*://*.libelle.nl/*", + "*://*.limburger.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/*", + "*://*.mainichi.jp/*", + "*://*.mallorcazeitung.es/*", + "*://*.mannheimer-morgen.de/*", + "*://*.marca.com/*", + "*://*.margriet.nl/*", + "*://*.marianne.net/*", + "*://*.marketwatch.com/*", + "*://*.masslive.com/*", + "*://*.maz-online.de/*", + "*://*.mcall.com/*", + "*://*.mcclatchydc.com/*", + "*://*.medium.com/*", + "*://*.medscape.com/*", + "*://*.menshealth.com/*", + "*://*.mercurynews.com/*", + "*://*.mexiconewsdaily.com/*", + "*://*.miamiherald.com/*", + "*://*.mid-day.com/*", + "*://*.midilibre.fr/*", + "*://*.mlive.com/*", + "*://*.moda.it/*", + "*://*.modernhealthcare.com/*", + "*://*.modernretail.co/*", + "*://*.monacomatin.mc/*", + "*://*.monocle.com/*", + "*://*.morgenpost.de/*", + "*://*.motorradonline.de/*", + "*://*.mundodeportivo.com/*", + "*://*.mv-voice.com/*", + "*://*.mz.de/*", + "*://*.nationalgeographic.com/*", + "*://*.nationalpost.com/*", + "*://*.nationalreview.com/*", + "*://*.nautil.us/*", + "*://*.ndtvprofit.com/*", + "*://*.neuepresse.de/*", + "*://*.newcastleherald.com.au/*", + "*://*.newleftreview.org/*", + "*://*.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/*", + "*://*.nouvelobs.com/*", + "*://*.noz.de/*", + "*://*.nrc.nl/*", + "*://*.nrpyrenees.fr/*", + "*://*.nrz.de/*", + "*://*.ntnews.com.au/*", + "*://*.nw.de/*", + "*://*.nwitimes.com/*", + "*://*.nwzonline.de/*", + "*://*.nybooks.com/*", + "*://*.nydailynews.com/*", + "*://*.nymag.com/*", + "*://*.nypost.com/*", + "*://*.nysun.com/*", + "*://*.nyteknik.se/*", + "*://*.nytimes.com/*", + "*://*.nzherald.co.nz/*", + "*://*.nzz.ch/*", + "*://*.observador.pt/*", + "*://*.ocbj.com/*", + "*://*.ocregister.com/*", + "*://*.oklahoman.com/*", + "*://*.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/*", + "*://*.parool.nl/*", + "*://*.penews.com/*", + "*://*.pennlive.com/*", + "*://*.petitbleu.fr/*", + "*://*.philanthropy.com/*", + "*://*.philomag.com/*", + "*://*.philomag.de/*", + "*://*.philosophynow.org/*", + "*://*.pilotonline.com/*", + "*://*.pionline.com/*", + "*://*.piqd.de/*", + "*://*.plasticsnews.com/*", + "*://*.politicaexterior.com/*", + "*://*.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/*", + "*://*.pzc.nl/*", + "*://*.quora.com/*", + "*://*.quotidiano.net/*", + "*://*.quotidianodipuglia.it/*", + "*://*.qz.com/*", + "*://*.rechargenews.com/*", + "*://*.record.pt/*", + "*://*.repubblica.it/*", + "*://*.reuters.com/*", + "*://*.revistaoeste.com/*", + "*://*.revueconflits.com/*", + "*://*.rhein-zeitung.de/*", + "*://*.richmond.com/*", + "*://*.rnd.de/*", + "*://*.roadandtrack.com/*", + "*://*.rollingstone.com/*", + "*://*.rp.pl/*", + "*://*.rubbernews.com/*", + "*://*.rugbypass.com/*", + "*://*.rugbyrama.fr/*", + "*://*.ruhrnachrichten.de/*", + "*://*.rundschau-online.de/*", + "*://*.runnersworld.com/*", + "*://*.sabado.pt/*", + "*://*.sacbee.com/*", + "*://*.saltwire.com/*", + "*://*.sandiegouniontribune.com/*", + "*://*.schwaebische.de/*", + "*://*.schwarzwaelder-bote.de/*", + "*://*.schweizermonat.ch/*", + "*://*.science-et-vie.com/*", + "*://*.science.org/*", + "*://*.sciencesetavenir.fr/*", + "*://*.scientificamerican.com/*", + "*://*.scmp.com/*", + "*://*.scotsman.com/*", + "*://*.sdbj.com/*", + "*://*.seattletimes.com/*", + "*://*.seekingalpha.com/*", + "*://*.sfchronicle.com/*", + "*://*.sfvbj.com/*", + "*://*.shz.de/*", + "*://*.si.com/*", + "*://*.silive.com/*", + "*://*.skimag.com/*", + "*://*.slate.com/*", + "*://*.slideshare.net/*", + "*://*.sloanreview.mit.edu/*", + "*://*.sltrib.com/*", + "*://*.smartcompany.com.au/*", + "*://*.smh.com.au/*", + "*://*.sn.at/*", + "*://*.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/*", + "*://*.star-telegram.com/*", + "*://*.staradvertiser.com/*", + "*://*.startribune.com/*", + "*://*.statesman.com/*", + "*://*.statista.com/*", + "*://*.stcatharinesstandard.ca/*", + "*://*.stereogum.com/*", + "*://*.stltoday.com/*", + "*://*.stocknews.com/*", + "*://*.straitstimes.com/*", + "*://*.stratfor.com/*", + "*://*.studocu.com/*", + "*://*.study.com/*", + "*://*.stuttgarter-nachrichten.de/*", + "*://*.stuttgarter-zeitung.de/*", + "*://*.stylist.co.uk/*", + "*://*.sudouest.fr/*", + "*://*.sueddeutsche.de/*", + "*://*.suedkurier.de/*", + "*://*.sun-sentinel.com/*", + "*://*.suomensotilas.fi/*", + "*://*.sustainableplastics.com/*", + "*://*.svz.de/*", + "*://*.swarajyamag.com/*", + "*://*.syracuse.com/*", + "*://*.tagblatt.ch/*", + "*://*.tagesspiegel.de/*", + "*://*.tampabay.com/*", + "*://*.techinasia.com/*", + "*://*.technologyreview.com/*", + "*://*.techtarget.com/*", + "*://*.telegraaf.nl/*", + "*://*.telegraph.co.uk/*", + "*://*.telerama.fr/*", + "*://*.tennessean.com/*", + "*://*.tes.com/*", + "*://*.texasmonthly.com/*", + "*://*.the-american-interest.com/*", + "*://*.the-scientist.com/*", + "*://*.the-tls.co.uk/*", + "*://*.theadvocate.com.au/*", + "*://*.theadvocate.com/*", + "*://*.theage.com.au/*", + "*://*.theamericanconservative.com/*", + "*://*.theartnewspaper.com/*", + "*://*.theathletic.com/*", + "*://*.theatlantic.com/*", + "*://*.theaustralian.com.au/*", + "*://*.thebaffler.com/*", + "*://*.thebookseller.com/*", + "*://*.thebulletin.org/*", + "*://*.thechronicle.com.au/*", + "*://*.thecourier.com.au/*", + "*://*.thecritic.co.uk/*", + "*://*.thecut.com/*", + "*://*.thedailybeast.com/*", + "*://*.thediplomat.com/*", + "*://*.theepochtimes.com/*", + "*://*.theglobeandmail.com/*", + "*://*.thehill.com/*", + "*://*.thehindu.com/*", + "*://*.thehindubusinessline.com/*", + "*://*.theimpression.com/*", + "*://*.theintercept.com/*", + "*://*.thejuggernaut.com/*", + "*://*.thelampmagazine.com/*", + "*://*.thelawyersdaily.ca/*", + "*://*.themandarin.com.au/*", + "*://*.themarker.com/*", + "*://*.themarket.ch/*", + "*://*.themercury.com.au/*", + "*://*.thenation.com/*", + "*://*.thenewatlantis.com/*", + "*://*.theneweuropean.co.uk/*", + "*://*.thenewsminute.com/*", + "*://*.thepeterboroughexaminer.com/*", + "*://*.thepointmag.com/*", + "*://*.theprovince.com/*", + "*://*.thequint.com/*", + "*://*.therecord.com/*", + "*://*.thesaturdaypaper.com.au/*", + "*://*.thespec.com/*", + "*://*.thespectator.com/*", + "*://*.thestage.co.uk/*", + "*://*.thestar.com/*", + "*://*.thestate.com/*", + "*://*.thetimes.co.uk/*", + "*://*.theverge.com/*", + "*://*.theweek.com/*", + "*://*.thewest.com.au/*", + "*://*.thewrap.com/*", + "*://*.thueringer-allgemeine.de/*", + "*://*.tijd.be/*", + "*://*.timeshighereducation.com/*", + "*://*.timesofindia.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/*", + "*://*.vikatan.com/*", + "*://*.vn.at/*", + "*://*.vn.nl/*", + "*://*.vogue.co.uk/*", + "*://*.vogue.com/*", + "*://*.voguebusiness.com/*", + "*://*.vol.at/*", + "*://*.volkskrant.nl/*", + "*://*.volksstimme.de/*", + "*://*.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/*", + "*://*.wiwo.de/*", + "*://*.wochenblatt.com/*", + "*://*.womenshealth.de/*", + "*://*.womenshealthmag.com/*", + "*://*.womensrunning.com/*", + "*://*.wonderzine.com/*", + "*://*.wp.de/*", + "*://*.wr.de/*", + "*://*.wsj.com/*", + "*://*.wwd.com/*", + "*://*.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/*", + "*://*.ippen.space/*", + "*://*.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/*", + "*://*.weborama.fr/*", + "*://*.zephr.com/*", + "*://*.amazonaws.com/*", + "*://*.bitbucket.org/*", + "*://*.blink.net/*", + "*://*.bwbx.io/*", + "*://*.californiatimes.com/*", + "*://*.cedscdn.it/*", + "*://*.cedsdigital.it/*", + "*://*.cloudfront.net/*", + "*://*.corriereobjects.it/*", + "*://*.emol.cl/*", + "*://*.epochbase.com/*", + "*://*.epochbase.eu/*", + "*://*.flip-pay.com/*", + "*://*.go.com/*", + "*://*.hadrianpaywall.com/*", + "*://*.kinja-static.com/*", + "*://*.masthead.me/*", + "*://*.medscapestatic.com/*", + "*://*.ndcmediagroep.nl/*", + "*://*.nhst.tech/*", + "*://*.nyt.com/*", + "*://*.pasedigital.cl/*", + "*://*.wbmdstatic.com/*", + "*://*.wgchrrammzv.com/*", + "*://*.wyleex.com/*", + "*://archive.fo/*", + "*://archive.is/*", + "*://archive.li/*", + "*://archive.md/*", + "*://archive.ph/*", + "*://archive.vn/*", + "*://webcache.googleusercontent.com/*" + ], + "version": "3.6.4.5" +} diff --git a/options/clearCookies.js b/options/clearCookies.js new file mode 100644 index 0000000..cd6217c --- /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/optin/opt-in.css b/options/optin/opt-in.css new file mode 100644 index 0000000..6562b6c --- /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..2babd1e --- /dev/null +++ b/options/optin/opt-in.html @@ -0,0 +1,64 @@ + + + + + + + Bypass Paywalls Clean (setCookie, custom sites & check update opt-in) + + + + + + +
    +

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

    +
    + +
    +

    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:

    +
    + + +
    +
    +

    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:

    +
    + + +
    +
    +
    +

    daily users counter opt-in

    +

    Very basic daily users counter (by counting the download of an empty json-file (no personal information is shared)):
    +

    daily users counter enabled:

    +
    + + +
    +
    +

    +

    + + + +
    +

    + + + diff --git a/options/optin/opt-in.js b/options/optin/opt-in.js new file mode 100644 index 0000000..067e938 --- /dev/null +++ b/options/optin/opt-in.js @@ -0,0 +1,125 @@ +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 yandex_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)) && !(navigator_ua_mobile && (url_loc === 'chrome') && !yandex_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'; + }); + + 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 + }); + } 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 + }); + } + 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'; + }); + + var counter_enabled = document.getElementById('counter-enabled'); + ext_api.storage.local.get({counter: true}, function (result) { + counter_enabled.innerText = result.counter ? 'YES' : 'NO'; + }); + + document.getElementById("counter-enable").addEventListener("click", function () { + ext_api.storage.local.set({ + "counter": true + }); + counter_enabled.innerText = 'YES'; + }); + + document.getElementById("counter-disable").addEventListener("click", function () { + ext_api.storage.local.set({ + "counter": false + }); + counter_enabled.innerText = 'NO'; + }); +}); diff --git a/options/options.html b/options/options.html new file mode 100644 index 0000000..c461206 --- /dev/null +++ b/options/options.html @@ -0,0 +1,50 @@ + + + + + + Bypass Paywalls Clean Options + + + +

    Options |

    +
    Changelog +
    +
    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..e08222b --- /dev/null +++ b/options/options.js @@ -0,0 +1,222 @@ +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, + default_sites: true + }, + "custom": { + sites: sites_custom, + 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.createTextNode(site_types[site_type].title)); + 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..e587ac2 --- /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..07fd4e6 --- /dev/null +++ b/options/options_custom.html @@ -0,0 +1,69 @@ + + + + + + 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..6bd1601 --- /dev/null +++ b/options/options_custom.js @@ -0,0 +1,554 @@ +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 yandex_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)) && !(navigator_ua_mobile && (url_loc === 'chrome') && !yandex_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', '1ft.io', 'google_webcache', '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 online +function import_online_options(e) { + let url = 'https://bitbucket.org/bpc-updates/bpc_updates/downloads/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 = (edit_site.googlebot > 0) ? 1 : 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 || edit_site.block_javascript > 0); + document.querySelector('input[data-key="block_js_ext"]').checked = (edit_site.block_js_ext > 0 || edit_site.block_javascript_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_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="ld_google_webcache"]').value = edit_site.ld_google_webcache || ''; + 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_url': 0, + 'ld_archive_is': 0, + 'ld_google_webcache': 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 = 25; + } else { + inputEl = document.createElement('textarea'); + inputEl.rows = 5; + inputEl.cols = 25; + } + 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', + ld_json: 'div.paywall|div.article', + ld_json_next: 'div.paywall|div.article', + ld_json_url: 'div.paywall|div.article', + ld_archive_is: 'div.paywall|div.art|div.art_src|div.art_link', + ld_google_webcache: 'div.paywall|div.article', + 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 + ': ' + 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 || sites_custom[key]['block_javascript'] > 0) ? ' | block_js' : '') + + ((sites_custom[key]['block_js_ext'] > 0 || sites_custom[key]['block_javascript_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_url'] ? ' | ld_json_url' : '') + + (sites_custom[key]['ld_archive_is'] ? ' | ld_archive_is' : '') + + (sites_custom[key]['ld_google_webcache'] ? ' | ld_google_webcache' : '') + + (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_online').addEventListener('click', import_online_options); +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..3d0db41 --- /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..9bfcda6 --- /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..f2b7b6f --- /dev/null +++ b/options/popup.html @@ -0,0 +1,32 @@ + + + + + + + + + + +
    Bypass Paywalls Clean   
    + +
    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..92a564b --- /dev/null +++ b/options/popup.js @@ -0,0 +1,150 @@ +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 yandex_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)) && !(navigator_ua_mobile && (url_loc === 'chrome') && !yandex_browser); + +function popup_show_toggle(domain, enabled) { + if (domain && !matchDomain(['webcache.googleusercontent.com'], 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); + if (!matchDomain(['hbrchina.org'], hostname)) + url = url.split(/[#\?]/)[0]; + let url_enc = encodeURIComponent(url); + let archive_array = { + 'Archive.today': 'https://archive.today?run=1&url=' + url_enc, + 'Google webcache': 'https://webcache.googleusercontent.com/search?q=cache:' + url_enc, + 'Clearthis.page': 'https://clearthis.page?u=' + url, + '1ft.io': 'https://1ft.io/' + url, + 'Google Search Tool\n(use online html-viewer - no fix)': 'https://search.google.com/test/rich-results?url=' + url_enc + }; + //'Archive.today (renew)': 'https://archive.today?renew=1&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(['1ft.io', 'clearthis.page', 'google.com', 'googleusercontent.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..b1520db --- /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/version.js b/options/version.js new file mode 100644 index 0000000..d79953c --- /dev/null +++ b/options/version.js @@ -0,0 +1,109 @@ +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://github.com/bpc-clone/bpc_updates/releases/latest'; +var ext_name = manifestData.name; +var self_hosted = !!(manifestData.browser_specific_settings && manifestData.browser_specific_settings.gecko.update_url); +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'; + } else if (!self_hosted) { + warning = 'cloned'; + } + 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, ext_upd_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 (version_len === 5 && ext_upd_version_new && ext_upd_version_new < ext_version_new) + ext_version_new = ext_upd_version_new; + 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 + '/-/releases'; + 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 Twitter for latest update'; + anchorEl.href = 'https://twitter.com/Magnolia1234B'; + anchorEl.target = '_blank'; + version_span_new.appendChild(anchorEl); + } +} + +function check_version_update(ext_version_new, popup) { + if (!popup) { + let manifest_new = 'https://bitbucket.org/bpc-updates/bpc_updates/downloads/manifest.json'; + fetch(manifest_new) + .then(response => { + if (response.ok) { + response.json().then(json => { + var version_new = json['version']; + if (self_hosted) { + 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 upd_version_new = upd_json.addons[ext_id].updates[0].version; + show_update(version_new, upd_version_new); + }) + } + }).catch(function (err) { + false; + }); + } else + show_update(version_new); + }) + } else { + show_update(ext_version_new); + } + }).catch(function (err) { + false; + }); + } 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..40cadad --- /dev/null +++ b/sites.js @@ -0,0 +1,3196 @@ +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\// + }, + "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\..+\.nl\/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: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "Artforum": { + domain: "artforum.com" + }, + "Artnet": { + domain: "artnet.com", + allow_cookies: 1, + block_regex: /(\.artnet\.com\/paywall-ajax\.php|cdn\.ampproject\.org\/v\d\/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: /\.poool\.fr\// + }, + "Augsburger Allgemeine": { + domain: "augsburger-allgemeine.de", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/, + useragent: "googlebot" + }, + "Australia News Corp (when blocked disable Googlebot below)": { + 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", + "ntnews.com.au", + "theaustralian.com.au", + "thechronicle.com.au", + "themercury.com.au", + "townsvillebulletin.com.au", + "weeklytimesnow.com.au" + ], + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/, + useragent: "googlebot", + exception: [{ + domain: ["cairnspost.com.au", "codesports.com.au", "geelongadvertiser.com.au", "theaustralian.com.au", "townsvillebulletin.com.au"], + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/ + } + ] + }, + "Australia News Corp - no Googlebot (blocked; only disabled when amp-fix)": { + domain: "#options_disable_gb_au_news_corp" + }, + "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|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/ + }, + "Autocar.co.uk": { + domain: "autocar.co.uk", + 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, + block_regex: "\.axios\.com\/api\/v\d\/licenses" + }, + "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: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/ + }, + "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 + }, + "Berliner Zeitung": { + domain: "berliner-zeitung.de", + allow_cookies: 1, + useragent: "googlebot" + }, + "Berlingske": { + domain: "berlingske.dk", + allow_cookies: 1, + useragent: "bingbot" + }, + "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/ + }, + "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" + }, + "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 + }, + "Business Insider": { + domain: "businessinsider.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.sophi\.io\/|\.businessinsider\.com\/chunks\/scripts\/components~paywall-client\..+\.js)/ + }, + "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: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/ + }, + "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, + useragent: "googlebot" + }, + "Challenges": { + domain: "challenges.fr", + allow_cookies: 1, + block_regex: /(\.poool\.fr\/|cdn\.ampproject\.org\/v\d\/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 + }, + "Ciel & espace": { + domain: "cieletespace.fr", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Citywire": { + domain: "citywire.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "CNBC (news only)": { + domain: "cnbc.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "CNN (regwall)": { + 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\/cache\/.+\.js/ + }, + "Correio da Manhã": { + domain: "cmjornal.pt", + allow_cookies: 1 + }, + "Correio do Povo": { + domain: "correiodopovo.com.br", + allow_cookies: 1, + block_regex: /(paywall\.correiodopovo\.com\.br|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Corriere della Sera": { + domain: "corriere.it", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.corriereobjects\.it\/.+\/js\/_paywall\.sjs|cdn\.ampproject\.org\/v\d\/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": { + domain: "courrierinternational.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "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\/|\.com\/.+\/js\/js_.+\.js)/, + exception: [{ + domain: "european-rubber-journal.com", + allow_cookies: 1 + } + ] + }, + "Crusoe.com.br": { + domain: "crusoe.com.br", + allow_cookies: 1, + block_regex: /\.crusoe\.com\.br\/assets\/js\/swg-wallcontent-crusoe\.js/ + }, + "Dagens ETC": { + domain: "etc.se", + allow_cookies: 1 + }, + "Dagens Industri": { + domain: "di.se", + allow_cookies: 1, + useragent: "googlebot" + }, + "Dagsavisen.no": { + domain: "dagsavisen.no", + allow_cookies: 1 + }, + "Daily Mail UK": { + domain: "dailymail.co.uk", + allow_cookies: 1, + block_regex: /\/zephr\/feature/ + }, + "De Limburger (fetch from archive.is)": { + domain: "limburger.nl", + allow_cookies: 1, + cs_dompurify: 1 + }, + "De Tijd": { + domain: "tijd.be", + referer: "google" + }, + "Defector": { + domain: "defector.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Der Aktionär (fetch from archive.is)": { + domain: "deraktionaer.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "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 Financiero": { + domain: "df.cl", + allow_cookies: 1, + useragent: "googlebot" + }, + "Die Presse": { + domain: "diepresse.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "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" + }, + "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)" + }, + "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: /cdn\.wyleex\.com\/elcronista\/pw\.min\.js/ + }, + "El Diario.es": { + domain: "eldiario.es", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/ + }, + "El Español": { + domain: "elespanol.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ + }, + "El Espectador": { + domain: "elespectador.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/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|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "El País": { + domain: "elpais.com", + allow_cookies: 1, + block_js_inline: /\.elpais\.com\/.+\.html/, + block_regex: /(\/elpais\.com\/arc\/subs\/p\.min\.js|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "El País.com.uy": { + domain: "elpais.com.uy", + allow_cookies: 1, + block_regex: /(\.elpais\.com\.uy\/user\/authStatus|\.evolok\.net\/|cdn\.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/ + }, + "Elle.fr": { + domain: "elle.fr", + allow_cookies: 1, + block_regex: /(\.poool\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Encyclopedia Britannica": { + domain: "britannica.com" + }, + "eNotes": { + domain: "enotes.com", + allow_cookies: 1 + }, + "ESPN USA (news only)": { + 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: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/ + }, + "EUobserver": { + domain: "euobserver.com", + allow_cookies: 1 + }, + "Evening Standard (UK)": { + domain: "standard.co.uk", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/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, + referer: "twitter" + }, + "Financial Times (not Chinese)": { + domain: "ft.com", + useragent: "googlebot" + }, + "Financieele Dagblad (fd.nl)": { + domain: "fd.nl", + referer: "facebook", + remove_cookies_select_drop: ["socialread"] + }, + "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|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Forbes Australia": { + domain: "forbes.com.au", + remove_cookies_select_drop: ["blaize_session"], + cs_dompurify: 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: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "Fortune": { + domain: "fortune.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/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, + cs_dompurify: 1 + }, + "Freie Presse": { + domain: "freiepresse.de", + allow_cookies: 1, + block_js_inline: /\.freiepresse\.de\/.+-artikel/, + cs_dompurify: 1 + }, + "Funke Mediengruppe (fetch from archive.is)": { + domain: "###_de_funke_medien", + group: [ + "abendblatt.de", + "braunschweiger-zeitung.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: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "GaúchaZH": { + domain: "gauchazh.clicrbs.com.br", + allow_cookies: 1, + block_regex: /(\.piano\.io\/api\/tinypass\.min\.js|\.clicrbs\.com\.br\/paywall-api\/count\/)/ + }, + "Gazeta do Povo": { + domain: "gazetadopovo.com.br", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/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 + }, + "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: [ + "lemoniteur.fr", + "usinenouvelle.com" + ], + allow_cookies: 1, + useragent: "googlebot", + exception: [{ + domain: "lemoniteur.fr", + allow_cookies: 1, + cs_dompurify: 1 + } + ] + }, + "Groupe IPM": { + domain: "###_be_groupe_ipm", + group: [ + "dhnet.be", + "lalibre.be", + "lavenir.net" + ], + allow_cookies: 1, + block_regex: /(\.piano\.io\/xbuilder\/experience\/execute|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/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, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/ + }, + "Groupe Nice-Matin": { + domain: "###_fr_groupe_nice_matin", + group: [ + "monacomatin.mc", + "nicematin.com", + "varmatin.com" + ], + allow_cookies: 1, + block_regex: /(\.poool\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "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" + ], + allow_cookies: 1, + block_regex: /\.clarin\.com\/js\/(meter|zonda-).*\.js/, + exception: [{ + domain: "lavoz.com.ar", + allow_cookies: 1, + block_regex: /cdn\.wyleex\.com\/lavoz\/pw\.min\.js/ + }, { + 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\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Grupo Unidad Editorial": { + domain: "###_es_unidad", + group: [ + "elmundo.es", + "expansion.com", + "marca.com" + ], + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/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: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "Gruppo GEDI.it (listed sites only)": { + domain: "###_it_gedi", + group: [ + "huffingtonpost.it", + "ilsecoloxix.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|cdn\.ampproject\.org\/v\d\/amp-(access|user-notification)-.+\.js)/, + useragent: "googlebot", + exception: [{ + domain: ["huffingtonpost.it", "lastampa.it", "repubblica.it"], + block_js_inline: /\.it\/.+\/news\//, + remove_cookies_select_drop: ["blaize_session"] + } + ] + }, + "Gruppo SAE.it (free articles only; opt-in to custom sites for unlisted)": { + domain: "###_it_gruppo_sae", + group: [ + "iltirreno.it", + "lanuovasardegna.it" + ] + }, + "Haaretz Group": { + domain: "###_il_haaretz_group", + group: [ + "haaretz.co.il", + "haaretz.com", + "themarker.com" + ], + allow_cookies: 1, + block_regex: "{domain}\\/.+\\/page-.+\\.js", + cs_dompurify: 1, + useragent_custom: "Mozilla/5.0 (Java) outbrain" + }, + "Haas Mediengruppe (opt-in to custom sites for unlisted)": { + domain: "###_de_haas_medien", + group: [ + "mannheimer-morgen.de" + ], + allow_cookies: 1, + 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: /cdn\.cxense\.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)/ + }, + "Het Laatste Nieuws (fetch from archive.is)": { + domain: "hln.be", + allow_cookies: 1, + block_regex: /temptation\.hln\.be\/temptation\.js/, + cs_dompurify: 1 + }, + "Hindu Tamil Thisai": { + domain: "hindutamil.in", + allow_cookies: 1 + }, + "Hindustan Times (not epaper)": { + domain: "hindustantimes.com", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/ + }, + "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: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/ + }, + "Il Foglio": { + domain: "ilfoglio.it", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/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\.js|cdn\.ampproject\.org\/v\d\/amp-(access|consent|subscriptions)-.+\.(m)?js)/ + }, + "Il Sole 24 Ore (24+ only)": { + domain: "ilsole24ore.com", + allow_cookies: 1, + block_regex: /(\.ilsole24ore\.com\/zephr\/feature|\.cloudfront\.net\/embed\/widget\/subx.+\.js)/ + }, + "Inc.com": { + domain: "inc.com", + block_regex: /\.tinypass\.com\// + }, + "Inc42": { + domain: "inc42.com", + allow_cookies: 1, + block_regex: /(\.inc42\.com\/wp-content\/plugins\/leaky-paywall\/js\/leaky-paywall-cookie\.js|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Incisive Media (opt-in to custom sites)": { + domain: "###_uk_incisive_media", + group: [], + allow_cookies: 1, + cs_dompurify: 1 + }, + "India Today": { + domain: "indiatoday.in", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/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_regex: /\.tinypass\.com\// + }, + "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": { + allow_cookies: 1, + domain: "investorschronicle.co.uk", + referer: "google" + }, + "iPolitics.ca": { + domain: "ipolitics.ca", + allow_cookies: 1, + cs_dompurify: 1 + }, + "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 + }, + "Jane's Defence Weekly": { + domain: "janes.com", + allow_cookies: 1 + }, + "Jazziz": { + domain: "jazziz.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Jazzwise": { + domain: "jazzwise.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "Kölner Stadt-Anzeiger": { + domain: "ksta.de", + allow_cookies: 1, + block_regex: /\.zephr\.com\/zephr\/decide/ + }, + "Kölnische Rundschau": { + domain: "rundschau-online.de", + allow_cookies: 1, + block_regex: /\.zephr\.com\/zephr\/decide/ + }, + "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'Express": { + domain: "lexpress.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\/data/ + }, + "L'Humanité": { + domain: "humanite.fr", + allow_cookies: 1, + block_regex: /\.qiota\.com\//, + cs_dompurify: 1 + }, + "L'Informé": { + domain: "linforme.com", + allow_cookies: 1, + useragent: "googlebot" + }, + "L'Obs": { + domain: "nouvelobs.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 (not Le Journal)": { + domain: "lopinion.fr", + allow_cookies: 1, + useragent: "googlebot" + }, + "La Croix": { + domain: "la-croix.com", + allow_cookies: 1, + block_regex: /(\.la-croix\.com\/build\/.+\/paywall.+\.js|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "La Diaria.com.uy": { + domain: "ladiaria.com.uy", + allow_cookies: 1, + useragent: "googlebot" + }, + "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: /(\.weborama\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "La Segunda": { + domain: "lasegunda.com", + block_regex: /\.(lasegunda\.com|emol\.cl)\/(.+\/)?js\/(.+\/)?(modal|merPramV\d|PramModal\.min)\.js/ + }, + "La Tercera": { + domain: "latercera.com", + allow_cookies: 1, + block_regex: /(\.latercera\.com\/arc\/subs\/p\.min\.js|cdn\.cxense\.com\/|\.tinypass\.com\/)/ + }, + "La Tribune": { + domain: "latribune.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "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\// + } + ] + }, + "Law.com (free articles only)": { + domain: "law.com", + allow_cookies: 1, + block_regex: /\/olytics\.omeda\.com\//, + referer: "facebook" + }, + "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 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 (fetch from archive.is)": { + domain: "lemonde.fr", + 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 Télégramme": { + domain: "letelegramme.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "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\// + }, + "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\/__js\/lm_subscription|\.piano\.io\/api\/tinypass\.min\.js|cdn\.ampproject\.org\/v\d\/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: /\.californiatimes\.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" + ], + 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: /loader\.masthead\.me\// + }, + "Mainichi Shimbun": { + domain: "mainichi.jp", + allow_cookies: 1, + useragent: "googlebot" + }, + "Marianne.net": { + domain: "marianne.net", + allow_cookies: 1, + block_regex: /\.poool\.fr\//, + cs_dompurify: 1 + }, + "MarketWatch": { + domain: "marketwatch.com", + allow_cookies: 1, + block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ + }, + "McClatchy Group (opt-in to custom sites for unlisted)": { + domain: "###_usa_mcc", + 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\/|js\.matheranalytics\.com|cdn\.ampproject\.org\/v\d\/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: [ + "nieuwsblad.be", + "standaard.be" + ], + allow_cookies: 1, + 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: /(\.evolok\.net\/|\.ndcmediagroep\.nl\/js\/evolok\/|\.nl\/_\/zh\/worker)/ + }, + "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", + "twincities.com" + ], + allow_cookies: 1, + block_regex: "((\\.{domain}\\/script|\\/.+\\/loader\\.min)\\.js|\\.tinypass\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)", + cs_dompurify: 1 + }, + "Medienholding Süd (opt-in to custom sites for unlisted)": { + domain: "###_de_mhs", + group: [ + "schwarzwaelder-bote.de", + "stuttgarter-nachrichten.de", + "stuttgarter-zeitung.de" + ], + allow_cookies: 1, + block_regex: /\.piano\.io\//, + useragent: "googlebot" + }, + "Medium (opt-in to custom sites for custom domains)": { + domain: "medium.com", + allow_cookies: 1, + group: [ + "medium.com", + "betterprogramming.pub", + "towardsdatascience.com", + "webcache.googleusercontent.com" + ], + exception: [{ + domain: "webcache.googleusercontent.com", + allow_cookies: 1, + block_regex: /cdn-client\.medium\.com\/lite\/static\/js\/main\..+\.js/ + } + ] + }, + "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: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/ + }, + "MIT Sloan Management Review": { + domain: "sloanreview.mit.edu", + block_regex: /(\.tinypass\.com\/|\/sloanreview\.mit\.edu\/.+\/welcome-ad\.js)/, + cs_dompurify: 1 + }, + "MIT Technology Review": { + domain: "technologyreview.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.mjs)/ + }, + "Mitteldeutsche Zeitung": { + domain: "mz.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "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\\/" + }, + "Mountain View Voice": { + domain: "mv-voice.com" + }, + "Mundo Deportivo": { + domain: "mundodeportivo.com", + allow_cookies: 1, + block_regex: /\.evolok\.net\// + }, + "National Geographic USA": { + domain: "nationalgeographic.com", + allow_cookies: 1, + block_regex: /cdn\.registerdisney\.go\.com\//, + random_ip: "eu" + }, + "National Review (disable adblocker)": { + domain: "nationalreview.com", + allow_cookies: 1, + remove_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/ + }, + "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\/|\.axate\.io\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Nautilus": { + domain: "nautil.us", + remove_cookies_select_drop: ["arc", "sfa"] + }, + "NDTV Profit": { + domain: "ndtvprofit.com", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/ + }, + "Neue Westfälische": { + domain: "nw.de", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/ + }, + "Neue Zürcher Zeitung (not epaper)": { + domain: "nzz.ch", + allow_cookies: 1, + block_regex: /(\.piano\.io\/|ens\.nzz\.ch\/.+\/Bootstrap\.js)/ + }, + "New Left Review": { + domain: "newleftreview.org", + allow_cookies: 1, + cs_dompurify: 1, + useragent: "googlebot" + }, + "New Scientist": { + domain: "newscientist.com", + allow_cookies: 1, + block_regex: /\.piano\.io\//, + cs_dompurify: 1 + }, + "New York Magazine (+ Curbed, Grub Street, The Cut & Vulture)": { + domain: "###_usa_nymag", + group: [ + "curbed.com", + "grubstreet.com", + "nymag.com", + "thecut.com", + "vulture.com" + ], + block_regex: /\.cloudfront\.net\/embed\/widget\/subx.+\.js/, + remove_cookies_select_drop: ["nymcid", "first-nymcid"] + }, + "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-cdn\.azureedge\.net\/|js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "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\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ + }, + "NHST Media Group": { + domain: "###_no_nhst_media", + group: [ + "europower.no", + "fiskeribladet.no", + "intrafish.com", + "intrafish.no", + "rechargenews.com", + "tradewindsnews.com", + "upstreamonline.com" + ], + allow_cookies: 1, + block_regex: /subscription-static-global\.nhst\.tech\//, + exception: [{ + domain: "upstreamonline.com", + allow_cookies: 1, + cs_dompurify: 1 + } + ] + }, + "Nikkei Asian Review (do not block Piano.io-script externally)": { + domain: "asia.nikkei.com", + remove_cookies_select_drop: ["xbc"] + }, + "Nordwest Zeitung": { + domain: "nwzonline.de", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, + "NOZ/MHN Mediengruppe": { + domain: "###_de_noz_mhn", + group: [ + "noz.de", + "shz.de", + "svz.de" + ], + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "NRC Handelsblad": { + domain: "nrc.nl", + remove_cookies_select_drop: ["counter"], + block_regex: /\.nrc\.nl\/paywall-api\/api\/zephr/ + }, + "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)|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ + }, + "O Globo (& Valor Econômico)": { + domain: "globo.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/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\// + }, + "OVB Media (opt-in to custom sites for ovb24.de news portals)": { + domain: "###_de_ovb_media", + group: [ + "ovb-online.de" + ], + allow_cookies: 1, + block_regex: "\\.{domain}\\/sub\\/js\\/pc-offer-west\\.js" + }, + "Palo Alto Online": { + domain: "paloaltoonline.com" + }, + "Paris Match": { + domain: "parismatch.com", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "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\/|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ + }, + "PhiloMag.com": { + domain: "philomag.com", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "PhiloMag.de": { + domain: "philomag.de", + allow_cookies: 1 + }, + "Philosophy Now": { + domain: "philosophynow.org" + }, + "Piqd.de": { + domain: "piqd.de", + allow_cookies: 1, + useragent: "googlebot" + }, + "Pittsburgh Post Gazette": { + domain: "post-gazette.com", + block_regex: /\.tinypass\.com\// + }, + "Política Exterior": { + domain: "politicaexterior.com", + allow_cookies: 1 + }, + "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\// + }, + "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 Equity News": { + domain: "penews.com", + useragent: "googlebot" + }, + "Private Media AU": { + domain: "###_au_private_media", + group: [ + "crikey.com.au", + "inc-aus.com", + "smartcompany.com.au", + "themandarin.com.au" + ], + block_regex: /\.{domain}\/zephr\/feature/, + remove_cookies_select_drop: ["blaize_session"], + exception: [{ + domain: "themandarin.com.au", + allow_cookies: 1, + cs_dompurify: 1 + } + ] + }, + "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, + cs_dompurify: 1 + }, + "Public.fr": { + domain: "public.fr", + allow_cookies: 1, + block_regex: /\.poool\.fr\// + }, + "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\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Record.pt": { + domain: "record.pt", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/ + }, + "Reuters": { + domain: "reuters.com", + allow_cookies: 1, + block_regex: /\.reuters\.com\/arc\/subs\/p\.min\.js/ + }, + "Revue Conflits": { + domain: "revueconflits.com", + allow_cookies: 1, + block_regex: /\.qiota\.com\/data/ + }, + "Revista Oeste": { + domain: "revistaoeste.com", + allow_cookies: 1, + block_regex: /\/revistaoeste\.com\/wp-content\/.+\/js\/app\..+\.js/ + }, + "Rhein-Zeitung": { + domain: "rhein-zeitung.de", + allow_cookies: 1, + useragent: "googlebot" + }, + "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" + ], + block_regex: /cdn\.cxense\.com\//, + remove_cookies_select_drop: ["xbc"], + cs_dompurify: 1, + exception: [{ + domain: ["businessinsider.com.pl", "newsweek.pl"], + block_regex: /cdn\.cxense\.com\//, + remove_cookies_select_drop: ["xbc"], + } + ] + }, + "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: /\.(femmesdaujourdhui|flair|knack|levif|libelle)\.be\/.+\/((\w)+(\-)+){3,}/, + block_regex: "(\\.|\\/){domain}\\/(script|js\\/responsive\\/rmg(Modal|Paywall))\\.js" + }, + "RugbyPass": { + domain: "rugbypass.com", + allow_cookies: 1, + block_js_inline: /\.rugbypass\.com\/plus\//, + block_regex: /\.tinypass\.com\// + }, + "Rzeczpospolita": { + domain: "rp.pl", + cs_dompurify: 1 + }, + "S&P Global": { + domain: "spglobal.com", + allow_cookies: 1, + block_js_inline: /\/www\.spglobal\.com\//, + block_regex: /\.spglobal\.com\/script\.js/ + }, + "Sábado (not video)": { + domain: "sabado.pt", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/ + }, + "Saltwire Network": { + domain: "saltwire.com", + allow_cookies: 1, + block_regex: /\.zephr\.com\/zephr-browser\// + }, + "Salzburger Nachrichten": { + domain: "sn.at", + allow_cookies: 1, + block_regex: /\.piano\.io\//, + cs_dompurify: 1 + }, + "San Diego Union Tribune": { + domain: "sandiegouniontribune.com", + allow_cookies: 1, + block_regex: /\.californiatimes\.com\/meteringjs/ + }, + "Schwäbische Zeitung": { + domain: "schwaebische.de", + allow_cookies: 1, + cs_dompurify: 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\// + }, + "Sciences et Avenir": { + domain: "sciencesetavenir.fr", + block_regex: /(\.poool\.fr\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Scientific American": { + domain: "scientificamerican.com", + allow_cookies: 1, + block_regex: /\.scientificamerican\.com\/api\/tinypass\.min\.js/ + }, + "Seeking Alpha (do not block TinyPass-script externally)": { + domain: "seekingalpha.com", + allow_cookies: 1, + block_regex: /\.piano\.io\/xbuilder\/experience\/execute/, + cs_dompurify: 1 + }, + "Slate": { + domain: "slate.com", + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/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\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/ + }, + "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: [ + "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: /\.blueconic\.net\// + }, + "Springer Medizin": { + domain: "springermedizin.de", + allow_cookies: 1 + }, + "Star Tribune": { + domain: "startribune.com", + allow_cookies: 1 + }, + "Statista": { + domain: "statista.com", + referer: "google" + }, + "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" + }, + "StuDocu (no downloads)": { + domain: "studocu.com", + allow_cookies: 1 + }, + "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 (fetch from archive.is)": { + 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 + }, + "Tampa Bay Times": { + domain: "tampabay.com", + allow_cookies: 1, + block_regex: /(\.zephr\.com\/zephr-browser\/|js\.matheranalytics\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "Tech in Asia": { + domain: "techinasia.com", + allow_cookies: 1, + useragent: "googlebot", + 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 + }, + "Télérama": { + domain: "telerama.fr", + allow_cookies: 1, + useragent: "googlebot" + }, + "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", + "theadvocate.com" + ], + allow_cookies: 1, + block_regex: "(\\.{domain}\\/(script||.+\\/tncms\\/api\\/access\\..+)\\.js|js\\.matheranalytics\\.com\\/)" + }, + "The American Conservative": { + domain: "theamericanconservative.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The American Interest": { + domain: "the-american-interest.com", + allow_cookies: 1 + }, + "The Art Newspaper": { + domain: "theartnewspaper.com", + allow_cookies: 1, + block_regex: /\.theartnewspaper\.com\/_next\/static\/chunks\/pages\/access-allowed-.+\.js/ + }, + "The Athletic": { + domain: "theathletic.com", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.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|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/, + exception: [{ + domain: "ajc.com", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.sophi\.io\/)/ + } + ] + }, + "The Atlantic": { + domain: "theatlantic.com", + remove_cookies_select_drop: ["articleViews"], + useragent: "googlebot" + }, + "The Baffler": { + domain: "thebaffler.com", + allow_cookies: 1, + block_regex: /\/blink\.net\/.+\/blink-sdk\.js/ + }, + "The Boston Globe": { + domain: "bostonglobe.com", + allow_cookies: 1, + block_regex: /(\.blueconic\.net\/|meter\.bostonglobe\.com\/js\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/ + }, + "The Business Journals (free articles only; do not block Cxense-script externally)": { + domain: "bizjournals.com", + allow_cookies: 1 + }, + "The Business of Fashion": { + domain: "businessoffashion.com", + allow_cookies: 1, + block_regex: /(\.businessoffashion\.com\/zephr\/feature|cdn\.ampproject\.org\/v\d\/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", + remove_cookies_select_drop: ["blaize_session"], + cs_dompurify: 1 + }, + "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\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/, + useragent: "googlebot" + }, + "The Diplomat": { + domain: "thediplomat.com", + useragent: "facebookbot" + }, + "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: /\.tinypass\.com\//, + cs_dompurify: 1 + }, + "The Epoch Times (+ cz|de|fr|jp|ro; opt-in to custom sites)": { + domain: "###_usa_epochtimes", + group: [ + "epoch.org.il", + "theepochtimes.com" + ], + allow_cookies: 1, + block_regex: /subs\.(theepochtimes\.com|epochbase\.(com|eu))\/rules\/get/, + 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|cdn\.ampproject\.org\/v\d\/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": { + domain: "thehindu.com", + allow_cookies: 1, + block_regex: /(cdn\.cxense\.com\/|\.piano\.io\/xbuilder\/experience\/execute|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/ + }, + "The Hindu BusinessLine": { + domain: "thehindubusinessline.com", + allow_cookies: 1, + block_regex: /(cdn\.cxense\.com\/|\.piano\.io\/xbuilder\/experience\/execute|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/ + }, + "The Impression": { + domain: "theimpression.com", + allow_cookies: 1 + }, + "The Independent": { + domain: "independent.co.uk", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/, + cs_dompurify: 1 + }, + "The Indian Express": { + domain: "indianexpress.com", + allow_cookies: 1, + block_regex: /(\/indianexpress\/js\/evolok\/|\.fewcents\.co\/.+\/paywall.*\.js|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "The Intercept": { + domain: "theintercept.com", + allow_cookies: 1, + block_regex: /\.theintercept\.com\/api\/tinypass\.min\.js/ + }, + "The Irish Examiner": { + domain: "irishexaminer.com", + allow_cookies: 1, + block_regex: /\.irishexaminer\.com\/pu_examiner\/scripts\/engage/ + }, + "The Irish Times": { + domain: "irishtimes.com", + allow_cookies: 1, + block_regex: /\.irishtimes\.com\/zephr\/feature/ + }, + "The Japan Times (do not block Piano.io-script externally)": { + domain: "japantimes.co.jp", + block_regex: /cdn\.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's Daily": { + domain: "thelawyersdaily.ca", + allow_cookies: 1, + useragent: "googlebot" + }, + "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\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "The New Atlantis": { + domain: "thenewatlantis.com", + allow_cookies: 1, + block_regex: /\.thenewatlantis\.com\/.+\/thenewatlantis\/js\/(gate|donate)\.js/ + }, + "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: /\.newstatesman\.com\/.+\/nsmg-evolok-paywall\/.+\.js/ + }, + "The New York Post": { + domain: "nypost.com", + allow_cookies: 1, + block_regex: /\.nypost\.com\/zephr\/feature/ + }, + "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\/feature/ + }, + "The New York Times": { + domain: "nytimes.com", + allow_cookies: 1, + block_regex: /(\.nytimes\.com\/meter\.js|mwcm\.nyt\.com\/.+\.js|cooking\.nytimes\.com\/api\/.+\/access)/, + useragent: "googlebot" + }, + "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 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|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "The Spectator (UK)": { + domain: "spectator.co.uk", + useragent: "googlebot" + }, + "The Spectator Australia": { + domain: "spectator.com.au", + useragent: "googlebot" + }, + "The Spectator World": { + domain: "thespectator.com", + allow_cookies: 1, + block_regex: /\.tinypass\.com\// + }, + "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 Telegraph": { + domain: "telegraph.co.uk", + allow_cookies: 1, + block_regex: /(\.tinypass\.com\/|\.telegraph\.co\.uk\/martech\/js\/|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + }, + "The Times (UK; fetch from archive.is)": { + domain: "thetimes.co.uk", + 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|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)", + cs_dompurify: 1 + }, + "The Verge (newsletter)": { + domain: "theverge.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "The Wall Street Journal (fetch from archive.is)": { + domain: "wsj.com", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/, + cs_dompurify: 1 + }, + "The Washington Post": { + domain: "washingtonpost.com", + allow_cookies: 1, + block_regex: /\.washingtonpost\.com\/subscribe\/static\/tetro-client\/fusion\/tetro\.min\.js/ + }, + "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, + block_regex: /\.timeshighereducation\.com\/sites\/default\/files\/.+\/js__.+\.js/ + }, + "Times of India": { + domain: "###_timesofindia", + group: [ + "epaper.indiatimes.com", + "timesofindia.com", + "timesofindia.indiatimes.com" + ], + allow_cookies: 1, + exception: [{ + domain: "timesofindia.indiatimes.com", + allow_cookies: 1, + useragent: "googlebot" + } + ] + }, + "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)" + }, + "Tuttosport": { + domain: "tuttosport.com", + allow_cookies: 1, + block_regex: /\.tuttosport\.com\/_next\/static\/chunks\/pages\/news\/%5B.+\.js/ + }, + "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\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/, + useragent: "googlebot" + }, + "USA Today": { + domain: "usatoday.com", + allow_cookies: 1, + block_regex: /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, + useragent: "googlebot" + }, + "Valeurs Actuelles": { + domain: "valeursactuelles.com", + allow_cookies: 1, + block_regex: /\.qiota\.com\// + }, + "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: /cdn\.cxense\.com\//, + useragent: "googlebot" + }, + "Vikatan": { + domain: "vikatan.com", + allow_cookies: 1, + cs_dompurify: 1 + }, + "Vogue Business (fetch from archive.is)": { + domain: "voguebusiness.com", + block_regex: /\.voguebusiness\.com\/journey\/compiler\/build-.+\.js/, + remove_cookies_select_drop: ["userId"], + cs_dompurify: 1 + }, + "Volksstimme": { + domain: "volksstimme.de", + allow_cookies: 1, + cs_dompurify: 1 + }, + "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 + }, + "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\// + }, + "Winnipeg Free Press": { + domain: "winnipegfreepress.com", + allow_cookies: 1, + block_regex: /(\.winnipegfreepress\.com\/(api\/v\d\/auth\/identify|.+\/gdpr\.js)|cdn\.cxense\.com\/)/ + }, + "WirtschaftsWoche (fetch from archive.is)": { + domain: "wiwo.de", + allow_cookies: 1, + block_regex: /\.wiwo\.de\/js\/.+\/wt\..+\.js/, + cs_dompurify: 1 + }, + "Wonderzine": { + domain: "wonderzine.com", + allow_cookies: 1, + useragent: "facebookbot" + }, + "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: /cdn\.ampproject\.org\/.+\/amp-(access|(.+-)?ad|analytics|fx-flying-carpet|subscriptions)-.+\.(m)?js/, + excluded_domains: ["cambridge.org", "cmjornal.pt"] + }, + "Amplitude": { + domain: "amplitude.com", + allow_cookies: 1, + block_regex_general: /\.amplitude\.com\//, + excluded_domains: ["amplitude.com"] + }, + "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)/, + excluded_domains: ["nationalreview.com"] + }, + "Cxense": { + domain: "cxense.com", + allow_cookies: 1, + block_regex_general: /cdn\.cxense\.com\//, + excluded_domains: ["bizjournals.com", "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: /\/(wp-content\/.+\/ev-em|evolok\/.+\/ev-widgets)\.min\.js/ + }, + "FewCents": { + domain: "fewcents.co", + allow_cookies: 1, + block_regex_general: /\.fewcents\.co\/.+\/paywall.*\.js/ + }, + "Ippen.space": { + domain: "ippen.space", + allow_cookies: 1, + block_regex_general: /(\.ippen\.space\/js\/paywall\.js|\/sub\/js\/pc-offer-west\.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\// + }, + "OneCount": { + domain: "onecount.net", + allow_cookies: 1, + block_regex_general: /\.onecount\.net\//, + excluded_domains: ["onecount.net"] + }, + "Pelcro": { + domain: "pelcro.com", + allow_cookies: 1, + block_regex_general: /js\.pelcro\.com\// + }, + "Piano.io (+ TinyPass)": { + domain: "piano.io", + allow_cookies: 1, + block_regex_general: /\.piano\.io\/xbuilder\/experience\/execute/, + excluded_domains: ["piano.io", "asia.nikkei.com", "auto-swiat.pl", "businessinsider.com.pl", "forbes.pl", "hbr.org", "japantimes.co.jp", "komputerswiat.pl", "nacion.com", "newsweek.pl", "onet.pl"] + }, + "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"] + }, + "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 + }, + "Weborama.fr": { + domain: "weborama.fr", + allow_cookies: 1, + block_regex_general: /\.weborama\.fr\// + }, + "Zephr": { + domain: "zephr.com", + allow_cookies: 1, + block_regex_general: /(\.zephr\.com\/zephr-browser\/|\/zephr\/feature)/ + }, + "* Custom (new) sites": { + domain: "###" + }, +} + +if (typeof browser !== 'object') { + delete defaultSites['Roularta Media Group']['block_js_inline']; +} + +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); + +// grouped domains (background) +var au_news_corp_domains = grouped_sites['###_au_news_corp']; +var ch_media_domains = grouped_sites['###_ch_media']; +var de_madsack_domains = grouped_sites['###_de_madsack']; +var es_grupo_vocento_domains = grouped_sites['###_es_grupo_vocento']; + +// 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", "investmentnews.com", "thewirechina.com", "uppereastsite.com"], + "###_uk_axate.io": ["thecricketer.com", "thinkofx.net"], + "###_uk_haymarket": ["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; + +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 be_mediahuis_nofix_domains = ['gva.be', 'hbvl.be']; +var de_funke_medien_nofix_domains = ['harzkurier.de', 'ikz-online.de']; +var de_rp_aachen_medien_nofix_domains = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'ga.de', 'rp-online.de', 'saarbruecker-zeitung.de', 'volksfreund.de']; +var de_westfalen_medien_nofix_domains = ['muensterschezeitung.de', 'westfalen-blatt.de', 'wn.de']; +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_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_indigo_nofix_domains = ['africaintelligence.com', 'africaintelligence.fr', 'glitz.paris', 'intelligenceonline.com', 'intelligenceonline.fr', 'lalettre.fr']; +var fr_jamg_nofix_domains = ['africabusinessplus.com', 'jeuneafrique.com', 'theafricareport.com']; +var it_gedi_nofix_domains = ['gelocal.it', 'limesonline.com']; +var nl_mediahuis_region_nofix_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl']; +var nofix_sites = ['11freunde.de', 'aamulehti.fi', 'aftenposten.no', 'aftonbladet.se', 'allgaeuer-zeitung.de', 'americanscientist.org', 'arkansasonline.com', 'asahi.com', 'asiatimes.com', 'aviationweek.com', 'badische-zeitung.de', 'bhaskar.com', 'bloomberglaw.com', 'bloombergtax.com', 'bnef.com', 'bnn.de', 'borsen.dk', 'businessdesk.co.nz', 'businessinsider.de', 'businessinsider.jp', 'businesslive.co.za', 'businesstimes.com.sg', 'caixin.com', 'caixinglobal.com', 'caravanmagazine.in', 'catalyst-journal.com', 'chegg.com', 'compactmag.com', 'coursehero.com', 'denikn.cz', 'deutsche-wirtschafts-nachrichten.de', 'die-glocke.de', 'dn.no', 'dn.se', 'elordenmundial.com', 'entrepreneur.com', 'epw.in', 'ewmagazine.nl', 'falter.at', 'finance.si', 'franc-tireur.fr', 'ftchinese.com', 'ftchineselive.com', 'gamestar.de', 'geo.de', 'golem.de', 'gp.se', 'handelsblatt.com', 'hbrarabic.com', 'hbrchina.org', 'hbrfrance.fr', 'heise.de', 'hs.fi', 'information.dk', 'investors.com', 'iltalehti.fi', 'jacobin.com', 'jungefreiheit.de', 'kleinezeitung.at', 'krone.at', 'laverita.info', 'lavie.fr', 'lavozdegalicia.es', 'law360.co.uk', 'law360.com', 'le1hebdo.fr', 'leconomiste.com', 'lefigaro.fr', 'lefilmfrancais.com', 'lequipe.fr', 'lesjours.fr', 'letemps.ch', 'liberation.fr', 'libertiesjournal.com', 'lr-online.de', 'mailplus.co.uk', 'main-echo.de', 'mainpost.de', 'manager-magazin.de', 'maville.com', 'medianama.com', 'mediapart.fr', 'milanofinanza.it', 'mittelbayerische.de', 'monde-diplomatique.fr', 'mondediplo.com', 'money.it', 'moneycontrol.com', 'moodys.com', 'morningstar.com', 'motorsport.com', 'moz.de', 'nachrichten.at', 'nationaljournal.com', 'nature.com', 'nbr.co.nz', 'newcriterion.com', 'news24.com', 'nn.de', 'on3.com', 'ouest-france.fr', 'philonomist.com', 'pnp.de', 'politicopro.com', 'politiken.dk', 'pressreader.com', 'publico.pt', 'puck.news', 'quillette.com', 'rbc.ru', 'republic.ru', 'rheinpfalz.de', 'risk.net', 'rnz.de', 'saechsische.de', 'sciencedirect.com', 'springer.com', 'statnews.com', 'stern.de', 'stimme.de', 'streetinsider.com', 'substack.com', 'svd.se', 'swp.de', 'taxation.co.uk', 'taxjournal.com', 'the-ken.com', 'thebanker.com', 'theinformation.com', 'theinitium.com', 'themorningcontext.com', 'theparisreview.org', 'thestar.com.my', 'thewirechina.com', 'timeslive.co.za', 'usine-digitale.fr', 'vedomosti.ru', 'weltwoche.ch', 'weltwoche.de', 'wissenschaft.de', 'worldpoliticsreview.com', 'wz.de', 'zaobao.com.sg'].concat(be_mediahuis_nofix_domains, de_funke_medien_nofix_domains, de_rp_aachen_medien_nofix_domains, de_westfalen_medien_nofix_domains, fr_be_groupe_rossel_nofix_domains, fr_groupe_ebra_nofix_domains, fr_indigo_nofix_domains, fr_jamg_nofix_domains, it_gedi_nofix_domains, nl_mediahuis_region_nofix_domains); diff --git a/sites_updated.json b/sites_updated.json new file mode 100644 index 0000000..f23ea33 --- /dev/null +++ b/sites_updated.json @@ -0,0 +1,24 @@ +{ + "DigiTimes Asia": { + "domain": "digitimes.com", + "allow_cookies": 1, + "block_regex": "\\.piano\\.io", + "useragent": "googlebot", + "upd_version": "3.6.4.5" + }, + "El Español": { + "domain": "elespanol.com", + "allow_cookies": 1, + "block_regex": "(\\.tinypass\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|subscriptions)-.+\\.js)", + "cs_code": "[{\"cond\":\"div.content-not-granted-paywall\", \"rm_class\":\"content-not-granted-paywall\"}]", + "upd_version": "3.6.4.3" + }, + "NDTV Profit": { + "domain": "ndtvprofit.com", + "allow_cookies": 1, + "amp_redirect": "div[class^='hard-paywall']", + "amp_unhide": 1, + "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js", + "upd_version": "3.6.4.5" + } +} diff --git a/updates.json b/updates.json new file mode 100644 index 0000000..ce42eb9 --- /dev/null +++ b/updates.json @@ -0,0 +1,10 @@ +{ + "addons": { + "magnolia@12.34": { + "updates": [ + { "version": "3.6.4.0", + "update_link": "https://github.com/bpc-clone/bpc_updates/releases/latest/download/bypass_paywalls_clean-3.6.4.0.xpi" } + ] + } + } +} diff --git a/updates_custom.json b/updates_custom.json new file mode 100644 index 0000000..ecdab82 --- /dev/null +++ b/updates_custom.json @@ -0,0 +1,10 @@ +{ + "addons": { + "magnolia_limited_permissions@12.34": { + "updates": [ + { "version": "3.6.4.2", + "update_link": "https://github.com/bpc-clone/bpc_updates/releases/latest/download/bypass_paywalls_clean-3.6.4.2-custom.xpi" } + ] + } + } +}