diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ab20918 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020, magnolia1234 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..ab20918 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020, magnolia1234 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.html b/README.html new file mode 100644 index 0000000..3465af6 --- /dev/null +++ b/README.html @@ -0,0 +1,1079 @@ + + +
+ + +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.
Download the latest release by xpi-file from GitFlic, 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 GitFlic (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).
+You also need to repack the zip-file so it doesn't contain a folder (default on sites like GitHub).
Or load a temporary add-on in regular Firefox (go to about:debugging#/runtime/this-firefox & load manifest.json from unpacked (master-zip) folder).
+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).
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 downloading xpi-file of latest release from GitFlic (with automatic add-on updates) when you enable the debug menu (settings > about > tap Firefox logo 5 times > return to settings): you'll get new menu item Install extension from file
+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 Quetta Browser (Chromium).
+You can also use the adblocker filter/userscripts (much less supported sites).
Visit the Chrome repository on GitFlic of Bypass Paywalls Clean.
+Or manually install latest release by zip or crx-file from GitFlic
Use adblocker with custom (content)filter & userscript (manager): 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).
++ Go to top +
++ * free articles only. +
++ Reuters - +The New York Times - +The Washington Post
++ Adweek - +American Affairs - +Barron's - +Benzinga - +Bloomberg - +Business Insider - +Citywire - +CNBC - +Fast Company - +Forbes - +Fortune - +Harvard Business Review - +Inc.com - +MarketWatch - +MIT Sloan Management Review - +Quartz - +S&P Global - +Stock News - +The Business Journals* - +The Business of Fashion - +The Wall Street Journal - +Vogue Business - +ZeroHedge
+Grouped in options:
American Banker (+ Arizent; opt-in to custom sites)
BNP Media sites (opt-in to custom sites)
Bridge Tower Media sites (opt-in to custom sites)
California Business Journals sites like
Los Angeles Business Journal -
+Orange County Business Journal -
+San Diego Business Journal -
+San Fernando Valley Business Journal
Crain Communications sites like
Ad Age -
+Automotive News -
+Crain's Chicago Business -
+Crain's Cleveland Business -
+Crain's Detroit Business -
+Crain's Grand Rapids Business -
+Crain's New York Business -
+Modern Healthcare -
+Pensions & Investments
+Global Polymer Group:
+European Rubber Journal -
+Plastics News -
+Rubber News -
+Sustainable Plastics -
+Tire Business -
+Urethanes Technology International
Digiday Media sites like
Digiday -
+Glossy -
+ModernRetail
Industry Dive sites (opt-in to custom sites)
Inside Retail sites (opt-in to custom sites)
PEI Media sites (opt-in to custom sites)
+ Brill - +Bulletin of the Atomic Scientists - +Chemical & Engineering News - +Discover Magazine - +History Today - +Inside Higher Ed - +Interesting Engineering - +Medscape - +MIT Technology Review - +National Geographic USA - +Nautilus - +New Scientist - +Popular Science - +Science* - +ScienceNews.org - +Scientific American - +StatNews - +The Scientist - +Times Higher Education
+Grouped in options:
Crain Communications sites like
360Dx -
+GenomeWeb -
+Precision Medicine Online
TechTarget Group sites like
Computer Weekly -
+TechTarget
The Chronicle sites like
The Chronicle of Higher Education -
+The Chronicle of Philanthropy
+ BBC History Extra - +Encyclopedia Britannica - +eNotes - +Glassdoor - +Loeb Classical Library - +Philosophy Now - +Quora - +Scholastic - +SlideShare - +Study.com (only lessons; no videos)
++ CyclingNews - +ESPN USA - +Rivals - +RugbyPass - +Sports Illustrated - +The Athletic
+Grouped in options:
Medium (custom) domains like (opt-in to custom sites for unlisted)
Medium -
+Better Programming -
+Towards Data Science
+ America's Test Kitchen - +American Purpose - +Apollo Magazine - +Artforum - +Artnet - +Atavist Magazine - +Axios - +Commentary Magazine - +Defector - +Dwell - +Field & Stream - +First Things - +Foreign Affairs - +Foreign Policy - +Harper's Magazine - +Jazzwise - +National Review - +Newsweek - +Outdoor Life - +Paste Magazine - +Pirate Wires - +Politico - +Project Syndicate - +Puck.news - +Slate - +SofRep - +Stereogum - +Stratfor - +Texas Monthly - +The American Conservative - +The American Interest - +The American Scholar - +The Art Newspaper - +The Atlantic - +The Baffler - +The Christian Science Monitor - +The Daily Beast - +The Daily Wire - +The Diplomat - +The Dispatch - +The Impression - +The Intercept - +The Juggernaut - +The Lamp Magazine - +The Nation - +The New Atlantis - +The New Criterion - +The New Republic - +The New York Review of Books - +The Point Magazine - +The Spectator World - +The Verge - +The Week - +The Wrap - +Vice - +Vox - +Washington Examiner
+Grouped in options:
Condé Nast magazines sites like
Architectural Digest -
+Bon Appétit -
+British Vogue -
+Condé Nast Traveler -
+Epicurious -
+GC -
+The New Yorker -
+Vanity Fair -
+Vogue USA -
+Wired
Hearst Communications magazines sites like
Bicycling -
+Cosmopolitan -
+Country Living -
+Delish -
+Elle Decor -
+Elle USA -
+Esquire -
+Good Housekeeping -
+Harper's Bazaar -
+House Beautiful -
+Men's Health -
+Oprah Daily -
+Popular Mechanics -
+Prevention -
+Road & Track -
+Runner's World -
+Town & Country -
+Women's Health
Outside magazines sites like
Backpacker -
+Beta -
+Better Nutrition -
+Clean Eating -
+Climbing -
+Outside -
+Oxygen -
+SKI -
+Trail Runner -
+Triathlete -
+Vegetarian Times -
+Women's Running -
+Yoga Journal
Penske Media Corporation sites like
Billboard -
+Rolling Stone -
+Sourcing Journal -
+Sportico -
+Variety -
+WWD
The Epoch Times sites like (opt-in to custom sites for br|cz|de|fr|jp|ro sites)
Epoch.org.il -
+The Epoch Times
+ Albuquerque Journal - +CNN - +Fox News - +Honolulu Star-Advertiser - +Las Vegas Review-Journal - +Los Angeles Times - +Mountain View Voice - +New York Magazine (+ Curbed, Grub Street, The Cut & Vulture) - +Newsday - +Palo Alto Online - +Pittsburgh Post Gazette - +Star Tribune - +Tampa Bay Times - +The Baltimore Banner - +The Boston Globe - +The Columbian - +The Dallas Morning News - +The Hill - +The New York Sun - +The Salt Lake Tribune - +The San Francisco Standard - +The Seattle Times - +The Philadelphia Inquirer
+
+ USA Today
+
+Grouped in options:
Advance Local sites like
AL/Alabama -
+MLive/Michigan -
+NJ/New Jersey -
+Staten Island Advance -
+The Express-Times -
+The Oregonian -
+The Patriot-News -
+The Plain Dealer -
+The Post-Standard -
+The Republican
CNHI Group sites (opt-in to custom sites)
Forum Communications sites (opt-in to custom sites)
Gannett Group (local USA Today) sites like (opt-in to custom sites for unlisted)
Austin American-Statesman -
+Democrat and Chronicle -
+Detroit Free Press -
+Knoxville News Sentinel -
+Memphis Commercial Appeal -
+Milwaukee Journal Sentinel -
+The Arizona Republic -
+The Cincinnati Enquirer -
+The Columbus Dispatch -
+The Courier-Journal -
+The Des Moines Register -
+The Detroit News -
+The Florida Times-Union -
+The Indianapolis Star -
+The News-Press -
+The Oklahoman -
+The Record (North Jersey) -
+The Tennessean
Hearst Communications (newspapers) sites like (opt-in to custom sites for unlisted)
Albany Times Union -
+Connecticut Post -
+Houston Chronicle -
+New Haven Register -
+San Antonio Express-News -
+San Francisco Chronicle
Lee Enterprises Group sites like (opt-in to custom sites for unlisted)
Arizona Daily Star -
+Lincoln Journal Star -
+Omaha World-Herald -
+Richmond Times-Dispatch -
+St. Louis Post-Dispatch -
+The Buffalo News -
+The Times of Northwest Indiana -
+Tulsa World -
+Wisconsin State Journal -
+Winston-Salem Journal
Maine Trust sites (opt-in to custom sites)
McClatchy Group sites like (opt-in to custom sites for unlisted)
Belleville News-Democrat -
+El Nuevo Herald -
+Fort Worth Star-Telegram -
+Lexington Herald-Leader -
+McClatchy DC -
+Miami Herald -
+The Charlotte Observer -
+The Fresno Bee -
+The Kansas City Star -
+The News & Observer -
+The Sacramento Bee -
+The State -
+The Wichita Eagle -
+Tri-City Herald
MediaNews Group sites like (opt-in to custom sites for unlisted/local sites)
Boston Herald -
+East Bay Times -
+Orange County Register -
+San Diego Union Tribune -
+St. Paul Pioneer Press -
+The Denver Post -
+The Mercury News -
+The Press-Enterprise
The Atlanta Journal-Constitution + Cox First Media (opt-in to custom sites)
The (New Orleans) Advocate Group sites like
The Advocate -
+The New Orleans Advocate/The Times-Picayune -
+The Shreveport-Bossier City Advocate
TownNews sites (Blox CMS) (opt-in to custom sites)
Tribune Publishing Company sites like
Baltimore Sun -
+Capital Gazette -
+Chicago Tribune -
+Daily Press -
+Hartford Courant -
+New York Daily News -
+Orlando Sentinel -
+SunSentinel -
+The Morning Call -
+The Virginian-Pilot
+ iPolitics - +Le Devoir - +The Globe and Mail - +The Hill Times - +Winnipeg Free Press
+Grouped in options:
Groupe Capitales Médias sites like (opt-in to custom sites for unlisted)
Le Soleil
Groupe Québecor sites like
Le Journal de Montréal -
+Le Journal de Québec
Postmedia Network sites like (opt-in to custom sites for unlisted)
Calgary Herald -
+Financial Post -
+National Post -
+The Province -
+Toronto Sun -
+Vancouver Sun
TorStar sites like
The Toronto Star and regional sites
+Niagara Falls Review -
+Peterborough Examiner -
+St. Catharines Standard -
+The Hamilton Spectator -
+Waterloo Region Record -
+Welland Tribune
Valnet Group sites (opt-in to custom sites)
+ Balkan Insight - +Bloomberg Adria - +EUobserver - +Follow the Money (ftm.eu)
++ Autocar - +Autosport* - +Belfast Telegraph - +Business Post - +Decanter - +Evening Standard - +Financial News - +Financial Times - +GB News - +Granta Magazine - +iNews - +Investors' Chronicle - +Irish Independent - +Literary Review - +London Review of Books - +Monocle - +Motor Sport Magazine - +Prospect Magazine - +Stylist - +Tes Magazine - +The Critic - +The Economist - +The Irish Examiner - +The Irish News - +The Irish Times - +The Lawyer - +The New European - +The New Statesman - +The Spectator - +The Telegraph - +The Times - +The Times Literary Supplement - +UnHerd
+Grouped in options:
Daily Mail Group sites like
Daily Mail -
+Mail on Sunday -
+This is Money
DVV Media International sites (opt-in to custom sites)
Haymarket Media Group sites (opt-in to custom sites)
Haymarket Medical Network sites (opt-in to custom sites)
National World Publishing sites like (opt-in to custom sites for unlisted)
The Scotsman -
+Yorkshire Post
Oxford University Press sites (opt-in to custom sites)*
Newsquest Media Group sites (opt-in to custom sites)
The Independent Group sites like
The Independent UK -
+The Independent USA
The Stage Media sites like:
The Bookseller -
+The Stage
The Sun Group sites like
The Scottish Sun -
+The Sun UK
+ + William Reed Group + sites (opt-in to custom sites)\
++ Deník +
++ Berlingske +
+Grouped in options:
DK Medier sites (opt-in to custom sites)
+ Suomen Sotilas +
++ 60 Millions de consommateurs - +Actu.fr - +Alternatives Economiques - +Atlantico - +Auto Hebdo - +Auto Plus - +Capital - +Causeur - +Challenges - +Charlie Hebdo - +Connaissance des Arts - +Cosmopolitan - +Courrier international - +Elle - +Esprit - +Jeune Afrique - +L'Écho - +L'Équipe - +L'Express - +L'Informé - +L'Oeil de la Photographie (fr/en) - +L'Opinion - +La Croix - +La Nouvelle République du Centre-Ouest - +Le Courrier des Stratèges - +Le Figaro - +Le Grand Continent - +Le Journal du Dimanche - +Le Journal du Net - +Le Monde - +Le Nouvel Economiste - +Le Parisien - +Le Point - +Le Revenu - +Le Télégramme - +Le Un - +Les Échos - +Les Inrockuptibles - +Libération - +Marianne - +Paris Match - +Philonomist (fr/en) - +Philosophie Magazine - +Politis - +Pour l'Éco - +Pour la Science - +Public - +Réforme - +Revue Conflits - +Science & Vie - +Sciences et Avenir - +Sciences Humaines - +Télérama - +Valeurs Actuelles - +XXI
+Grouped in options:
Groupe Centre France sites like (opt-in to custom sites for unlisted)
La Montagne
Groupe Infopro Digital sites like (opt-in to custom sites for unlisted)
L'Usine Nouvelle
Groupe IPM sites like
DH Les Sports+ -
+L'Avenir -
+La Libre
Groupe La Dépêche sites like
Centre Presse -
+Journal de Millau -
+L'Indépendant -
+La Dépêche du Midi -
+La Nouvelle République des Pyrénées -
+Le Petit Bleu d'Agen -
+Midi Libre -
+Midi Olympique
Groupe Nice-Matin sites like
Monaco-Matin -
+Nice-Matin -
+Var-Matin
Groupe Profession Santé sites like
Le Quotidien du Médecin -
+Le Quotidien du Pharmacien
Groupe Sud Ouest sites like
Charente libre -
+La République des Pyrénées -
+Sud Ouest
Groupe SynerJ Media sites (opt-in to custom sites)
Roularta Media Group sites like
Femmes d'Aujourd'hui -
+Flair.be -
+Le Vif
TechTarget Group sites like
LeMagIT
+ Aachener Zeitung - +Ärzte Zeitung - +Automobilwoche - +Berliner Zeitung - +Bild - +Börsen-Zeitung - +Cicero - +Der Freitag - +Der Spiegel - +Der Tagesspiegel - +Die Rheinpfalz - +Die Welt - +Die Zeit - +Frankfurter Allgemeine Zeitung - +Hamburger Morgenpost - +Handelsblatt - +Heise online - +Jacobin Magazin - +Kölner Stadt-Anzeiger - +Kölnische Rundschau - +Krautreporter - +Kurier.at - +Manager Magazin - +Neue Westfälische - +Nordwest Zeitung - +Philosophie Magazin - +Piqd - +Profil.at - +Spektrum - +Springer Medizin - +Süddeutsche Zeitung - +Südkurier - +T3n - +Tiroler Tageszeitung - +Vorarlberg Nachrichten - +Vorarlberg Online - +Weltkunst - +Weser-Kurier
+Grouped in options:
Deutscher Fachverlag Mediengruppe (opt-in to custom sites)
Funke Mediengruppe sites like
Berliner Morgenpost -
+Braunschweiger Zeitung -
+Hamburger Abendblatt -
+Iserlohner Kreisanzeiger und Zeitung -
+Neue Ruhr Zeitung -
+Ostthüringer Zeitung -
+Thüringer Allgemeine -
+Thüringische Landeszeitung -
+Westdeutsche Allgemeine Zeitung -
+Westfalenpost -
+Westfälische Rundschau
Haas Mediengruppe sites like (opt-in to custom sites for unlisted)
Mannheimer Morgen
Ippen.media sites like (opt-in to custom sites for unlisted)
Frankfurter Rundschau -
+Münchner Merkur -
+Oberbayerisches Volksblatt
Landwirtschaftsverlag sites like
Profi.de -
+Top Agrar -
+Wochenblatt für Landwirtschaft & Landleben
Madsack Mediengruppe sites like (opt-in to custom sites for unlisted)
Hannoversche Allgemeine Zeitung -
+Kieler Nachrichten -
+Leipziger Volkszeitung -
+Lübecker Nachrichten -
+Märkische Allgemeine -
+Neue Presse (Hannover) -
+Ostsee-Zeitung -
+RedaktionsNetzwerk Deutschland -
+Sächsische Zeitung
Media Group Westfalen sites like (opt-in to custom sites for unlisted)
Ruhr Nachrichten
Motor Presse Stuttgart sites like
Aerokurier -
+Auto Motor und Sport -
+Flug Revue -
+Motorrad -
+Women's Health
NOZ/MHN Mediengruppe sites like
Neue Osnabrücker Zeitung -
+Schleswig-Holsteinischer Zeitungsverlag
+Rheinische Post Mediengruppe like
General-Anzeiger Bonn -
+Rheinische Post -
+Saarbrücker Zeitung -
+Trierischer Volksfreund
Verlagsgruppe Rhein Main sites like (opt-in to custom sites for unlisted)
Allgemeine Zeitung (Mainz) -
+Darmstädter Echo -
+Wiesbadener Kurier
+ Kathimerini +
++ Corriere della Sera - +Corriere dello Sport - +Domani - +Eastwest - +Il Fatto Quotidiano - +Il Foglio - +Il Manifesto - +Il Sole 24 Ore (24+) - +Internazionale - +Italia Oggi - +La Gazzetta dello Sport - +Milano Finanza - +Sky Sport - +Sky TG24 - +Tuttosport
+Grouped in options:
Gruppo GEDI.it sites like
Huffingtonpost.it -
+Italian.tech -
+La Repubblica -
+La Stampa -
+Le Scienze -
+Moda & Beauty
+ Il Messaggero and regional sites like +Corriere Adriatico - +Il Gazzettino - +Il Mattino - +Quotidiano di Puglia
++ Quotidiano Nazionale and regional sites like +Il Giorno - +Il Resto del Carlino - +Il Telegrafo Livorno - +La Nazione
+
+
+ Gruppo SAE.it
+ * sites like (opt-in to custom sites for unlisted)
Il Tirreno* -
+La Nuova Sardegna*
+ Business AM - +Business Insider Nederland - +De Tijd - +Doorbraak - +Follow the Money - +Groene Amsterdammer - +Het Laatste Nieuws - +Linda - +NRC Handelsblad - +Telegraaf - +Vrij Nederland
+Grouped in options:
Algemeen Dagblad (+ regional/ADR) sites like
Algemeen Dagblad -
+BN DeStem -
+Brabants Dagblad -
+Eindhovens Dagblad -
+Gelderlander -
+PZC -
+Stentor -
+Tubantia
DPG Media (not ADR) sites like
De Morgen -
+De Volkskrant -
+Flair.nl -
+Humo -
+Libelle.nl -
+Margriet -
+Parool -
+Trouw
Mediahuis België sites like
De Standaard -
+Gazet van Antwerpen -
+Het Belang van Limburg -
+Het Nieuwsblad
Mediahuis Noord sites like (opt-in to custom sites for unlisted)
Dagblad van het Noorden -
+Leeuwarder Courant
ProMedia Group sites (opt-in to custom sites)
Roularta Media Group sites like
Artsenkrant -
+Beleggers Belangen -
+Flair.be -
+Knack -
+Krant van West-Vlaanderen -
+Libelle.be
+ Bergens Tidende -
+Dagsavisen
+Grouped in options:
DN Media Group sites like
DN -
+Europower -
+Fiskeribladet -
+Hydrogen Insight -
+Intrafish -
+Intrafish.no -
+Recharge -
+TradeWinds -
+Upstream
+ Polityka - +Puls Biznesu
+Grouped in options:
GremiMedia.pl Group sites like
Parkiet -
+Rzeczpospolita
Ringier Axel Springer Polska sites like
Auto Swiat -
+Business Insider -
+Forbes -
+Komputer Swiat -
+Newsweek -
+Onet
Wyborcza Group sites like
Magazyn-kuchnia.pl -
+Wyborcza.biz -
+Wyborcza.pl -
+Wysokieobcasy.pl
+ Diário de Notícias - +Expresso - +Observador - +Record - +Sábado
++ Wonderzine +
++ Diario de Navarra - +El Confidencial - +El Diario.es - +El Español - +El País - +La Vanguardia - +Mundo Deportivo - +Política Exterior - +Público
+Grouped in options:
ARA sites like
Ara.cat -
+Ara Balears
Grupo Prensa Ibérica sites like (opt-in to custom sites for unlisted)
Diario de Mallorca -
+El Día -
+El Periódico de Catalunya -
+El Periódico de España -
+Faro de Vigo -
+Información -
+La Nueva España -
+La Provincia -
+Levante-EMV -
+Mallorca Zeitung -
+Superdeporte
Grupo Unidad Editorial sites like
El Mundo -
+Expansión -
+Marca
Grupo Vocento sites like
ABC -
+Canarias7 -
+El Comercio -
+El Correo -
+El Diario Montañés -
+El Diario Vasco -
+El Norte de Castilla -
+Hoy -
+Ideal -
+La Rioja -
+La Verdad -
+La Voz de Cádiz -
+Las Provincias -
+Sur
+ + Sport Life Ibérica + sites (opt-in to custom sites)
++ Dagens ETC - +NyTeknik
+Grouped in options:
Bonnier News Group sites like (opt-in to custom sites for unlisted)
Dagens Medicin -
+Dagens Nyheter -
+Helsingborgs Dagblad -
+Sydsvenskan
NWT Media sites (opt-in to custom sites)
+ Neue Zürcher Zeitung - +Schweizer Monat - +The Market
+Grouped in options:
CH Media sites like (opt-in to custom sites for unlisted)
Aargauer Zeitung -
+Luzerner Zeitung -
+St. Galler Tagblatt
Ringier Gruppe sites like
Blick -
+Beobachter -
+Handelszeitung
TAmedia sites like (opt-in to custom sites for unlisted)
24 heures -
+Basler Zeitung -
+Berner Zeitung -
+Der Bund -
+Tages-Anzeiger -
+Tribune de Genève
Grouped in options:
Groupe ESH Médias sites like
ArcInfo -
+La Côte -
+Le Nouvelliste
+ The Standard +
+Grouped in options:
Nation Media Group sites like (opt-in to custom sites for unlisted)
Business Daily -
+Daily Nation
+ BusinessDesk - +Forbes Australia - +Inkl - +MacroBusiness - +New Zealand Herald - +The Saturday Paper - +The Spectator Australia - +The West Australian (+ regional/opt-in to custom sites)
+Grouped in options:
Australia News Corp sites like
Cairns Post -
+Code Sports -
+Geelong Advertiser -
+Gold Coast Bulletin -
+Herald Sun -
+The Advertiser/AdelaideNow -
+The Australian -
+The Chronicle -
+The Courier-Mail -
+The Daily Telegraph -
+The Mercury Tasmania -
+The Weekly Times -
+Townsville Bulletin
Australia Nine Entertainment sites like
Brisbane Times -
+The Age -
+The Australian Financial Review -
+The Sydney Morning Herald -
+WAtoday
Australian Community Media sites like (opt-in to custom sites for unlisted)
Bendigo Advertiser -
+Central Western Daily -
+Daily Liberal -
+Illawarra Mercury -
+Newcastle Herald -
+The Advocate -
+The Border Mail -
+The Canberra Times -
+The Courier -
+The Daily Advertiser -
+The Examiner -
+The Northern Daily Leader -
+The Standard -
+Western Advocate
InvestSmart sites like
InvestSmart -
+Intelligent Investor
McPherson Media Group sites (opt-in to custom sites)
Private Media sites like
Crikey -
+Smart Company -
+The Mandarin
+ CommonWealth Magazine Taiwan* - +DigiTimes Asia - +South China Morning Post - +Southern Weekly - +The News Lens
++ Bar and Bench - +Bhaskar - +Business Standard - +Hindustan Times - +Inc42 - +India Today - +Live Law - +LiveMint - +Malayala Manorama - +Mid-Day - +Newslaundry - +NDTV Profit - +Outlook - +Outlook Business - +Swarajyamag - +The Economic Times (ET Prime) - +The Financial Express - +The Hindu - +The Hindu BusinessLine - +The Indian Express - +The Leaflet - +The News Minute - +The Quint - +Times of India - +Vikatan
++ Globes - +The Jerusalem Post - +Ynet
+Grouped in options:
Haaretz Group sites like
Haaretz.co.il -
+Haaretz.com -
+The Marker
+ Business Insider Japan - +Mainichi Shimbun - +Nikkei Asian Review - +The Japan Times
+
+ Initium Media -
+Tech in Asia
+Grouped in options:
SPH Media sites like
The Business Times -
+The Straits Times
+ Ámbito - +El Cronista - +El Tribuno - +La Gaceta - +La Nación*
+Grouped in options:
Grupo Clarín sites like
Clarín -
+La Voz del Interior -
+Los Andes -
+Olé
+ El Deber +
++ ABC Mais - +CartaCapital - +Correio do Povo - +Crusoé - +Estado de Minas - +Exame - +GaúchaZH - +Gazeta do Povo - +Grupo Abril - +Le Monde Diplomatique Brasil - +NSC Total - +O Estado de S. Paulo - +O Globo - +Revista Oeste - +Valor Econômico
+Grouped in options:
UOL sites like
Folha de S. Paulo -
+UOL
+ Diario Financiero - +El Mercurio (+ regional/opt-in to custom sites) - +La Tercera
++ Cambio Colombia - +El Espectador - +El Tiempo
++ El Universo +
++ El Universal - +Mexico News Daily
+
+ Grupo El Comercio sites like
Diario Correo -
+El Comercio -
+Gestión
+ El Observador - +El País - +La Diaria
++ * free articles only. +
++ Go to top +
+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.
You can submit a request for a new website
+Please use the issue template, read the following instructions and share your results for a quicker process.
+Remember to check the previous requests before asking for a new website.
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 sites/domains (for your subscriptions).
+You can also exclude a specific domain which is grouped in options.
+ Go to top +
+ + diff --git a/README.md b/README.md new file mode 100644 index 0000000..92ab0a7 --- /dev/null +++ b/README.md @@ -0,0 +1,1228 @@ +# 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 [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads), 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 [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads) (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).\ +You also need to repack the zip-file so it doesn't contain a folder (default on sites like GitHub). + +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 downloading [xpi-file of latest release from GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads/blob/raw?file=bypass_paywalls_clean-latest.xpi) (with automatic add-on updates) when you enable the debug menu (settings > about > tap Firefox logo 5 times > return to settings): you'll get new menu item *Install extension from file* + +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 [Quetta Browser (Chromium)](https://play.google.com/store/apps/details?id=net.quetta.browser).\ +You can also use the [adblocker filter/userscripts](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters) (much less supported sites). + +#### Chrome/Chromium +Visit the [Chrome repository on GitFlic](https://gitflic.ru/project/magnolia1234/bypass-paywalls-chrome-clean) of Bypass Paywalls Clean.\ +Or manually install latest release by zip or crx-file from [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads) + +#### iOS/iPadOS +Use adblocker with custom (content)filter & userscript (manager): [Bypass Paywalls Clean filters](https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters) (read instructions). + +Although [Orion Browser](https://apps.apple.com/us/app/orion-browser-by-kagi/id1484498200) supports installing this 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 (popup) and grant host permission for site (or opt-in to custom sites) +* You will be logged out for some of the sites you have enabled. +* Make sure you're running the latest version of Bypass Paywalls Clean. +* archive.is/today will not work with Secured DNS by Cloudflare (or when you change referer/user-agent for the archive site) +* for Google Search/Inspection Tool test url, view tested page, copy html (tab) code to https://codebeautify.org/htmlviewer & *Open in New Window*: click BPC icon once to clean layout of page (or use tool for desktop & open screenshot in new tab) +* Some sites need to redirect to an amp-page (this may cause a redirect-loop by an amp-to-html add-on or browser setting). +* If none of these work, you can submit an issue on [GitHub](https://github.com/bpc-clone/bpc_firefox_support/issues) or only when GitHub repo is offline use [X (DM)](https://x.com/Magnolia1234B). +* Always provide used add-on version, paywalled article (url) and describe issue in detail. +* 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) - +[Benzinga](https://www.benzinga.com) - +[Bloomberg](https://www.bloomberg.com) - +[Business Insider](https://www.businessinsider.com) - +[Citywire](https://www.citywire.com) - +[CNBC](https://www.cnbc.com) - +[Fast Company](https://www.fastcompany.com) - +[Forbes](https://www.forbes.com) - +[Fortune](https://fortune.com) - +[Harvard Business Review](https://www.hbr.org) - +[Inc.com](https://www.inc.com) - +[MarketWatch](https://www.marketwatch.com) - +[MIT Sloan Management Review](https://sloanreview.mit.edu) - +[Quartz](https://qz.com) - +[S&P Global](https://www.spglobal.com) - +[Stock News](https://stocknews.com) - +[The Business Journals](https://www.bizjournals.com)* - +[The Business of Fashion](https://www.businessoffashion.com) - +[The Wall Street Journal](https://www.wsj.com) - +[Vogue Business](https://www.voguebusiness.com) - +[ZeroHedge](https://www.zerohedge.com) + +Grouped in options:\ +*[American Banker](https://www.americanbanker.com) (+ [Arizent](https://www.arizent.com/brands)*; opt-in to custom sites)\ +*[BNP Media](https://www.bnpmedia.com/our-audiences)* sites (opt-in to custom sites)\ +*[Bridge Tower Media](https://bridgetowermedia.com/markets)* sites (opt-in to custom sites)\ +*California Business Journals* sites like\ +[Los Angeles Business Journal](https://labusinessjournal.com) - +[Orange County Business Journal](https://www.ocbj.com) - +[San Diego Business Journal](https://www.sdbj.com) - +[San Fernando Valley Business Journal](https://www.sfvbj.com)\ +*Crain Communications* sites like\ +[Ad Age](https://adage.com) - +[Automotive News](https://www.autonews.com) - +[Crain's Chicago Business](https://www.chicagobusiness.com) - +[Crain's Cleveland Business](https://www.crainscleveland.com) - +[Crain's Detroit Business](https://www.crainsdetroit.com) - +[Crain's Grand Rapids Business](https://www.crainsgrandrapids.com) - +[Crain's New York Business](https://www.crainsnewyork.com) - +[Modern Healthcare](https://www.modernhealthcare.com) - +[Pensions & Investments](https://www.pionline.com)\ +Global Polymer Group: +[European Rubber Journal](https://www.european-rubber-journal.com) - +[Plastics News](https://www.plasticsnews.com) - +[Rubber News](https://www.rubbernews.com) - +[Sustainable Plastics](https://www.sustainableplastics.com) - +[Tire Business](https://www.tirebusiness.com) - +[Urethanes Technology International](https://www.utech-polyurethane.com)\ +*Digiday Media* sites like\ +[Digiday](https://digiday.com) - +[Glossy](https://www.glossy.co) - +[ModernRetail](https://www.modernretail.co)\ +*[Industry Dive](https://www.industrydive.com/publications)* sites (opt-in to custom sites)\ +*[Inside Retail](https://octomedia.com.au/our-brands/inside-retail)* sites (opt-in to custom sites)\ +*[PEI Media](https://www.pei.group/brands)* sites (opt-in to custom sites) + +##### Tech/Science +[Brill](https://brill.com) - +[Bulletin of the Atomic Scientists](https://thebulletin.org) - +[Chemical & Engineering News](https://cen.acs.org) - +[Discover Magazine](https://www.discovermagazine.com) - +[History Today](https://www.historytoday.com) - +[Inside Higher Ed](https://www.insidehighered.com) - +[Interesting Engineering](https://interestingengineering.com) - +[Medscape](https://www.medscape.com) - +[MIT Technology Review](https://www.technologyreview.com) - +[National Geographic USA](https://www.nationalgeographic.com) - +[Nautilus](https://nautil.us) - +[New Scientist](https://www.newscientist.com) - +[Popular Science](https://www.popsci.com) - +[Science](https://www.science.org)* - +[ScienceNews.org](https://www.sciencenews.org) - +[Scientific American](https://www.scientificamerican.com) - +[StatNews](https://www.statnews.com) - +[The Scientist](https://www.the-scientist.com) - +[Times Higher Education](https://www.timeshighereducation.com) + +Grouped in options:\ +*Crain Communications* sites like\ +[360Dx](https://www.360dx.com) - +[GenomeWeb](https://www.genomeweb.com) - +[Precision Medicine Online](https://www.precisionmedicineonline.com)\ +*TechTarget Group* sites like\ +[Computer Weekly](https://www.computerweekly.com) - +[TechTarget](https://www.techtarget.com)\ +*The Chronicle* sites like\ +[The Chronicle of Higher Education](https://www.chronicle.com) - +[The Chronicle of Philanthropy](https://www.philanthropy.com) + +##### Encyclopedia/Book library/Knowledge base +[BBC History Extra](https://www.historyextra.com) - +[Encyclopedia Britannica](https://www.britannica.com) - +[eNotes](https://www.enotes.com) - +[Glassdoor](https://www.glassdoor.com) - +[Loeb Classical Library](https://www.loebclassics.com) - +[Philosophy Now](https://philosophynow.org) - +[Quora](https://www.quora.com) - +[Scholastic](https://www.scholastic.com) - +[SlideShare](https://www.slideshare.net) - +[Study.com (only lessons; no videos)](https://study.com) + +###### Sports +[CyclingNews](https://www.cyclingnews.com) - +[ESPN USA](https://www.espn.com) - +[Rivals](https://rivals.com) - +[RugbyPass](https://www.rugbypass.com) - +[Sports Illustrated](https://www.si.com) - +[The Athletic](https://www.nytimes.com/athletic) + +##### Magazines/Blogs +Grouped in options:\ +*Medium (custom) domains* like (opt-in to custom sites for unlisted)\ +[Medium](https://www.medium.com) - +[Better Programming](https://betterprogramming.pub) - +[Towards Data Science](https://towardsdatascience.com) + +[America's Test Kitchen](https://www.americastestkitchen.com) - +[American Purpose](https://www.americanpurpose.com) - +[Apollo Magazine](https://www.apollo-magazine.com) - +[Artforum](https://www.artforum.com) - +[Artnet](https://www.artnet.com) - +[Atavist Magazine](https://magazine.atavist.com) - +[Axios](https://www.axios.com) - +[Commentary Magazine](https://www.commentary.org) - +[Defector](https://defector.com) - +[Dwell](https://www.dwell.com) - +[Field & Stream](https://www.fieldandstream.com) - +[First Things](https://www.firstthings.com) - +[Foreign Affairs](https://www.foreignaffairs.com) - +[Foreign Policy](https://www.foreignpolicy.com) - +[Harper's Magazine](https://harpers.org) - +[Jazzwise](https://www.jazzwise.com) - +[National Review](https://www.nationalreview.com) - +[Newsweek](https://www.newsweek.com) - +[Outdoor Life](https://www.outdoorlife.com) - +[Paste Magazine](https://www.pastemagazine.com) - +[Pirate Wires](https://www.piratewires.com) - +[Politico](https://www.politico.com) - +[Project Syndicate](https://www.project-syndicate.org) - +[Puck.news](https://puck.news) - +[Slate](https://slate.com) - +[SofRep](https://sofrep.com) - +[Stereogum](https://www.stereogum.com) - +[Stratfor](https://stratfor.com) - +[Texas Monthly](https://www.texasmonthly.com) - +[The American Conservative](https://www.theamericanconservative.com) - +[The American Interest](https://www.the-american-interest.com) - +[The American Scholar](https://theamericanscholar.org) - +[The Art Newspaper](https://www.theartnewspaper.com) - +[The Atlantic](https://www.theatlantic.com) - +[The Baffler](https://thebaffler.com) - +[The Christian Science Monitor](https://www.csmonitor.com) - +[The Daily Beast](https://www.thedailybeast.com) - +[The Daily Wire](https://www.dailywire.com) - +[The Diplomat](https://thediplomat.com) - +[The Dispatch](https://thedispatch.com) - +[The Impression](https://theimpression.com) - +[The Intercept](https://theintercept.com) - +[The Juggernaut](https://www.thejuggernaut.com) - +[The Lamp Magazine](https://thelampmagazine.com) - +[The Nation](https://www.thenation.com) - +[The New Atlantis](https://www.thenewatlantis.com) - +[The New Criterion](https://newcriterion.com) - +[The New Republic](https://newrepublic.com) - +[The New York Review of Books](https://www.nybooks.com) - +[The Point Magazine](https://thepointmag.com) - +[The Spectator World](https://thespectator.com) - +[The Verge](https://www.theverge.com) - +[The Week](https://theweek.com) - +[The Wrap](https://www.thewrap.com) - +[Vice](https://www.vice.com) - +[Vox](https://www.vox.com) - +[Washington Examiner](https://www.washingtonexaminer.com) + +Grouped in options:\ +*Condé Nast magazines* sites like\ +[Architectural Digest](https://www.architecturaldigest.com) - +[Bon Appétit](https://www.bonappetit.com) - +[British Vogue](https://www.vogue.co.uk) - +[Condé Nast Traveler](https://www.cntraveler.com) - +[Epicurious](https://www.epicurious.com) - +[GC](https://www.gq.com) - +[The New Yorker](https://www.newyorker.com) - +[Vanity Fair](https://www.vanityfair.com) - +[Vogue USA](https://www.vogue.com) - +[Wired](https://www.wired.com)\ +*Hearst Communications magazines* sites like\ +[Bicycling](https://www.bicycling.com) - +[Cosmopolitan](https://www.cosmopolitan.com) - +[Country Living](https://www.countryliving.com) - +[Delish](https://www.delish.com) - +[Elle Decor](https://www.elledecor.com) - +[Elle USA](https://www.elle.com) - +[Esquire](https://www.esquire.com) - +[Good Housekeeping](https://www.goodhousekeeping.com) - +[Harper's Bazaar](https://www.harpersbazaar.com) - +[House Beautiful](https://www.housebeautiful.com) - +[Men's Health](https://www.menshealth.com) - +[Oprah Daily](https://www.oprahdaily.com) - +[Popular Mechanics](https://www.popularmechanics.com) - +[Prevention](https://www.prevention.com) - +[Road & Track](https://www.roadandtrack.com) - +[Runner's World](https://www.runnersworld.com) - +[Town & Country](https://www.townandcountrymag.com) - +[Women's Health](https://www.womenshealthmag.com)\ +*Outside magazines* sites like\ +[Backpacker](https://www.backpacker.com) - +[Beta](https://www.betamtb.com) - +[Better Nutrition](https://www.betternutrition.com) - +[Clean Eating](https://www.cleaneatingmag.com) - +[Climbing](https://www.climbing.com) - +[Outside](https://www.outsideonline.com) - +[Oxygen](https://www.oxygenmag.com) - +[SKI](https://www.skimag.com) - +[Trail Runner](https://www.trailrunnermag.com) - +[Triathlete](https://www.triathlete.com) - +[Vegetarian Times](https://www.vegetariantimes.com) - +[Women's Running](https://www.womensrunning.com) - +[Yoga Journal](https://www.yogajournal.com)\ +*Penske Media Corporation* sites like\ +[Billboard](https://www.billboard.com) - +[Rolling Stone](https://www.rollingstone.com) - +[Sourcing Journal](https://sourcingjournal.com) - +[Sportico](https://www.sportico.com) - +[Variety](https://variety.com) - +[WWD](https://wwd.com)\ +*The Epoch Times* sites like (opt-in to custom sites for br|cz|de|fr|jp|ro sites)\ +[Epoch.org.il](https://epoch.org.il) - +[The Epoch Times](https://www.theepochtimes.com) + +##### Local USA news +[Albuquerque Journal](https://www.abqjournal.com) - +[CNN](https://www.cnn.com) - +[Fox News](https://www.foxnews.com) - +[Honolulu Star-Advertiser](https://www.staradvertiser.com) - +[Las Vegas Review-Journal](https://www.reviewjournal.com) - +[Los Angeles Times](https://www.latimes.com) - +[Mountain View Voice](https://www.mv-voice.com) - +[New York Magazine](https://www.nymag.com) (+ [Curbed](https://www.curbed.com), [Grub Street](https://www.grubstreet.com), [The Cut](https://www.thecut.com) & [Vulture](https://www.vulture.com)) - +[Newsday](https://www.newsday.com) - +[Palo Alto Online](https://www.paloaltoonline.com) - +[Pittsburgh Post Gazette](https://www.post-gazette.com) - +[Star Tribune](https://www.startribune.com) - +[Tampa Bay Times](https://www.tampabay.com) - +[The Baltimore Banner](https://www.thebaltimorebanner.com) - +[The Boston Globe](https://www.bostonglobe.com) - +[The Columbian](https://www.columbian.com) - +[The Dallas Morning News](https://www.dallasnews.com) - +[The Hill](https://thehill.com) - +[The New York Sun](https://www.nysun.com) - +[The Salt Lake Tribune](https://www.sltrib.com) - +[The San Francisco Standard](https://www.sfstandard.com) - +[The Seattle Times](https://www.seattletimes.com) - +[The Philadelphia Inquirer](https://www.inquirer.com) + +[USA Today](https://www.usatoday.com)\ +Grouped in options:\ +*Advance Local* sites like\ +[AL/Alabama](https://www.al.com) - +[MLive/Michigan](https://www.mlive.com) - +[NJ/New Jersey](https://www.nj.com) - +[Staten Island Advance](https://www.silive.com) - +[The Express-Times](https://www.lehighvalleylive.com) - +[The Oregonian](https://www.oregonlive.com) - +[The Patriot-News](https://www.pennlive.com) - +[The Plain Dealer](https://www.cleveland.com) - +[The Post-Standard](https://www.syracuse.com) - +[The Republican](https://www.masslive.com)\ +*[CNHI Group](https://www.cnhi.com/newspapers)* sites (opt-in to custom sites)\ +*[Forum Communications](https://www.forumcomm.com/brands)* sites (opt-in to custom sites)\ +*Gannett Group (local USA Today)* sites like (opt-in to custom sites for unlisted)\ +[Austin American-Statesman](https://www.statesman.com) - +[Democrat and Chronicle](https://www.democratandchronicle.com) - +[Detroit Free Press](https://www.freep.com) - +[Knoxville News Sentinel](https://www.knoxnews.com) - +[Memphis Commercial Appeal](https://www.commercialappeal.com) - +[Milwaukee Journal Sentinel](https://www.jsonline.com) - +[The Arizona Republic](https://www.azcentral.com) - +[The Cincinnati Enquirer](https://www.cincinnati.com) - +[The Columbus Dispatch](https://www.dispatch.com) - +[The Courier-Journal](https://www.courier-journal.com) - +[The Des Moines Register](https://www.desmoinesregister.com) - +[The Detroit News](https://www.detroitnews.com) - +[The Florida Times-Union](https://www.jacksonville.com) - +[The Indianapolis Star](https://www.indystar.com) - +[The News-Press](https://www.news-press.com) - +[The Oklahoman](https://www.oklahoman.com) - +[The Record (North Jersey)](https://www.northjersey.com) - +[The Tennessean](https://www.tennessean.com)\ +*Hearst Communications (newspapers)* sites like (opt-in to custom sites for unlisted)\ +[Albany Times Union](https://www.timesunion.com) - +[Connecticut Post](https://www.ctpost.com) - +[Houston Chronicle](https://www.houstonchronicle.com) - +[New Haven Register](https://www.nhregister.com) - +[San Antonio Express-News](https://www.expressnews.com) - +[San Francisco Chronicle](https://www.sfchronicle.com)\ +*Lee Enterprises Group* sites like (opt-in to custom sites for unlisted)\ +[Arizona Daily Star](https://tucson.com) - +[Lincoln Journal Star](https://journalstar.com) - +[Omaha World-Herald](https://omaha.com) - +[Richmond Times-Dispatch](https://richmond.com) - +[St. Louis Post-Dispatch](https://www.stltoday.com) - +[The Buffalo News](https://buffalonews.com) - +[The Times of Northwest Indiana](https://www.nwitimes.com) - +[Tulsa World](https://tulsaworld.com) - +[Wisconsin State Journal](https://madison.com) - +[Winston-Salem Journal](https://www.journalnow.com)\ +*[Maine Trust](https://www.metln.org)* sites (opt-in to custom sites)\ +*McClatchy Group* sites like (opt-in to custom sites for unlisted)\ +[Belleville News-Democrat](https://www.bnd.com) - +[El Nuevo Herald](https://www.elnuevoherald.com) - +[Fort Worth Star-Telegram](https://www.star-telegram.com) - +[Lexington Herald-Leader](https://www.kentucky.com) - +[McClatchy DC](https://www.mcclatchydc.com) - +[Miami Herald](https://www.miamiherald.com) - +[The Charlotte Observer](https://www.charlotteobserver.com) - +[The Fresno Bee](https://www.fresnobee.com) - +[The Kansas City Star](https://www.kansascity.com) - +[The News & Observer](https://www.newsobserver.com) - +[The Sacramento Bee](https://www.sacbee.com) - +[The State](https://www.thestate.com) - +[The Wichita Eagle](https://www.kansas.com) - +[Tri-City Herald](https://www.tri-cityherald.com)\ +*MediaNews Group* sites like (opt-in to custom sites for unlisted/local sites)\ +[Boston Herald](https://www.bostonherald.com) - +[East Bay Times](https://www.eastbaytimes.com) - +[Orange County Register](https://www.ocregister.com) - +[San Diego Union Tribune](https://www.sandiegouniontribune.com) - +[St. Paul Pioneer Press](https://www.twincities.com) - +[The Denver Post](https://www.denverpost.com) - +[The Mercury News](https://www.mercurynews.com) - +[The Press-Enterprise](https://www.pressenterprise.com)\ +*[The Atlanta Journal-Constitution](https://www.ajc.com) + Cox First Media* (opt-in to custom sites)\ +*The (New Orleans) Advocate Group* sites like\ +[The Advocate](https://www.theadvocate.com) - +[The New Orleans Advocate/The Times-Picayune](https://www.nola.com) - +[The Shreveport-Bossier City Advocate](https://www.shreveportbossieradvocate.com)\ +*TownNews sites (Blox CMS)* (opt-in to custom sites)\ +*Tribune Publishing Company* sites like\ +[Baltimore Sun](https://www.baltimoresun.com) - +[Capital Gazette](https://www.capitalgazette.com) - +[Chicago Tribune](https://www.chicagotribune.com) - +[Daily Press](https://www.dailypress.com) - +[Hartford Courant](https://www.courant.com) - +[New York Daily News](https://www.nydailynews.com) - +[Orlando Sentinel](https://www.orlandosentinel.com) - +[SunSentinel](https://www.sun-sentinel.com) - +[The Morning Call](https://www.mcall.com) - +[The Virginian-Pilot](https://www.pilotonline.com) + +#### Canada +[iPolitics](https://www.ipolitics.ca) - +[Le Devoir](https://www.ledevoir.com) - +[The Globe and Mail](https://www.theglobeandmail.com) - +[The Hill Times](https://www.hilltimes.com) - +[Winnipeg Free Press](https://www.winnipegfreepress.com) + +Grouped in options:\ +*Groupe Capitales Médias* sites like (opt-in to custom sites for unlisted)\ +[Le Soleil](https://www.lesoleil.com)\ +*Groupe Québecor* sites like\ +[Le Journal de Montréal](https://www.journaldemontreal.com) - +[Le Journal de Québec](https://www.journaldequebec.com)\ +*Postmedia Network* sites like (opt-in to custom sites for unlisted)\ +[Calgary Herald](https://calgaryherald.com) - +[Financial Post](https://www.financialpost.com) - +[National Post](https://www.nationalpost.com) - +[The Province](https://theprovince.com) - +[Toronto Sun](https://torontosun.com) - +[Vancouver Sun](https://vancouversun.com)\ +*TorStar* sites like\ +[The Toronto Star](https://www.thestar.com) and regional sites +[Niagara Falls Review](https://www.niagarafallsreview.ca) - +[Peterborough Examiner](https://www.thepeterboroughexaminer.com) - +[St. Catharines Standard](https://www.stcatharinesstandard.ca) - +[The Hamilton Spectator](https://www.thespec.com) - +[Waterloo Region Record](https://www.therecord.com) - +[Welland Tribune](https://www.wellandtribune.ca)\ +*[Valnet Group](https://www.valnetinc.com/our-brands)* sites (opt-in to custom sites) + +#### Europe + +[Balkan Insight](https://balkaninsight.com) - +[Bloomberg Adria](https://www.bloombergadria.com) - +[EUobserver](https://euobserver.com) - +[Follow the Money (ftm.eu)](https://www.ftm.eu) + +##### United Kingdom/Ireland +[Autocar](https://www.autocar.co.uk) - +[Autosport](https://www.autosport.com)* - +[Belfast Telegraph](https://www.belfasttelegraph.co.uk) - +[Business Post](https://www.businesspost.ie) - +[Decanter](https://www.decanter.com) - +[Evening Standard](https://www.standard.co.uk) - +[Financial News](https://www.fnlondon.com) - +[Financial Times](https://www.ft.com) - +[GB News](https://www.gbnews.com) - +[Granta Magazine](https://granta.com) - +[iNews](https://inews.co.uk) - +[Investors' Chronicle](https://www.investorschronicle.co.uk) - +[Irish Independent](https://www.independent.ie) - +[Literary Review](https://literaryreview.co.uk) - +[London Review of Books](https://www.lrb.co.uk) - +[Monocle](https://monocle.com) - +[Motor Sport Magazine](https://www.motorsportmagazine.com) - +[Prospect Magazine](https://www.prospectmagazine.co.uk) - +[Stylist](https://www.stylist.co.uk) - +[Tes Magazine](https://www.tes.com/magazine) - +[The Critic](https://thecritic.co.uk) - +[The Economist](https://www.economist.com) - +[The Irish Examiner](https://www.irishexaminer.com) - +[The Irish News](https://www.irishnews.com) - +[The Irish Times](https://www.irishtimes.com) - +[The Lawyer](https://www.thelawyer.com) - +[The New European](https://www.theneweuropean.co.uk) - +[The New Statesman](https://www.newstatesman.com) - +[The Spectator](https://www.spectator.co.uk) - +[The Telegraph](https://www.telegraph.co.uk) - +[The Times](https://www.thetimes.com) - +[The Times Literary Supplement](https://www.the-tls.co.uk) - +[UnHerd](https://unherd.com) + +Grouped in options:\ +*Daily Mail Group* sites like\ +[Daily Mail](https://www.dailymail.co.uk) - +[Mail on Sunday](https://www.mailonsunday.co.uk) - +[This is Money](https://www.thisismoney.co.uk)\ +*[DVV Media International](https://www.dvvmediainternational.com)* sites (opt-in to custom sites)\ +*[Haymarket Media Group](https://haymarket.com/brands)* sites (opt-in to custom sites)\ +*[Haymarket Medical Network](https://www.haymarketmedicalnetwork.com)* sites (opt-in to custom sites)\ +*National World Publishing* sites like (opt-in to custom sites for unlisted)\ +[The Scotsman](https://www.scotsman.com) - +[Yorkshire Post](https://www.yorkshirepost.co.uk)\ +*Oxford University Press* sites (opt-in to custom sites)*\ +*[Newsquest Media Group](https://www.newsquest.co.uk/news-brands)* sites (opt-in to custom sites)\ +*The Independent Group* sites like\ +[The Independent UK ](https://www.independent.co.uk) - +[The Independent USA ](https://www.the-independent.com)\ +*The Stage Media* sites like:\ +[The Bookseller](https://www.thebookseller.com) - +[The Stage](https://www.thestage.co.uk)\ +*The Sun Group* sites like\ +[The Scottish Sun](https://www.thescottishsun.co.uk) - +[The Sun UK](https://www.thesun.co.uk) + +*[William Reed Group](https://www.william-reed.com/what-we-do)* sites (opt-in to custom sites)\ + +##### Bulgaria +[Capital](https://www.capital.bg) - +[Dnevnik](https://www.dnevnik.bg) + +##### Czechia +[Deník](https://www.denik.cz) + +##### Denmark +[Berlingske](https://www.berlingske.dk) + +Grouped in options:\ +*[DK Medier](https://www.dkmedier.dk)* sites (opt-in to custom sites) + +##### Finland +[Suomen Sotilas](https://suomensotilas.fi) + +##### France/Wallonia +[60 Millions de consommateurs](https://www.60millions-mag.com) - +[Actu.fr](https://actu.fr) - +[Alternatives Economiques](https://www.alternatives-economiques.fr) - +[Atlantico](https://atlantico.fr) - +[Auto Hebdo](https://www.autohebdo.fr) - +[Auto Plus](https://www.autoplus.fr) - +[Capital](https://www.capital.fr) - +[Causeur](https://www.causeur.fr) - +[Challenges](https://www.challenges.fr) - +[Charlie Hebdo](https://charliehebdo.fr) - +[Connaissance des Arts](https://www.connaissancedesarts.com) - +[Cosmopolitan](https://www.cosmopolitan.fr) - +[Courrier international](https://www.courrierinternational.com) - +[Elle](https://www.elle.fr) - +[Esprit](https://esprit.presse.fr) - +[Jeune Afrique](https://www.jeuneafrique.com) - +[L'Écho](https://lecho.be) - +[L'Équipe](https://www.lequipe.fr) - +[L'Express](https://www.lexpress.fr) - +[L'Informé](https://www.linforme.com) - +[L'Oeil de la Photographie (fr/en)](https://loeildelaphotographie.com) - +[L'Opinion](https://www.lopinion.fr) - +[La Croix](https://www.la-croix.com) - +[La Nouvelle République du Centre-Ouest](https://www.lanouvellerepublique.fr) - +[Le Courrier des Stratèges](https://lecourrierdesstrateges.fr) - +[Le Figaro](https://www.lefigaro.fr) - +[Le Grand Continent](https://legrandcontinent.eu) - +[Le Journal du Dimanche](https://lejdd.fr) - +[Le Journal du Net](https://www.journaldunet.com) - +[Le Monde](https://www.lemonde.fr) - +[Le Nouvel Economiste](https://www.lenouveleconomiste.fr) - +[Le Parisien](https://www.leparisien.fr) - +[Le Point](https://www.lepoint.fr) - +[Le Revenu](https://www.lerevenu.com) - +[Le Télégramme](https://www.letelegramme.fr) - +[Le Un](https://le1hebdo.fr) - +[Les Échos](https://www.lesechos.fr) - +[Les Inrockuptibles](https://www.lesinrocks.com) - +[Libération](https://www.liberation.fr) - +[Marianne](https://www.marianne.net) - +[Paris Match](https://www.parismatch.com) - +[Philonomist (fr/en)](https://www.philonomist.com) - +[Philosophie Magazine](https://www.philomag.com) - +[Politis](https://www.politis.fr) - +[Pour l'Éco](https://www.pourleco.com) - +[Pour la Science](https://www.pourlascience.fr) - +[Public](https://www.public.fr) - +[Réforme](https://www.reforme.net) - +[Revue Conflits](https://www.revueconflits.com) - +[Science & Vie](https://www.science-et-vie.com) - +[Sciences et Avenir](https://www.sciencesetavenir.fr) - +[Sciences Humaines](https://www.scienceshumaines.com) - +[Télérama](https://www.telerama.fr) - +[Valeurs Actuelles](https://www.valeursactuelles.com) - +[XXI](https://www.revue21.fr) + +Grouped in options:\ +*Groupe Centre France* sites like (opt-in to custom sites for unlisted)\ +[La Montagne](https://www.lamontagne.fr)\ +*Groupe Infopro Digital* sites like (opt-in to custom sites for unlisted)\ +[L'Usine Nouvelle](https://www.usinenouvelle.com)\ +*Groupe IPM* sites like\ +[DH Les Sports+](https://www.dhnet.be) - +[L'Avenir](https://www.lavenir.net) - +[La Libre](https://www.lalibre.be)\ +*Groupe La Dépêche* sites like\ +[Centre Presse](https://www.centrepresseaveyron.fr) - +[Journal de Millau](https://www.journaldemillau.fr) - +[L'Indépendant](https://www.lindependant.fr) - +[La Dépêche du Midi](https://www.ladepeche.fr) - +[La Nouvelle République des Pyrénées](https://www.nrpyrenees.fr) - +[Le Petit Bleu d'Agen](https://www.petitbleu.fr) - +[Midi Libre](https://www.midilibre.fr) - +[Midi Olympique](https://www.rugbyrama.fr/midi-olympique)\ +*Groupe Nice-Matin* sites like\ +[Monaco-Matin](https://www.monacomatin.mc) - +[Nice-Matin](https://www.nicematin.com) - +[Var-Matin](https://www.varmatin.com)\ +*Groupe Profession Santé* sites like\ +[Le Quotidien du Médecin](https://www.lequotidiendumedecin.fr) - +[Le Quotidien du Pharmacien](https://www.lequotidiendupharmacien.fr)\ +*Groupe Sud Ouest* sites like\ +[Charente libre](https://www.charentelibre.fr) - +[La République des Pyrénées](https://www.larepubliquedespyrenees.fr) - +[Sud Ouest](https://www.sudouest.fr)\ +*[Groupe SynerJ Media](https://synerj.media)* sites (opt-in to custom sites)\ +*Roularta Media Group* sites like\ +[Femmes d'Aujourd'hui](https://www.femmesdaujourdhui.be) - +[Flair.be](https://www.flair.be/fr) - +[Le Vif](https://www.levif.be)\ +*TechTarget Group* sites like\ +[LeMagIT](https://www.lemagit.fr) + +##### Germany/Austria +[Aachener Zeitung](https://www.aachener-zeitung.de) - +[Ärzte Zeitung](https://www.aerztezeitung.de) - +[Automobilwoche](https://www.automobilwoche.de) - +[Berliner Zeitung](https://www.berliner-zeitung.de) - +[Bild](https://www.bild.de) - +[Börsen-Zeitung](https://www.boersen-zeitung.de) - +[Cicero](https://www.cicero.de) - +[Der Freitag](https://www.freitag.de) - +[Der Spiegel](https://www.spiegel.de) - +[Der Tagesspiegel](https://www.tagesspiegel.de) - +[Die Rheinpfalz](https://www.rheinpfalz.de) - +[Die Welt](https://www.welt.de) - +[Die Zeit](https://www.zeit.de) - +[Frankfurter Allgemeine Zeitung](https://www.faz.net) - +[Hamburger Morgenpost](https://www.mopo.de) - +[Handelsblatt](https://www.handelsblatt.com) - +[Heise online](https://www.heise.de) - +[Jacobin Magazin](https://jacobin.de) - +[Kölner Stadt-Anzeiger](https://www.ksta.de) - +[Kölnische Rundschau](https://www.rundschau-online.de) - +[Krautreporter](https://krautreporter.de) - +[Kurier.at](https://kurier.at) - +[Manager Magazin](https://www.manager-magazin.de) - +[Neue Westfälische](https://www.nw.de) - +[Nordwest Zeitung](https://www.nwzonline.de) - +[Philosophie Magazin](https://www.philomag.de) - +[Piqd](https://www.piqd.de) - +[Profil.at](https://www.profil.at) - +[Spektrum](https://www.spektrum.de) - +[Springer Medizin](https://www.springermedizin.de) - +[Süddeutsche Zeitung](https://www.sueddeutsche.de) - +[Südkurier](https://www.suedkurier.de) - +[T3n](https://t3n.de) - +[Tiroler Tageszeitung](https://www.tt.com) - +[Vorarlberg Nachrichten](https://www.vn.at) - +[Vorarlberg Online](https://www.vol.at) - +[Weltkunst](https://www.weltkunst.de) - +[Weser-Kurier](https://www.weser-kurier.de) + +Grouped in options:\ +*[Deutscher Fachverlag Mediengruppe](https://www.dfv.de)* (opt-in to custom sites)\ +*Funke Mediengruppe* sites like\ +[Berliner Morgenpost](https://www.morgenpost.de) - +[Braunschweiger Zeitung](https://www.braunschweiger-zeitung.de) - +[Hamburger Abendblatt](https://www.abendblatt.de) - +[Iserlohner Kreisanzeiger und Zeitung](https://www.ikz-online.de) - +[Neue Ruhr Zeitung](https://www.nrz.de) - +[Ostthüringer Zeitung](https://www.otz.de) - +[Thüringer Allgemeine](https://www.thueringer-allgemeine.de) - +[Thüringische Landeszeitung](https://www.tlz.de) - +[Westdeutsche Allgemeine Zeitung](https://www.waz.de) - +[Westfalenpost](https://www.wp.de) - +[Westfälische Rundschau](https://www.wr.de)\ +*[Haas Mediengruppe](https://www.haas-mediengruppe.de/marken)* sites like (opt-in to custom sites for unlisted)\ +[Mannheimer Morgen](https://www.mannheimer-morgen.de)\ +*Ippen.media* sites like (opt-in to custom sites for unlisted)\ +[Frankfurter Rundschau](https://www.fr.de) - +[Münchner Merkur](https://www.merkur.de) - +[Oberbayerisches Volksblatt](https://www.ovb-online.de)\ +*Landwirtschaftsverlag* sites like\ +[Profi.de](https://www.profi.de) - +[Top Agrar](https://www.topagrar.com) - +[Wochenblatt für Landwirtschaft & Landleben](https://www.wochenblatt.com)\ +*Madsack Mediengruppe* sites like (opt-in to custom sites for unlisted)\ +[Hannoversche Allgemeine Zeitung](https://www.haz.de) - +[Kieler Nachrichten](https://www.kn-online.de) - +[Leipziger Volkszeitung](https://www.lvz.de) - +[Lübecker Nachrichten](https://www.ln-online.de) - +[Märkische Allgemeine](https://www.maz-online.de) - +[Neue Presse (Hannover)](https://www.neuepresse.de) - +[Ostsee-Zeitung](https://www.ostsee-zeitung.de) - +[RedaktionsNetzwerk Deutschland](https://www.rnd.de) - +[Sächsische Zeitung](https://www.saechsische.de)\ +*[Media Group Westfalen](https://mgw.de/portfolio/tageszeitungen)* sites like (opt-in to custom sites for unlisted)\ +[Ruhr Nachrichten](https://www.ruhrnachrichten.de)\ +*[Motor Presse Stuttgart](https://www.motorpresse.de)* sites like\ +[Aerokurier](https://www.aerokurier.de) - +[Auto Motor und Sport](https://www.auto-motor-und-sport.de) - +[Flug Revue](https://www.flugrevue.de) - +[Motorrad](https://www.motorradonline.de) - +[Women's Health](https://www.womenshealth.de)\ +*NOZ/MHN Mediengruppe* sites like\ +[Neue Osnabrücker Zeitung](https://www.noz.de) - +[Schleswig-Holsteinischer Zeitungsverlag](https://www.shz.de)\ +Rheinische Post Mediengruppe like\ +[General-Anzeiger Bonn](https://ga.de) - +[Rheinische Post](https://rp-online.de) - +[Saarbrücker Zeitung](https://www.saarbruecker-zeitung.de) - +[Trierischer Volksfreund](https://www.volksfreund.de)\ +*Verlagsgruppe Rhein Main* sites like (opt-in to custom sites for unlisted)\ +[Allgemeine Zeitung (Mainz)](https://www.allgemeine-zeitung.de) - +[Darmstädter Echo](https://www.echo-online.de) - +[Wiesbadener Kurier](https://www.wiesbadener-kurier.de) + +##### Greece +[Kathimerini](https://www.kathimerini.gr) + +##### Italy +[Corriere della Sera](https://www.corriere.it) - +[Corriere dello Sport](https://www.corrieredellosport.it) - +[Domani](https://editorialedomani.it) - +[Eastwest](https://eastwest.eu) - +[Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) - +[Il Foglio](https://www.ilfoglio.it) - +[Il Manifesto](https://ilmanifesto.it) - +[Il Sole 24 Ore (24+)](https://24plus.ilsole24ore.com) - +[Internazionale](https://www.internazionale.it) - +[Italia Oggi](https://www.italiaoggi.it) - +[La Gazzetta dello Sport](https://www.gazzetta.it) - +[Milano Finanza](https://www.milanofinanza.it) - +[Sky Sport](https://sport.sky.it) - +[Sky TG24](https://tg24.sky.it) - +[Tuttosport](https://www.tuttosport.com) + +Grouped in options:\ +*Gruppo GEDI.it* sites like\ +[Huffingtonpost.it](https://www.huffingtonpost.it) - +[Italian.tech](https://www.italian.tech) - +[La Repubblica](https://www.repubblica.it) - +[La Stampa](https://www.lastampa.it) - +[Le Scienze](https://www.lescienze.it) - +[Moda & Beauty](https://www.moda.it) + +[Il Messaggero](https://www.ilmessaggero.it) and regional sites like +[Corriere Adriatico](https://www.corriereadriatico.it) - +[Il Gazzettino](https://www.ilgazzettino.it) - +[Il Mattino](https://www.ilmattino.it) - +[Quotidiano di Puglia](https://www.quotidianodipuglia.it) + +[Quotidiano Nazionale](https://www.quotidiano.net) and regional sites like +[Il Giorno](https://www.ilgiorno.it) - +[Il Resto del Carlino](https://www.ilrestodelcarlino.it) - +[Il Telegrafo Livorno](https://www.iltelegrafolivorno.it) - +[La Nazione](https://www.lanazione.it) + +*[Gruppo SAE.it](https://www.grupposae.it/i-quotidiani)** sites like (opt-in to custom sites for unlisted)\ +[Il Tirreno](https://www.iltirreno.it)* - +[La Nuova Sardegna](https://www.lanuovasardegna.it)* + +##### Netherlands/Flanders +[Business AM](https://businessam.be) - +[Business Insider Nederland](https://www.businessinsider.nl) - +[De Tijd](https://www.tijd.be) - +[Doorbraak](https://doorbraak.be) - +[Follow the Money](https://www.ftm.nl) - +[Groene Amsterdammer](https://www.groene.nl) - +[Het Laatste Nieuws](https://www.hln.be) - +[Linda](https://www.linda.nl) - +[NRC Handelsblad](https://www.nrc.nl) - +[Telegraaf](https://www.telegraaf.nl) - +[Vrij Nederland](https://www.vn.nl) + +Grouped in options:\ +*Algemeen Dagblad (+ regional/ADR)* sites like\ +[Algemeen Dagblad](https://www.ad.nl) - +[BN DeStem](https://www.bndestem.nl) - +[Brabants Dagblad](https://www.bd.nl) - +[Eindhovens Dagblad](https://www.ed.nl) - +[Gelderlander](https://www.gelderlander.nl) - +[PZC](https://www.pzc.nl) - +[Stentor](https://www.destentor.nl) - +[Tubantia](https://tubantia.nl)\ +*DPG Media (not ADR)* sites like\ +[De Morgen](https://www.demorgen.be) - +[De Volkskrant](https://www.volkskrant.nl) - +[Flair.nl](https://www.flair.nl) - +[Humo](https://www.humo.be) - +[Libelle.nl](https://www.libelle.nl) - +[Margriet](https://www.margriet.nl) - +[Parool](https://www.parool.nl) - +[Trouw](https://www.trouw.nl)\ +*Mediahuis België* sites like\ +[De Standaard](https://www.standaard.be) - +[Gazet van Antwerpen](https://www.gva.be) - +[Het Belang van Limburg](https://www.hbvl.be) - +[Het Nieuwsblad](https://www.nieuwsblad.be)\ +*Mediahuis Noord* sites like (opt-in to custom sites for unlisted)\ +[Dagblad van het Noorden](https://www.dvhn.nl) - +[Leeuwarder Courant](https://www.lc.nl)\ +*[ProMedia Group](https://www.promedia.nl/publicaties)* sites (opt-in to custom sites)\ +*Roularta Media Group* sites like\ +[Artsenkrant](https://www.artsenkrant.com) - +[Beleggers Belangen](https://www.beleggersbelangen.nl) - +[Flair.be](https://www.flair.be/nl) - +[Knack](https://www.knack.be) - +[Krant van West-Vlaanderen](https://kw.be) - +[Libelle.be](https://www.libelle.be) + +##### Norway +[Bergens Tidende](https://www.bt.no) - +[Dagsavisen](https://www.dagsavisen.no)\ +Grouped in options:\ +*DN Media Group* sites like\ +[DN](https://www.dn.no) - +[Europower](https://www.europower.no) - +[Fiskeribladet](https://www.fiskeribladet.no) - +[Hydrogen Insight](https://www.hydrogeninsight.com) - +[Intrafish](https://www.intrafish.com) - +[Intrafish.no](https://www.intrafish.no) - +[Recharge](https://www.rechargenews.com) - +[TradeWinds](https://www.tradewindsnews.com) - +[Upstream](https://www.upstreamonline.com) + +##### Poland +[Polityka](https://www.polityka.pl) - +[Puls Biznesu](https://www.pb.pl) + +Grouped in options:\ +*GremiMedia.pl Group* sites like\ +[Parkiet](https://www.parkiet.com) - +[Rzeczpospolita](https://www.rp.pl)\ +*Ringier Axel Springer Polska* sites like\ +[Auto Swiat](https://www.auto-swiat.pl) - +[Business Insider](https://businessinsider.com.pl) - +[Forbes](https://www.forbes.pl) - +[Komputer Swiat](https://www.komputerswiat.pl) - +[Newsweek](https://www.newsweek.pl) - +[Onet](https://www.onet.pl)\ +*Wyborcza Group* sites like\ +[Magazyn-kuchnia.pl](https://magazyn-kuchnia.pl) - +[Wyborcza.biz](https://wyborcza.biz) - +[Wyborcza.pl](https://wyborcza.pl) - +[Wysokieobcasy.pl](https://www.wysokieobcasy.pl) + +##### Portugal +[Diário de Notícias](https://www.dn.pt) - +[Expresso](https://expresso.pt) - +[Observador](https://observador.pt) - +[Record](https://www.record.pt) - +[Sábado](https://www.sabado.pt) + +##### Russia +[Wonderzine](https://www.wonderzine.com) + +##### Spain +[Diario de Navarra](https://www.diariodenavarra.es) - +[El Confidencial](https://www.elconfidencial.com) - +[El Diario.es](https://www.eldiario.es) - +[El Español](https://www.elespanol.com) - +[El País](https://elpais.com) - +[La Vanguardia](https://www.lavanguardia.com) - +[Mundo Deportivo](https://www.mundodeportivo.com) - +[Política Exterior](https://www.politicaexterior.com) - +[Público](https://www.publico.es) + +Grouped in options:\ +*ARA* sites like\ +[Ara.cat](https://www.ara.cat) - +[Ara Balears](https://www.arabalears.cat)\ +*Grupo Prensa Ibérica* sites like (opt-in to custom sites for unlisted)\ +[Diario de Mallorca](https://www.diariodemallorca.es) - +[El Día](https://www.eldia.es) - +[El Periódico de Catalunya](https://www.elperiodico.com) - +[El Periódico de España](https://www.epe.es) - +[Faro de Vigo](https://www.farodevigo.es) - +[Información](https://www.informacion.es) - +[La Nueva España](https://www.lne.es) - +[La Provincia](https://www.laprovincia.es) - +[Levante-EMV](https://www.levante-emv.com) - +[Mallorca Zeitung](https://www.mallorcazeitung.es) - +[Superdeporte](https://www.superdeporte.es)\ +*Grupo Unidad Editorial* sites like\ +[El Mundo](https://www.elmundo.es) - +[Expansión](https://www.expansion.com) - +[Marca](https://www.marca.com)\ +*Grupo Vocento* sites like\ +[ABC](https://www.abc.es) - +[Canarias7](https://www.canarias7.es) - +[El Comercio](https://www.elcomercio.es) - +[El Correo](https://www.elcorreo.com) - +[El Diario Montañés](https://www.eldiariomontanes.es) - +[El Diario Vasco](https://www.diariovasco.com) - +[El Norte de Castilla](https://www.elnortedecastilla.es) - +[Hoy](https://www.hoy.es) - +[Ideal](https://www.ideal.es) - +[La Rioja](https://www.larioja.com) - +[La Verdad](https://www.laverdad.es) - +[La Voz de Cádiz](https://www.lavozdigital.es) - +[Las Provincias](https://www.lasprovincias.es) - +[Sur](https://www.diariosur.es) + +*[Sport Life Ibérica](https://www.sportlifeiberica.es)* sites (opt-in to custom sites) + +##### Sweden +[Dagens ETC](https://www.etc.se) - +[NyTeknik](https://www.nyteknik.se) + +Grouped in options:\ +*Bonnier News Group* sites like (opt-in to custom sites for unlisted)\ +[Dagens Medicin](https://www.dagensmedicin.se) - +[Dagens Nyheter](https://www.dn.se) - +[Helsingborgs Dagblad](https://www.hd.se) - +[Sydsvenskan](https://www.sydsvenskan.se)\ +*[NWT Media](https://www.nwtmedia.se)* sites (opt-in to custom sites) + +##### Switzerland +[Neue Zürcher Zeitung](https://www.nzz.ch) - +[Schweizer Monat](https://schweizermonat.ch) - +[The Market](https://themarket.ch) + +Grouped in options:\ +*[CH Media](https://chmedia.ch/marken)* sites like (opt-in to custom sites for unlisted)\ +[Aargauer Zeitung](https://www.aargauerzeitung.ch) - +[Luzerner Zeitung](https://www.luzernerzeitung.ch) - +[St. Galler Tagblatt](https://www.tagblatt.ch)\ +*Ringier Gruppe* sites like\ +[Blick](https://www.blick.ch) - +[Beobachter](https://www.beobachter.ch) - +[Handelszeitung](https://www.handelszeitung.ch)\ +*[TAmedia](https://www.tamedia.ch/de/medien)* sites like (opt-in to custom sites for unlisted)\ +[24 heures](https://www.24heures.ch) - +[Basler Zeitung](https://www.bazonline.ch) - +[Berner Zeitung](https://www.bernerzeitung.ch) - +[Der Bund](https://www.derbund.ch) - +[Tages-Anzeiger](https://www.tagesanzeiger.ch) - +[Tribune de Genève](https://www.tdg.ch) + +Grouped in options:\ +*[Groupe ESH Médias](https://www.eshmedias.ch)* sites like\ +[ArcInfo](https://www.arcinfo.ch) - +[La Côte](https://www.lacote.ch) - +[Le Nouvelliste](https://www.lenouvelliste.ch) + +##### Ukraine +[Forbes](https://forbes.ua) - +[New Voice](https://nv.ua) + +#### Africa + +###### Kenya + +[The Standard](https://www.standardmedia.co.ke) + +Grouped in options:\ +*[Nation Media Group](https://www.nationmedia.com/brands)* sites like (opt-in to custom sites for unlisted)\ +[Business Daily](https://www.businessdailyafrica.com) - +[Daily Nation](https://nation.africa) + +##### Australia/New Zealand + +[BusinessDesk](https://businessdesk.co.nz) - +[Forbes Australia](https://www.forbes.com.au) - +[Inkl](https://www.inkl.com) - +[MacroBusiness](https://www.macrobusiness.com.au) - +[New Zealand Herald](https://www.nzherald.co.nz) - +[The Saturday Paper](https://www.thesaturdaypaper.com.au) - +[The Spectator Australia](https://www.spectator.com.au) - +[The West Australian (+ regional/opt-in to custom sites)](https://thewest.com.au) + +Grouped in options:\ +*Australia News Corp* sites like\ +[Cairns Post](https://www.cairnspost.com.au) - +[Code Sports](https://www.codesports.com.au) - +[Geelong Advertiser](https://www.geelongadvertiser.com.au) - +[Gold Coast Bulletin](https://www.goldcoastbulletin.com.au) - +[Herald Sun](https://www.heraldsun.com.au) - +[The Advertiser/AdelaideNow](https://www.adelaidenow.com.au) - +[The Australian](https://www.theaustralian.com.au) - +[The Chronicle](https://www.thechronicle.com.au) - +[The Courier-Mail](https://www.couriermail.com.au) - +[The Daily Telegraph](https://www.dailytelegraph.com.au) - +[The Mercury Tasmania](https://www.themercury.com.au) - +[The Weekly Times](https://www.weeklytimesnow.com.au) - +[Townsville Bulletin](https://www.townsvillebulletin.com.au)\ +*Australia Nine Entertainment* sites like\ +[Brisbane Times](https://www.brisbanetimes.com.au) - +[The Age](https://www.theage.com.au) - +[The Australian Financial Review](https://www.afr.com) - +[The Sydney Morning Herald](https://www.smh.com.au) - +[WAtoday](https://www.watoday.com.au)\ +*Australian Community Media* sites like (opt-in to custom sites for unlisted)\ +[Bendigo Advertiser](https://www.bendigoadvertiser.com.au) - +[Central Western Daily](https://www.centralwesterndaily.com.au) - +[Daily Liberal](https://www.dailyliberal.com.au) - +[Illawarra Mercury](https://www.illawarramercury.com.au) - +[Newcastle Herald](https://www.newcastleherald.com.au) - +[The Advocate](https://www.theadvocate.com.au) - +[The Border Mail](https://www.bordermail.com.au) - +[The Canberra Times](https://www.canberratimes.com.au) - +[The Courier](https://www.thecourier.com.au) - +[The Daily Advertiser](https://www.dailyadvertiser.com.au) - +[The Examiner](https://www.examiner.com.au) - +[The Northern Daily Leader](https://www.northerndailyleader.com.au) - +[The Standard](https://www.standard.net.au) - +[Western Advocate](https://www.westernadvocate.com.au)\ +*InvestSmart* sites like\ +[InvestSmart](https://www.investsmart.com.au) - +[Intelligent Investor](https://www.intelligentinvestor.com.au)\ +*[McPherson Media Group](https://www.mmg.com.au/portfolio)* sites (opt-in to custom sites)\ +*[Private Media](https://www.privatemedia.com.au)* sites like\ +[Crikey](https://www.crikey.com.au) - +[Smart Company](https://www.smartcompany.com.au) - +[The Mandarin](https://www.themandarin.com.au) + +##### China, Hong Kong & Taiwan +[CommonWealth Magazine Taiwan](https://www.cw.com.tw)* - +[DigiTimes Asia](https://www.digitimes.com) - +[South China Morning Post](https://www.scmp.com) - +[Southern Weekly](https://www.infzm.com) - +[The News Lens](https://www.thenewslens.com) + +##### India +[Bar and Bench](https://www.barandbench.com) - +[Bhaskar](https://www.bhaskar.com) - +[Business Standard](https://www.business-standard.com) - +[Hindustan Times](https://www.hindustantimes.com) - +[Inc42](https://inc42.com) - +[India Today](https://www.indiatoday.in) - +[Live Law](https://www.livelaw.in) - +[LiveMint](https://www.livemint.com) - +[Malayala Manorama](https://www.manoramaonline.com) - +[Mid-Day](https://www.mid-day.com) - +[Newslaundry](https://www.newslaundry.com) - +[NDTV Profit](https://www.ndtvprofit.com) - +[Outlook](https://www.outlookindia.com) - +[Outlook Business](https://www.outlookbusiness.com) - +[Swarajyamag](https://swarajyamag.com) - +[The Economic Times (ET Prime)](https://economictimes.indiatimes.com) - +[The Financial Express](https://www.financialexpress.com) - +[The Hindu](https://www.thehindu.com) - +[The Hindu BusinessLine](https://www.thehindubusinessline.com) - +[The Indian Express](https://indianexpress.com) - +[The Leaflet](https://theleaflet.in) - +[The News Minute](https://www.thenewsminute.com) - +[The Quint](https://www.thequint.com) - +[Times of India](https://timesofindia.indiatimes.com) - +[Vikatan](https://www.vikatan.com) + +##### Indonesia +[Kompas](https://www.kompas.id) - +[Tempo](https://www.tempo.co) + +##### Israel +[Globes](https://www.globes.co.il) - +[The Jerusalem Post](https://www.jpost.com) - +[Ynet](https://www.ynet.co.il) + +Grouped in options:\ +*Haaretz Group* sites like\ +[Haaretz.co.il](https://www.haaretz.co.il) - +[Haaretz.com](https://www.haaretz.com) - +[The Marker](https://www.themarker.com) + +##### Japan +[Business Insider Japan](https://www.businessinsider.jp) - +[Mainichi Shimbun](https://mainichi.jp) - +[Nikkei Asian Review](https://asia.nikkei.com) - +[The Japan Times](https://www.japantimes.co.jp) + +##### Singapore +[Initium Media](https://theinitium.com) - +[Tech in Asia](https://www.techinasia.com)\ +Grouped in options:\ +*SPH Media* sites like\ +[The Business Times](https://www.businesstimes.com.sg) - +[The Straits Times](https://www.straitstimes.com) + +#### Latin America + +##### Argentina +[Ámbito](https://www.ambito.com) - +[El Cronista](https://www.cronista.com) - +[El Tribuno](https://www.eltribuno.com) - +[La Gaceta](https://www.lagaceta.com.ar) - +[La Nación](https://www.lanacion.com.ar)* + +Grouped in options:\ +*Grupo Clarín* sites like\ +[Clarín](https://www.clarin.com) - +[La Voz del Interior](https://www.lavoz.com.ar) - +[Los Andes](https://www.losandes.com.ar) - +[Olé](https://www.ole.com.ar) + +##### Bolivia +[El Deber](https://eldeber.com.bo) + +##### Brazil +[ABC Mais](https://www.abcmais.com) - +[CartaCapital](https://www.cartacapital.com.br) - +[Correio do Povo](https://www.correiodopovo.com.br) - +[Crusoé](https://crusoe.com.br) - +[Estado de Minas](https://www.em.com.br) - +[Exame](https://exame.com) - +[GaúchaZH](https://gauchazh.clicrbs.com.br) - +[Gazeta do Povo](https://www.gazetadopovo.com.br) - +[Grupo Abril](https://grupoabril.com.br) - +[Le Monde Diplomatique Brasil](https://diplomatique.org.br) - +[NSC Total](https://www.nsctotal.com.br) - +[O Estado de S. Paulo](https://estadao.com.br) - +[O Globo](https://oglobo.globo.com) - +[Revista Oeste](https://revistaoeste.com) - +[Valor Econômico](https://valor.globo.com) + +Grouped in options:\ +*UOL* sites like\ +[Folha de S. Paulo](https://www.folha.uol.com.br) - +[UOL](https://www.uol.com.br) + +##### Chile +[Diario Financiero](https://www.df.cl) - +[El Mercurio (+ regional/opt-in to custom sites)](https://digital.elmercurio.com) - +[La Tercera](https://www.latercera.com) +##### Colombia +[Cambio Colombia](https://cambiocolombia.com) - +[El Espectador](https://www.elespectador.com) - +[El Tiempo](https://www.eltiempo.com) +##### Ecuador +[El Universo](https://www.eluniverso.com) +##### Mexico +[El Universal](https://www.eluniversal.com.mx) - +[Mexico News Daily](https://mexiconewsdaily.com) +##### Peru +*Grupo El Comercio* sites like\ +[Diario Correo](https://diariocorreo.pe) - +[El Comercio](https://elcomercio.pe) - +[Gestión](https://gestion.pe) +##### Uruguay +[El Observador](https://www.elobservador.com.uy) - +[El País](https://www.elpais.com.uy) - +[La Diaria](https://ladiaria.com.uy) + +_* free articles only._ + +[Go to top](#bypass-paywalls-clean-for-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 site requests +You can [submit a request for a new website](https://github.com/bpc-clone/bpc_firefox_support/issues) +Please use the issue template, read the following instructions and share your results for a quicker process. +Remember to check the previous requests before asking for a new website. +1. Open incognito window. +2. Clear cookies for the site (by this 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. + +### 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 (header X-Forwarded-For) +* disable JavaScript for (sub)domain(s), external domains (when host permission) and/or inline scripts +* block regular expression (to block specific script and/or xhr) +* block_host_perm_add: add additinal host permission(s) for blocked content +* unhide text amp-page +* redirect to amp-page when paywall(selector) +* load text from json when paywall|article(selector) +* load text from archive.is when paywall|article(selector) +* add external link to archive-site when paywall|article(selector) +* remove/unhide elements in dom (optional for dev; check examples) + +[Download example list of custom sites](https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=sites_custom.json) + +### Add excluded site +Add excluded sites/domains (for your subscriptions).\ +You can also exclude a specific domain which is grouped in options. + +### Changelog-releases +* Visit the changelog page: [local](changelog.txt) or [online](https://gitflic.ru/project/magnolia1234/bypass-paywalls-firefox-clean/blob/raw?file=changelog.txt) +* Download the latest release as xpi-file from [GitFlic](https://gitflic.ru/project/magnolia1234/bpc_uploads) + +### License +* Bypass Paywalls Clean is [MIT-licensed](LICENSE.txt). + +### Disclaimer +* This software is provided for educational purposes only and is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. + +[Go to top](#bypass-paywalls-clean-for-firefox) diff --git a/background.js b/background.js new file mode 100644 index 0000000..93dcbac --- /dev/null +++ b/background.js @@ -0,0 +1,2222 @@ +'use strict'; +var ext_api = (typeof browser === 'object') ? browser : chrome; +var url_loc = (typeof browser === 'object') ? 'firefox' : 'chrome'; +var manifestData = ext_api.runtime.getManifest(); +var ext_name = manifestData.name; +var ext_version = manifestData.version; +var ext_manifest_version = manifestData.manifest_version; +var navigator_ua = navigator.userAgent; +var navigator_ua_mobile = navigator_ua.toLowerCase().includes('mobile'); + +if (ext_manifest_version === 3) + self.importScripts('sites.js'); + +if (typeof ext_api.action !== 'object') { + ext_api.action = ext_api.browserAction; +} + +var dompurify_sites = []; +var optin_setcookie = false; +var optin_update = true; +var blocked_referer = false; +var domain; + +// defaultSites are loaded from sites.js at installation extension + +var restrictions = { + 'autohebdo.fr': /\/www\.autohebdo\.fr\//, + 'bloomberg.com': /^((?!\.bloomberg\.com\/news\/terminal\/).)*$/, + 'bloombergadria.com': /^((?!\.bloombergadria\.com\/video\/).)*$/, + 'dailywire.com': /^((?!\.dailywire\.com\/(episode|show|videos|watch)).)*$/, + 'economictimes.com': /\.economictimes\.com($|\/($|(__assets|prime)(\/.+)?|.+\.cms))/, + 'espn.com': /^((?!espn\.com\/watch).)*$/, + 'esquire.com': /^((?!\/classic\.esquire\.com\/).)*$/, + 'expresso.pt': /^((?!\/tribuna\.expresso\.pt\/).)*$/, + 'foreignaffairs.com': /^((?!\/reader\.foreignaffairs\.com\/).)*$/, + 'ft.com': /^((?!\/cn\.ft\.com\/).)*$/, + 'hilltimes.com': /^((?!\.hilltimes\.com\/slideshow\/).)*$/, + 'hindustantimes.com': /^((?!\/epaper\.hindustantimes\.com\/).)*$/, + 'ilmanifesto.it': /^((?!\/ilmanifesto\.it\/edizioni\/).)*$/, + 'ilsole24ore.com': /^((?!\/ntplus.+\.ilsole24ore\.com\/).)*$/, + 'leparisien.fr': /^((?!\/l\.leparisien\.fr\/).)*$/, + 'livemint.com': /^((?!\/epaper\.livemint\.com\/).)*$/, + 'lopinion.fr': /^((?!\.lopinion\.fr\/lejournal).)*$/, + 'mid-day.com': /^((?!\/epaper\.mid-day\.com\/).)*$/, + 'nytimes.com': /^((?!\/(help|myaccount|timesmachine)\.nytimes\.com\/).)*$/, + 'nzz.ch': /^((?!\/epaper\.nzz\.ch\/).)*$/, + 'quora.com': /^((?!quora\.com\/search\?q=).)*$/, + 'science.org': /^((?!\.science\.org\/doi\/).)*$/, + 'sky.it': /\/(sport|tg24)\.sky\.it\//, + 'study.com': /\/study\.com\/.+\/lesson\//, + 'sueddeutsche.de': /^((?!zeitung\.sueddeutsche\.de).)*$/, + 'tagesspiegel.de': /^((?!\/(background|checkpoint)\.tagesspiegel\.de\/).)*$/, + 'techinasia.com': /\.techinasia\.com\/.+/, + 'thehindu.com': /^((?!epaper\.thehindu\.com).)*$/, + 'thehindubusinessline.com': /^((?!epaper\.thehindubusinessline\.com).)*$/, + 'thetimes.com': /^((?!epaper\.thetimes\.com).)*$/, + 'uol.com.br': /^((?!(conta|email)\.uol\.com\.br).)*$/, +} + +for (let domain of grouped_sites['###_au_news_corp']) + restrictions[domain] = new RegExp('^((?!todayspaper\\.' + domain.replace(/\./g, '\\.') + '\\/).)*$'); +for (let domain of grouped_sites['###_ch_media']) + restrictions[domain] = new RegExp('^((?!epaper\\.' + domain.replace(/\./g, '\\.') + '\\/).)*$'); + +if (typeof browser !== 'object') { + for (let domain of []) + restrictions[domain] = new RegExp('((\\/|\\.)' + domain.replace(/\./g, '\\.') + '\\/$|' + restrictions[domain].toString().replace(/(^\/|\/$)/g, '') + ')'); +} + +// Don't remove cookies before/after page load +var allow_cookies = []; +var remove_cookies = []; +// select specific cookie(s) to hold/drop from remove_cookies domains +var remove_cookies_select_hold, remove_cookies_select_drop; + +// Set User-Agent/headers +var use_google_bot, use_bing_bot, use_facebook_bot, use_useragent_custom, use_useragent_custom_obj, use_headers_custom, use_headers_custom_obj; +// Set Referer +var use_facebook_referer, use_google_referer, use_twitter_referer, use_referer_custom, use_referer_custom_obj; +// Set random IP-address +var random_ip = {}; +var use_random_ip = []; +// concat all sites with change of headers (useragent, referer or random ip) +var change_headers; + +// block paywall-scripts +var blockedRegexes = {}; +var blockedRegexesDomains = []; +var blockedRegexesGeneral = {}; +var blockedJsInline = {}; +var blockedJsInlineDomains = []; + +// unhide text on amp-page +var amp_unhide; +// redirect to amp-page +var amp_redirect; +// load contentScript in all frames +var cs_all_frames; +// block contentScript +var cs_block; +// clear localStorage in contentScript +var cs_clear_lclstrg; +// code for contentScript +var cs_code; +// parameters for contentScript (default) +var cs_param; +// load text from json (script[type="application/ld+json"]) +var ld_json; +// load text from json (script#__NEXT_DATA__) +var ld_json_next; +// load text from json (script source) +var ld_json_source; +// load text from json (link[rel="alternate"][type="application/json"][href]) +var ld_json_url; +// load text from archive.is +var ld_archive_is; +// load text from och.to/unlock +var ld_och_to_unlock; +// add external link to article +var add_ext_link; + +// custom: block javascript +var block_js_custom = []; +var block_js_custom_ext = []; + +// manifest v3 +var gpw_domains; +var rule_excluded_base_domains; + +function initSetRules() { + allow_cookies = []; + remove_cookies = []; + remove_cookies_select_drop = {}; + remove_cookies_select_hold = {}; + use_google_bot = []; + use_bing_bot = []; + use_facebook_bot = []; + use_useragent_custom = []; + use_useragent_custom_obj = {}; + use_headers_custom = []; + use_headers_custom_obj = {}; + use_facebook_referer = []; + use_google_referer = []; + use_twitter_referer = []; + use_referer_custom = []; + use_referer_custom_obj = {}; + random_ip = {}; + change_headers = []; + amp_unhide = []; + amp_redirect = {}; + cs_all_frames = []; + cs_block = {}; + cs_clear_lclstrg = []; + cs_code = {}; + cs_param = {}; + ld_json = {}; + ld_json_next = {}; + ld_json_source = {}; + ld_json_url = {}; + ld_archive_is = {}; + ld_och_to_unlock = {}; + add_ext_link = {}; + block_js_custom = []; + block_js_custom_ext = []; + blockedRegexes = {}; + blockedRegexesDomains = []; + blockedRegexesGeneral = {}; + blockedJsInline = {}; + blockedJsInlineDomains = []; + init_custom_flex_domains(); +} + +const userAgentDesktopG = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"; +const userAgentMobileG = "Chrome/115.0.5790.171 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)"; + +const userAgentDesktopB = "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"; +const userAgentMobileB = "Chrome/115.0.5790.171 Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"; + +const userAgentDesktopF = 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)'; + +var enabledSites = []; +var disabledSites = []; +var optionSites = {}; +var customSites = {}; +var customSites_grouped_domains = []; +var customSites_domains = []; +var updatedSites = {}; +var updatedSites_new = []; +var updatedSites_domains_new = []; +var excludedSites = []; + +function setDefaultOptions() { + ext_api.storage.local.set({ + sites: filterObject(defaultSites, function (val, key) { + return val.domain && !val.domain.match(/^(###$|#options_(disable|optin)_)/) + }, + function (val, key) { + return [key, val.domain] + }) + }, function () { + ext_api.runtime.openOptionsPage(); + }); +} + +function check_sites_updated(sites_updated_json, optin_update = false) { + fetch(sites_updated_json) + .then(response => { + if (response.ok) { + response.json().then(json => { + json = filterObject(json, function (val, key) { + let domain_filter = []; + return (val.domain && !domain_filter.includes(val.domain) && !(val.upd_version && (val.upd_version <= ext_version))) + }); + expandSiteRules(json, true); + ext_api.storage.local.set({ + sites_updated: json + }); + if (!optin_update) { + let updated_ext_version_new = Object.values(json).map(x => x.upd_version || '').sort().pop(); + if (updated_ext_version_new) + setExtVersionNew(updated_ext_version_new); + } + }) + } + }).catch(err => false); +} + +var ext_path = 'https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file='; +var sites_updated_json = 'sites_updated.json'; +var sites_updated_json_online = ext_path + sites_updated_json; +var self_hosted = !!(manifestData.update_url || (manifestData.browser_specific_settings && manifestData.browser_specific_settings.gecko.update_url)); + +function clear_sites_updated() { + ext_api.storage.local.set({ + sites_updated: {} + }); +} + +function prep_regex_str(str, domain = '') { + if (domain) + str = str.replace(/{domain}/g, domain.replace(/\./g, '\\.')); + return str.replace(/^\//, '').replace(/\/\//g, '/').replace(/([^\\])\/$/, "$1") +} + +var add_session_rule; +var init_session_rules; +var push_session_rule; +var update_session_rules; +if (ext_manifest_version === 3) { + +init_session_rules = function (counters = true, rules = true) { + if (counters) { + rule_id = 0; + regex_id = 0; + domain_id = 0; + } + if (rules) { + sesRules = []; + sesRuleIds = []; + } +} + +push_session_rule = function (rule, rule_id) { + sesRules.push(rule); + sesRuleIds.push(rule_id); +} + +update_session_rules = function (rules, rule_ids) { + ext_api.declarativeNetRequest.updateSessionRules({ + addRules: rules, + removeRuleIds: rule_ids + }, ); +} + +add_session_rule = function (domain, rule, blockedRegexes_rule = '', blockedRegexesGeneral_rule = '', blockedJsInline_rule = '') { + function regexToUrlFilter(rule, regex, domain) { + let urlFilter; + if (!(regex.match(/([([|*{$\^]|\\[a-z\?])/) || regex.match(/([^\.]|\\\.)\+/))) { + let match_domain = gpw_domains.concat(['tinypass.com', domain]).find(x => regex.replace(/\\/g, '').match(new RegExp(x.replace(/\./, '\\.')))); + urlFilter = regex.replace(/\\/g, '').replace(/\.\+/g, '*'); + if (match_domain) + urlFilter = '||' + urlFilter.replace(/^[\.\/]/g, ''); + delete rule.condition.regexFilter; + rule.condition.urlFilter = urlFilter; + } + if (!urlFilter) + regex_id++; + } + domain_id++; + if (block_js_custom.includes(domain) || block_js_custom_ext.includes(domain)) { + rule_id++; + let rule_regex; + let url_filter; + let allow = false; + if (block_js_custom.includes(domain)) { + rule_regex = "[\\/\\.]" + domain.replace(/\./g, '\\.') + "\\/"; + url_filter = '||' + domain; + if (block_js_custom_ext.includes(domain)) + url_filter = '*'; + } else if (block_js_custom_ext.includes(domain)) { + url_filter = '*'; + allow = true; + } + + let block_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "block" + }, + "condition": { + "initiatorDomains": [domain], + "urlFilter": url_filter, + "resourceTypes": ["script"] + } + }; + push_session_rule(block_rule, rule_id); + + if (allow) { + rule_id++; + let allow_rule = { + "id": rule_id, + "priority": 2, + "action": { + "type": "allow" + }, + "condition": { + "initiatorDomains": [domain], + "urlFilter": '||' + domain, + "resourceTypes": ["script"] + } + }; + push_session_rule(allow_rule, rule_id); + } + + } else if (blockedRegexes_rule) { + rule_id++; + let rule_regex = blockedRegexes_rule; + if (rule_regex instanceof RegExp) + rule_regex = rule_regex.source; + + let block_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "block" + }, + "condition": { + "initiatorDomains": [domain], + "regexFilter": rule_regex, + "resourceTypes": ["script", "xmlhttprequest"] + } + }; + regexToUrlFilter(block_rule, rule_regex, domain); + push_session_rule(block_rule, rule_id); + } + + if (blockedRegexesGeneral_rule) { + rule_id++; + let rule_regex = blockedRegexesGeneral_rule.block_regex; + if (rule_regex instanceof RegExp) + rule_regex = rule_regex.source; + let rule_excluded_domains = excludedSites.concat(rule_excluded_base_domains, blockedRegexesGeneral_rule.excluded_domains); + + let block_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "block" + }, + "condition": { + "excludedInitiatorDomains": rule_excluded_domains, + "regexFilter": rule_regex, + "resourceTypes": ["script", "xmlhttprequest"] + } + }; + regexToUrlFilter(block_rule, rule_regex, domain); + push_session_rule(block_rule, rule_id); + } + + let header_rule = {}; + if (!rule.allow_cookies || rule.useragent || rule.useragent_custom || rule.headers_custom || rule.referer || rule.referer_custom || rule.random_ip) { + rule_id++; + header_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "modifyHeaders", + "requestHeaders": [] + }, + "condition": { + "urlFilter": "||" + domain, + "resourceTypes": ["main_frame", "sub_frame", "xmlhttprequest"] + } + }; + + if (!allow_cookies.includes(domain)) { + header_rule.action.requestHeaders.push({ + "header": "Cookie", + "operation": "set", + "value": "" + }); + } + + let mobile = navigator.userAgent.toLowerCase().includes('mobile'); + let useUserAgentMobile = mobile && ![].includes(domain); + + let userAgentG = useUserAgentMobile ? userAgentMobileG : userAgentDesktopG; + let userAgentB = useUserAgentMobile ? userAgentMobileB : userAgentDesktopB; + + if (rule.useragent || rule.useragent_custom || rule.headers_custom) { + if (rule.useragent === 'googlebot') { + let googlebotEnabled = !(grouped_sites['###_es_grupo_vocento'].includes(domain) && mobile); + if (googlebotEnabled) { + if (['economictimes.com', 'economictimes.indiatimes.com'].includes(domain)) { + header_rule.condition.urlFilter = '||' + domain + '/*.cms'; + } else if (domain === 'handelsblatt.com') { + header_rule.condition.urlFilter = '||' + domain + '/*.html'; + } else if (domain === 'leparisien.fr') { + header_rule.condition.urlFilter = '||www.' + domain; + } + header_rule.action.requestHeaders.push({ + "header": "User-Agent", + "operation": "set", + "value": userAgentG + }); + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": "https://www.google.com/" + }); + header_rule.action.requestHeaders.push({ + "header": "X-Forwarded-For", + "operation": "set", + "value": "66.249.66.1" + }); + } + } else if (rule.useragent === 'bingbot') { + header_rule.action.requestHeaders.push({ + "header": "User-Agent", + "operation": "set", + "value": userAgentB + }); + } else if (rule.useragent === 'facebookbot') { + header_rule.action.requestHeaders.push({ + "header": "User-Agent", + "operation": "set", + "value": userAgentDesktopF + }); + } else { + if (rule.useragent_custom) { + header_rule.action.requestHeaders.push({ + "header": "User-Agent", + "operation": "set", + "value": use_useragent_custom_obj[domain] + }); + } + if (rule.headers_custom) { + for (let header in use_headers_custom_obj[domain]) { + header_rule.action.requestHeaders.push({ + "header": header, + "operation": "set", + "value": use_headers_custom_obj[domain][header] + }); + } + } + } + } else if (rule.referer || rule.referer_custom) { + if (use_google_referer.includes(domain)) { + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": "https://www.google.com/" + }); + } else if (use_facebook_referer.includes(domain)) { + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": "https://www.facebook.com/" + }); + } else if (use_twitter_referer.includes(domain)) { + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": "https://t.co/" + }); + } + if (rule.referer_custom) { + header_rule.action.requestHeaders.push({ + "header": "Referer", + "operation": "set", + "value": use_referer_custom_obj[domain] + }); + } + } + + if (rule.random_ip) { + let randomIP_val; + if (rule.random_ip === 'eu') + randomIP_val = randomIP(185, 185); + else + randomIP_val = randomIP(); + header_rule.action.requestHeaders.push({ + "header": "X-Forwarded-For", + "operation": "set", + "value": randomIP_val + }); + } + if (header_rule.action.requestHeaders.length) + push_session_rule(header_rule, rule_id); + else + rule_id--; + } + + if (blockedJsInline_rule) { + rule_id++; + let rule_regex = blockedJsInline_rule.source; + let block_inline_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "modifyHeaders", + "responseHeaders": [{ + "header": "Content-Security-Policy", + "operation": "set", + "value": "script-src *;" + } + ] + }, + "condition": { + "requestDomains": [domain], + "regexFilter": rule_regex, + "resourceTypes": ["main_frame", "sub_frame"] + } + } + regexToUrlFilter(block_inline_rule, rule_regex, domain); + push_session_rule(block_inline_rule, rule_id); + } + + if (grouped_sites['###_au_news_corp'].includes(domain)) { + rule_id++; + regex_id++; + let redirect_rule = { + "id": rule_id, + "priority": 1, + "action": { + "type": "redirect", + "redirect": { + "regexSubstitution": "https://www." + domain + "/\\1?amp" + } + }, + "condition": { + "regexFilter": ".+\\." + domain + "\\/subscribe\\/.+&dest=.+\\.com\\.au%2F([\\w-%]+)&.+", + "resourceTypes": ["main_frame"] + } + }; + push_session_rule(redirect_rule, rule_id); + } +} + +} // manifest v3 + +function addRules(domain, rule, flex = false) { + if (rule.remove_cookies > 0 || rule.hasOwnProperty('remove_cookies_select_hold') || !(rule.hasOwnProperty('allow_cookies') || rule.hasOwnProperty('remove_cookies_select_drop')) || rule.cs_clear_lclstrg) + cs_clear_lclstrg.push(domain); + if (rule.hasOwnProperty('remove_cookies_select_drop') || rule.hasOwnProperty('remove_cookies_select_hold')) { + rule.allow_cookies = 1; + rule.remove_cookies = 1; + } + if (rule.allow_cookies > 0 && !allow_cookies.includes(domain)) + allow_cookies.push(domain); + if (rule.remove_cookies > 0 && !remove_cookies.includes(domain)) + remove_cookies.push(domain); + if (rule.hasOwnProperty('remove_cookies_select_drop')) + remove_cookies_select_drop[domain] = rule.remove_cookies_select_drop; + if (rule.hasOwnProperty('remove_cookies_select_hold')) + remove_cookies_select_hold[domain] = rule.remove_cookies_select_hold; + if (rule.hasOwnProperty('block_regex')) { + if (rule.block_regex instanceof RegExp) + blockedRegexes[domain] = rule.block_regex; + else { + try { + blockedRegexes[domain] = new RegExp(prep_regex_str(rule.block_regex, domain)); + } catch (e) { + console.log(`regex not valid, error: ${e}`); + } + } + } + if (rule.hasOwnProperty('block_regex_general')) { + if (rule.block_regex_general instanceof RegExp) + blockedRegexesGeneral[domain] = {block_regex: rule.block_regex_general}; + else { + try { + blockedRegexesGeneral[domain] = {block_regex: new RegExp(prep_regex_str(rule.block_regex_general, domain))}; + } catch (e) { + console.log(`regex not valid, error: ${e}`); + } + } + blockedRegexesGeneral[domain]['excluded_domains'] = rule.excluded_domains ? rule.excluded_domains : []; + } + if (rule.hasOwnProperty('block_js_inline')) { + if (rule.block_js_inline instanceof RegExp) + blockedJsInline[domain] = rule.block_js_inline; + else { + try { + blockedJsInline[domain] = new RegExp(prep_regex_str(rule.block_js_inline, domain)); + } catch (e) { + console.log(`regex not valid, error: ${e}`); + } + } + } + if (rule.useragent) { + switch (rule.useragent) { + case 'googlebot': + if (!use_google_bot.includes(domain)) + use_google_bot.push(domain); + break; + case 'bingbot': + if (!use_bing_bot.includes(domain)) + use_bing_bot.push(domain); + break; + case 'facebookbot': + if (!use_facebook_bot.includes(domain)) + use_facebook_bot.push(domain); + break; + } + } else if (rule.useragent_custom || rule.headers_custom) { + if (!use_useragent_custom.includes(domain)) { + use_useragent_custom.push(domain); + use_useragent_custom_obj[domain] = rule.useragent_custom; + } + if (!use_headers_custom.includes(domain)) { + use_headers_custom.push(domain); + use_headers_custom_obj[domain] = rule.headers_custom; + } + } + if (rule.referer) { + switch (rule.referer) { + case 'facebook': + if (!use_facebook_referer.includes(domain)) + use_facebook_referer.push(domain); + break; + case 'google': + if (!use_google_referer.includes(domain)) + use_google_referer.push(domain); + break; + case 'twitter': + if (!use_twitter_referer.includes(domain)) + use_twitter_referer.push(domain); + break; + } + } else if (rule.referer_custom) { + if (!use_referer_custom.includes(domain)) { + use_referer_custom.push(domain); + use_referer_custom_obj[domain] = rule.referer_custom; + } + } + if (rule.random_ip) { + random_ip[domain] = rule.random_ip; + } + if (rule.amp_unhide > 0 && !amp_unhide.includes(domain)) + amp_unhide.push(domain); + if (rule.amp_redirect) + amp_redirect[domain] = rule.amp_redirect; + if (rule.cs_all_frames) + cs_all_frames.push(domain); + if (rule.cs_block) + cs_block[domain] = 1; + if (rule.cs_code) { + if (typeof rule.cs_code === 'string') { + try { + rule.cs_code = JSON.parse(rule.cs_code); + } catch (e) { + console.log(`cs_code not valid: ${rule.cs_code} error: ${e}`); + } + } + if (typeof rule.cs_code === 'object') + cs_code[domain] = rule.cs_code; + } + if (rule.cs_param) + cs_param[domain] = rule.cs_param; + if (rule.ld_json) + ld_json[domain] = rule.ld_json; + if (rule.ld_json_next) + ld_json_next[domain] = rule.ld_json_next; + if (rule.ld_json_source) + ld_json_source[domain] = rule.ld_json_source; + if (rule.ld_json_url) + ld_json_url[domain] = rule.ld_json_url; + if (rule.ld_archive_is) + ld_archive_is[domain] = rule.ld_archive_is; + if (rule.ld_och_to_unlock) + ld_och_to_unlock[domain] = rule.ld_och_to_unlock; + if (rule.ld_json || rule.ld_json_next || rule.ld_json_source || rule.ld_json_url || rule.ld_archive_is || rule.ld_och_to_unlock || rule.cs_dompurify) + if (!dompurify_sites.includes(domain)) + dompurify_sites.push(domain); + if (rule.add_ext_link && rule.add_ext_link_type) + add_ext_link[domain] = {css: rule.add_ext_link, type: rule.add_ext_link_type}; + + // custom + if (rule.block_js > 0) + block_js_custom.push(domain); + if (rule.block_js_ext > 0) + block_js_custom_ext.push(domain); + + if (ext_manifest_version === 3) { + init_session_rules(false, flex); + add_session_rule(domain, rule, blockedRegexes[domain], blockedRegexesGeneral[domain], blockedJsInline[domain]); + if (flex && sesRules.length) + update_session_rules(sesRules, sesRuleIds); + } +} + +function customFlexAddRules(custom_domain, rule) { + addRules(custom_domain, rule, true); + if (blockedRegexes[custom_domain]) + blockedRegexesDomains.push(custom_domain); + if (blockedJsInline[custom_domain]) { + blockedJsInlineDomains.push(custom_domain); + if (ext_manifest_version === 2) + disableJavascriptInline(); + } + if (rule.useragent || rule.useragent_custom || rule.headers_custom || rule.referer || rule.referer_custom || rule.random_ip) + change_headers.push(custom_domain); + if (rule.random_ip) + use_random_ip.push(custom_domain); + ext_api.tabs.reload({bypassCache: true}); +} + +// manifest v3 +var rule_id = 0; +var regex_id = 0; +var domain_id = 0; +var sesRules = []; +var sesRuleIds = []; + +function set_rules(sites, sites_updated, sites_custom) { + initSetRules(); + let prev_rule_id = rule_id; + if (ext_manifest_version === 3) + init_session_rules(); + for (let site in sites) { + let site_domain = sites[site].toLowerCase(); + let custom = false; + if (!site_domain.match(/^(###$|#options_)/)) { + let rule = {}; + let site_default = defaultSites.hasOwnProperty(site) ? site : Object.keys(defaultSites).find(default_key => compareKey(default_key, site)); + if (site_default) { + rule = defaultSites[site_default]; + let site_updated = Object.keys(sites_updated).find(updated_key => compareKey(updated_key, site)); + if (site_updated) { + rule = sites_updated[site_updated]; + if (rule.nofix && rule.group) { + enabledSites.splice(enabledSites.indexOf(site_domain), 1); + nofix_sites.push(site_domain); + } + } + } else if (sites_updated.hasOwnProperty(site)) { // updated (new) sites + rule = sites_updated[site]; + } else if (sites_custom.hasOwnProperty(site)) { // custom (new) sites + rule = sites_custom[site]; + custom = true; + } else + continue; + let domains = [site_domain]; + let group = false; + if (rule.hasOwnProperty('group')) { + domains = (typeof rule.group !== 'string') ? rule.group : rule.group.split(','); + group = true; + } + let rule_default = {}; + if (rule.hasOwnProperty('exception')) { + for (let key in rule) + rule_default[key] = rule[key]; + } + for (let domain of domains) { + let custom_in_group = false; + if (rule_default.hasOwnProperty('exception')) { + let exception_rule = rule_default.exception.filter(x => domain === x.domain || (typeof x.domain !== 'string' && x.domain.includes(domain))); + if (exception_rule.length > 0) + rule = exception_rule[0]; + else + rule = rule_default; + } + // custom domain for default site(group) + if (!custom) { + let isCustomSite = matchDomain(customSites_domains, domain); + let customSite_title = isCustomSite ? Object.keys(customSites).find(key => customSites[key].domain === isCustomSite) : ''; + if (customSite_title && !customSitesExt_remove.includes(isCustomSite)) { + // add default block_regex + let block_regex_default = ''; + if (rule.hasOwnProperty('block_regex')) + block_regex_default = rule.block_regex; + rule = {}; + for (let key in sites_custom[customSite_title]) + rule[key] = sites_custom[customSite_title][key]; + if (block_regex_default && !rule.block_regex_ignore_default) { + if (rule.hasOwnProperty('block_regex')) { + if (block_regex_default instanceof RegExp) + block_regex_default = block_regex_default.source; + rule.block_regex = '(' + block_regex_default + '|' + prep_regex_str(rule.block_regex, domain) + ')'; + } else + rule.block_regex = block_regex_default; + } + if (group) + custom_in_group = true; + else + custom = true; + } else { + if (rule.nofix) { + enabledSites.splice(enabledSites.indexOf(domain), 1); + nofix_sites.push(domain); + } + } + } + addRules(domain, rule); + } + } + } + blockedRegexesDomains = Object.keys(blockedRegexes); + blockedJsInlineDomains = Object.keys(blockedJsInline); + if (ext_manifest_version === 2) + disableJavascriptInline(); + else if (ext_manifest_version === 3) + update_session_rules(sesRules, sesRuleIds); + use_random_ip = Object.keys(random_ip); + change_headers = use_google_bot.concat(use_bing_bot, use_facebook_bot, use_useragent_custom, use_headers_custom, use_facebook_referer, use_google_referer, use_twitter_referer, use_referer_custom, use_random_ip); + + if (ext_manifest_version === 3) { + let block_rules_length = blockedRegexesDomains.length + blockedJsInlineDomains.length; + console.log('block_rules: ' + block_rules_length); + console.log('regex_rules (max. 1000): ' + regex_id); + console.log('total_rules (max. 5000): ' + rule_id); + console.log('domains: ' + domain_id); + + let fake_rules = []; + let fake_rules_ids = []; + for (let i = rule_id + 1; i < prev_rule_id + 1; i++) { + fake_rules.push({ + "id": i, + "priority": 1, + "action": { + "type": "allow" + }, + "condition": { + "urlFilter": "###", + "resourceTypes": ["main_frame"] + } + }); + fake_rules_ids.push(i); + } + + ext_api.declarativeNetRequest.updateSessionRules({ + removeRuleIds: fake_rules_ids + }, () => { + if (ext_api.runtime.lasterror) + console.log(ext_api.runtime.lasterrror.message) + }); + } + +}// manifest v3 + +// add grouped sites to en/disabledSites (and exclude sites) +function add_grouped_enabled_domains(groups) { + for (let key in groups) { + if (enabledSites.includes(key)) + enabledSites = enabledSites.concat(groups[key]); + else + disabledSites = disabledSites.concat(groups[key]); + } + // custom + for (let site in customSites) { + let group = customSites[site].group; + if (group) { + let group_array = group.split(','); + if (enabledSites.includes(customSites[site].domain)) + enabledSites = enabledSites.concat(group_array); + else + disabledSites = disabledSites.concat(group_array); + } + } + for (let site of excludedSites) { + if (enabledSites.includes(site)) { + enabledSites.splice(enabledSites.indexOf(site), 1); + disabledSites.push(site); + } + } +} + +// Get the enabled sites (from local storage) & set_rules for sites +ext_api.storage.local.get({ + sites: {}, + sites_default: Object.keys(defaultSites).filter(x => defaultSites[x].domain && !defaultSites[x].domain.match(/^(#options_|###$)/)), + sites_custom: {}, + sites_updated: {}, + sites_excluded: [], + ext_version_old: '2.3.9.0', + optIn: false, + optInUpdate: true +}, function (items) { + var sites = items.sites; + optionSites = sites; + var sites_default = items.sites_default; + customSites = items.sites_custom; + customSites = filterObject(customSites, function (val, key) { + return !(val.add_ext_link && !val.add_ext_link_type) + }); + customSites_grouped_domains = Object.values(customSites).map(x => x.domain); + customSites_domains = customSites_grouped_domains.concat(Object.values(customSites).filter(x => x.group).map(x => x.group.split(',').map(x => x.trim())).flat()); + updatedSites = items.sites_updated; + updatedSites_domains_new = Object.values(updatedSites).filter(x => x.domain && !defaultSites_domains.includes(x.domain) || x.group).map(x => x.group ? x.group.filter(y => !defaultSites_domains.includes(y)).concat([x.domain]) : x.domain).flat(); + var ext_version_old = items.ext_version_old; + optin_setcookie = items.optIn; + optin_update = items.optInUpdate; + excludedSites = items.sites_excluded; + + enabledSites = Object.values(sites).filter(function (val) { + return (val && val !== '###' && (defaultSites_domains.concat(customSites_domains, updatedSites_domains_new).includes(val))); + }).map(function (val) { + return val.toLowerCase(); + }); + + // Enable new sites by default (opt-in) + updatedSites_new = Object.keys(updatedSites).filter(x => updatedSites[x].domain && !defaultSites_domains.includes(updatedSites[x].domain)); + for (let site_updated in updatedSites) { + defaultSites[site_updated] = updatedSites[site_updated]; + if (updatedSites[site_updated].group) + grouped_sites[updatedSites[site_updated].domain] = updatedSites[site_updated].group; + } + if (ext_version > ext_version_old || updatedSites_new.length > 0) { + if (enabledSites.includes('#options_enable_new_sites')) { + let sites_new = Object.keys(defaultSites).filter(x => defaultSites[x].domain && !defaultSites[x].domain.match(/^(#options_|###$)/) && !sites_default.some(key => compareKey(key, x))); + for (let site_new of sites_new) + sites[site_new] = defaultSites[site_new].domain; + let sites_old = ['NHST Media Group']; + for (let site_old of sites_old) + if (sites[site_old]) + delete sites[site_old]; + // reset ungrouped sites + let ungrouped_sites = { + 'The Stage Media (UK)': '###_uk_thestage_media', + 'The Week (regwall)': 'theweek.com' + }; + for (let key in ungrouped_sites) { + if (sites[key] && sites[key] !== ungrouped_sites[key]) + sites[key] = ungrouped_sites[key]; + } + ext_api.storage.local.set({ + sites: sites + }); + } else { + ext_api.management.getSelf(function (result) { + if ((result.installType === 'development' || (result.installType !== 'development' && !enabledSites.includes('#options_on_update')))) { + let new_groups = ['###_de_ippen_media', '###_se_bonnier_group', '###_uk_independent', '###_uk_thesun']; + let open_options = new_groups.some(group => !enabledSites.includes(group) && grouped_sites[group].some(domain => enabledSites.includes(domain) && !customSites_domains.includes(domain))); + if (open_options) + ext_api.runtime.openOptionsPage(); + } + }); + } + sites_default = Object.keys(defaultSites).filter(x => defaultSites[x].domain && !defaultSites[x].domain.match(/^(#options_|###$)/)); + ext_api.storage.local.set({ + sites_default: sites_default, + ext_version_old: ext_version + }); + } + + disabledSites = defaultSites_grouped_domains.concat(customSites_grouped_domains, updatedSites_domains_new).filter(x => !enabledSites.includes(x)); + add_grouped_enabled_domains(grouped_sites); + if (ext_manifest_version === 3) { + gpw_domains = Object.values(defaultSites).filter(x => x.block_regex_general && !x.domain.startsWith('###')).map(x => x.domain); + rule_excluded_base_domains = disabledSites.filter(x => !x.match(/(^###|_)/) && !gpw_domains.includes(x)); + } + set_rules(sites, updatedSites, customSites); + if (optin_update) + check_update(); + if (enabledSites.includes('#options_optin_update_rules') && self_hosted) { + sites_updated_json = sites_updated_json_online; + sites_custom_ext_json = ext_path + 'sites_custom.json'; + } + check_sites_updated(sites_updated_json, optin_update); + check_sites_custom_ext(); + if (!Object.keys(sites).length) + ext_api.runtime.openOptionsPage(); +}); + +// Listen for changes to options +ext_api.storage.onChanged.addListener(function (changes, namespace) { + if (namespace === 'sync') + return; + for (let key in changes) { + var storageChange = changes[key]; + if (key === 'sites') { + var sites = storageChange.newValue; + optionSites = sites; + enabledSites = Object.values(sites).filter(function (val) { + return (val && val !== '###' && (defaultSites_domains.concat(customSites_domains, updatedSites_domains_new).includes(val))); + }).map(function (val) { + return val.toLowerCase(); + }); + disabledSites = defaultSites_grouped_domains.concat(customSites_grouped_domains, updatedSites_domains_new).filter(x => !enabledSites.includes(x)); + add_grouped_enabled_domains(grouped_sites); + if (ext_manifest_version === 3) { + gpw_domains = Object.values(defaultSites).filter(x => x.block_regex_general && !x.domain.startsWith('###')).map(x => x.domain); + rule_excluded_base_domains = disabledSites.filter(x => !x.match(/(^###|_)/) && !gpw_domains.includes(x)); + } + set_rules(sites, updatedSites, customSites); + } + if (key === 'sites_custom') { + var sites_custom = storageChange.newValue ? storageChange.newValue : {}; + var sites_custom_old = storageChange.oldValue ? storageChange.oldValue : {}; + customSites = sites_custom; + customSites_grouped_domains = Object.values(customSites).map(x => x.domain); + customSites_domains = customSites_grouped_domains.concat(Object.values(customSites).filter(x => x.group).map(x => x.group.split(',').map(x => x.trim())).flat()); + + // add/remove custom sites in options (not for default site(group)) + var sites_custom_added = Object.keys(sites_custom).filter(x => !Object.keys(sites_custom_old).includes(x) && !defaultSites.hasOwnProperty(x) && !defaultSites_domains.includes(sites_custom[x].domain)); + var sites_custom_removed = Object.keys(sites_custom_old).filter(x => !Object.keys(sites_custom).includes(x) && !defaultSites.hasOwnProperty(x) && !defaultSites_domains.includes(sites_custom_old[x].domain)); + + ext_api.storage.local.get({ + sites: {} + }, function (items) { + var sites = items.sites; + if (sites_custom_added.concat(sites_custom_removed).length > 0) { + for (let key of sites_custom_added) + sites[key] = sites_custom[key].domain; + for (let key of sites_custom_removed) + delete sites[key]; + + ext_api.storage.local.set({ + sites: sites + }, function () { + true; + }); + } else { + var sites_custom_group_update = Object.keys(sites_custom).filter(x => sites_custom[x].group && Object.keys(sites_custom_old).includes(x) && sites_custom_old[x].group && sites_custom[x].group !== sites_custom_old[x].group && enabledSites.includes(sites_custom[x].domain)); + for (let key of sites_custom_group_update) + enabledSites = enabledSites.concat(sites_custom[key].group.split(',')); + set_rules(sites, updatedSites, customSites); + } + }); + } + if (key === 'sites_updated') { + var sites_updated = storageChange.newValue ? storageChange.newValue : {}; + updatedSites = sites_updated; + updatedSites_domains_new = Object.values(updatedSites).filter(x => (x.domain && !defaultSites_domains.includes(x.domain) || x.group)).map(x => x.group ? x.group.filter(y => !defaultSites_domains.includes(y)) : x.domain).flat(); + updatedSites_new = Object.keys(updatedSites).filter(x => updatedSites[x].domain && !defaultSites_domains.includes(updatedSites[x].domain)); + if (updatedSites_new.length > 0) { + if (enabledSites.includes('#options_enable_new_sites')) { + for (let site_updated_new of updatedSites_new) + optionSites[site_updated_new] = updatedSites[site_updated_new].domain; + ext_api.storage.local.set({ + sites: optionSites + }); + } + } else + set_rules(optionSites, updatedSites, customSites); + } + if (key === 'sites_excluded') { + var sites_excluded = storageChange.newValue ? storageChange.newValue : []; + var sites_excluded_old = storageChange.oldValue ? storageChange.oldValue : []; + excludedSites = sites_excluded; + + // add/remove excluded sites in en/disabledSites + var sites_excluded_added = sites_excluded.filter(x => !sites_excluded_old.includes(x)); + var sites_excluded_removed = sites_excluded_old.filter(x => !sites_excluded.includes(x)); + + for (let site of sites_excluded_added) { + if (enabledSites.includes(site)) { + enabledSites.splice(enabledSites.indexOf(site), 1); + disabledSites.push(site); + } + } + for (let site of sites_excluded_removed) { + if (disabledSites.includes(site)) { + disabledSites.splice(disabledSites.indexOf(site), 1); + enabledSites.push(site); + } + } + } + if (key === 'ext_version_new') { + ext_version_new = storageChange.newValue; + } + if (key === 'optIn') { + optin_setcookie = storageChange.newValue; + } + if (key === 'optInUpdate') { + optin_update = storageChange.newValue; + } + } +}); + +// Set and show default options on install +ext_api.runtime.onInstalled.addListener(function (details) { + if (details.reason == "install") { + setDefaultOptions(); + } else if (details.reason == "update") { + ext_api.management.getSelf(function (result) { + if (enabledSites.includes('#options_on_update') && result.installType !== 'development') + ext_api.runtime.openOptionsPage(); // User updated extension (non-developer mode) + }); + } +}); + +if (ext_manifest_version === 2) { + +// Google AMP cache redirect +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + var url = details.url.split('?')[0]; + var updatedUrl; + if (matchUrlDomain('cdn.ampproject.org', url)) + updatedUrl = 'https://' + url.split(/cdn\.ampproject\.org\/[a-z]\/s\//)[1]; + else if (matchUrlDomain('google.com', url)) + updatedUrl = 'https://' + url.split(/\.google\.com\/amp\/s\//)[1]; + return { redirectUrl: decodeURIComponent(updatedUrl) }; +}, +{urls:["*://*.cdn.ampproject.org/*/s/*", "*://*.google.com/amp/s/*"], types:["main_frame"]}, +["blocking"] +); + +// inkl bypass +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + if (!isSiteEnabled(details)) { + return; + } + var updatedUrl = details.url.replace(/etok=[\w]*&/, ''); + if (details.url.includes('/signin?') && details.url.includes('redirect_to=')) + updatedUrl = 'https://www.inkl.com' + decodeURIComponent(updatedUrl.split('redirect_to=')[1]); + return { redirectUrl: updatedUrl }; +}, +{urls:["*://*.inkl.com/*"], types:["main_frame"]}, +["blocking"] +); + +// Australia News Corp redirect subscribe to amp +var au_news_corp_subscr = grouped_sites['###_au_news_corp'].map(domain => '*://www.' + domain + '/subscribe/*'); +ext_api.webRequest.onBeforeRequest.addListener(function (details) { + if (!isSiteEnabled(details) || details.url.includes('/digitalprinteditions') || !(details.url.includes('dest=') && details.url.split('dest=')[1].split('&')[0])) { + return; + } + var updatedUrl = decodeURIComponent(details.url.split('dest=')[1].split('&')[0]) + '?amp'; + return { + redirectUrl: updatedUrl + }; +}, { + urls: au_news_corp_subscr, + types: ["main_frame"] +}, + ["blocking"]); + +// fix nytimes x-frame-options (hidden iframe content) +ext_api.webRequest.onHeadersReceived.addListener(function (details) { + if (!isSiteEnabled(details)) { + return; + } + var headers = details.responseHeaders; + headers = headers.map(function (header) { + if (header.name === 'x-frame-options') + header.value = 'SAMEORIGIN'; + return header; + }); + return { + responseHeaders: headers + }; +}, { + urls: ["*://*.nytimes.com/*"] +}, + ['blocking', 'responseHeaders']); + +}// manifest v2 + +function blockJsInlineListener(details) { + let domain = matchUrlDomain(blockedJsInlineDomains, details.url); + let matched = domain && details.url.match(blockedJsInline[domain]); + if (matched && optin_setcookie && ['uol.com.br'].includes(domain)) + matched = false; + if (!isSiteEnabled(details) || !matched) + return; + var headers = details.responseHeaders; + headers.push({ + 'name': 'Content-Security-Policy', + 'value': "script-src *;" + }); + return { + responseHeaders: headers + }; +} + +function disableJavascriptInline() { + // block inline script + ext_api.webRequest.onHeadersReceived.removeListener(blockJsInlineListener); + var block_js_inline_urls = []; + for (let domain in blockedJsInline) + block_js_inline_urls.push("*://*." + domain + "/*"); + if (block_js_inline_urls.length) + ext_api.webRequest.onHeadersReceived.addListener(blockJsInlineListener, { + 'types': ['main_frame', 'sub_frame'], + 'urls': block_js_inline_urls + }, + ['blocking', 'responseHeaders']); +} + +if (typeof browser !== 'object') { + var focus_changed = false; + ext_api.windows.onFocusChanged.addListener((windowId) => { + if (windowId > 0) + focus_changed = true; + }); +} + + function runOnTab(tab) { + let tabId = tab.id; + let url = tab.url; + let rc_domain = matchUrlDomain(remove_cookies, url); + let rc_domain_enabled = rc_domain && enabledSites.includes(rc_domain); + let lib_file = 'lib/empty.js'; + if (matchUrlDomain(dompurify_sites, url)) + lib_file = 'lib/purify.min.js'; + var bg2csData = {}; + if (optin_setcookie && matchUrlDomain(['###'], url)) + bg2csData.optin_setcookie = 1; + if (matchUrlDomain(amp_unhide, url)) + bg2csData.amp_unhide = 1; + let amp_redirect_domain = matchUrlDomain(Object.keys(amp_redirect), url); + if (amp_redirect_domain) + bg2csData.amp_redirect = amp_redirect[amp_redirect_domain]; + let cs_block_domain = matchUrlDomain(Object.keys(cs_block), url); + if (cs_block_domain) + bg2csData.cs_block = 1; + let cs_clear_lclstrg_domain = matchUrlDomain(cs_clear_lclstrg, url); + if (cs_clear_lclstrg_domain) + bg2csData.cs_clear_lclstrg = 1; + let cs_code_domain = matchUrlDomain(Object.keys(cs_code), url); + if (cs_code_domain) + bg2csData.cs_code = cs_code[cs_code_domain]; + let cs_param_domain = matchUrlDomain(Object.keys(cs_param), url); + if (cs_param_domain) + bg2csData.cs_param = cs_param[cs_param_domain]; + let ld_json_domain = matchUrlDomain(Object.keys(ld_json), url); + if (ld_json_domain) + bg2csData.ld_json = ld_json[ld_json_domain]; + let ld_json_next_domain = matchUrlDomain(Object.keys(ld_json_next), url); + if (ld_json_next_domain) + bg2csData.ld_json_next = ld_json_next[ld_json_next_domain]; + let ld_json_source_domain = matchUrlDomain(Object.keys(ld_json_source), url); + if (ld_json_source_domain) + bg2csData.ld_json_source = ld_json_source[ld_json_source_domain]; + let ld_json_url_domain = matchUrlDomain(Object.keys(ld_json_url), url); + if (ld_json_url_domain) + bg2csData.ld_json_url = ld_json_url[ld_json_url_domain]; + let ld_archive_is_domain = matchUrlDomain(Object.keys(ld_archive_is), url); + if (ld_archive_is_domain) + bg2csData.ld_archive_is = ld_archive_is[ld_archive_is_domain]; + let ld_och_to_unlock_domain = matchUrlDomain(Object.keys(ld_och_to_unlock), url); + if (ld_och_to_unlock_domain) + bg2csData.ld_och_to_unlock = ld_och_to_unlock[ld_och_to_unlock_domain]; + let add_ext_link_domain = matchUrlDomain(Object.keys(add_ext_link), url); + if (add_ext_link_domain) + bg2csData.add_ext_link = add_ext_link[add_ext_link_domain]; + let use_cs_all_frames = !!matchUrlDomain(cs_all_frames, url); + let tab_runs = 5; + for (let n = 0; n < tab_runs; n++) { + setTimeout(function () { + if (n < 1) { + // run contentScript.js on page + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: lib_file, + runAt: 'document_start', + allFrames: use_cs_all_frames + }, function (res) { + if (ext_api.runtime.lastError) + return; + ext_api.tabs.executeScript(tabId, { + file: 'contentScript.js', + runAt: 'document_start', + allFrames: use_cs_all_frames + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }) + }); + } else if (ext_manifest_version === 3) { + let script_world = "ISOLATED"; + if (matchUrlDomain(['businesspost.ie', 'hbr.org', 'lepoint.fr', 'thehindu.com', 'thehindubusinessline.com'], url)) + script_world = "MAIN"; + ext_api.scripting.executeScript({ + target: { + tabId: tabId, + allFrames: use_cs_all_frames + }, + files: [lib_file, "contentScript.js"], + injectImmediately: true, + world: script_world + }).catch(err => false); + } + // send bg2csData to contentScript.js + if (true) { + setTimeout(function () { + if (ext_manifest_version === 3 || typeof browser === 'object') + ext_api.tabs.sendMessage(tabId, {msg: "bg2cs", data: bg2csData}).catch(x => false); + else + ext_api.tabs.sendMessage(tabId, {msg: "bg2cs", data: bg2csData}); + }, 100); + } + } // run cs once + // remove cookies after page load + if (rc_domain_enabled && !['enotes.com', 'huffingtonpost.it', 'lastampa.it'].includes(rc_domain)) { + remove_cookies_fn(rc_domain, true); + } + }, n * 200); + } + } + + function runOnTab_once(tab) { + let tabId = tab.id; + let url = tab.url; + // load contentScript_once.js to identify custom site (flex) of group + if (!(matchUrlDomain(custom_flex_domains.concat(custom_flex_not_domains, customSites_domains, updatedSites_domains_new, excludedSites, nofix_sites), url) || matchUrlDomain(defaultSites_domains, url))) { + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: 'contentScript_once.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: { + tabId: tabId + }, + files: ["contentScript_once.js"] + }).catch(err => false); + } + } + // load toggleIcon.js (icon for dark or incognito mode in Chrome)) + if (typeof browser !== 'object') { + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: 'options/toggleIcon.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: { + tabId: tabId + }, + files: ["options/toggleIcon.js"] + }).catch(err => false); + } + } + } + + var set_var_sites = ['dagsavisen.no', 'journaldemontreal.com', 'journaldequebec.com', 'nzherald.co.nz'].concat(grouped_sites['###_de_madsack']); + function runOnTab_once_var(tab) { + let tabId = tab.id; + let url = tab.url; + let domain = matchUrlDomain(set_var_sites, url); + // load contentScript_once_var.js to set variables for site + if (domain && enabledSites.includes(domain)) { + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript(tabId, { + file: 'contentScript_once_var.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: { + tabId: tabId + }, + files: ["contentScript_once_var.js"], + injectImmediately: true, + world: "MAIN" + }).catch(err => false); + } + } + } + +ext_api.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { + let tab_status = changeInfo.status; + if (/^http/.test(tab.url)) { + if ((tab_status && (tab_status === 'complete' || matchUrlDomain(['startribune.com'], tab.url))) || changeInfo.url) { + let timeout = changeInfo.url ? 500 : 0; + setTimeout(function () { + if (isSiteEnabled(tab)) { + runOnTab(tab); + } + runOnTab_once(tab); + }, timeout); + } + runOnTab_once_var(tab); + } +}); + +if (ext_manifest_version === 2) { + +var extraInfoSpec = ['blocking', 'requestHeaders']; +if (ext_api.webRequest.OnBeforeSendHeadersOptions.hasOwnProperty('EXTRA_HEADERS')) + extraInfoSpec.push('extraHeaders'); + +ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { + var requestHeaders = details.requestHeaders; + + var header_referer = ''; + if (details.originUrl) + header_referer = details.originUrl; + else { + for (let n in requestHeaders) { + if (requestHeaders[n].name.toLowerCase() == 'referer') { + header_referer = requestHeaders[n].value; + break; + } + } + var blocked_referer_domains = []; + if (!header_referer && details.initiator) { + header_referer = details.initiator; + if (!blocked_referer && matchUrlDomain(blocked_referer_domains, details.url) && ['script', 'xmlhttprequest'].includes(details.type)) { + for (let domain of blocked_referer_domains) + restrictions[domain] = new RegExp('((\\/|\\.)' + domain.replace(/\./g, '\\.') + '($|\\/$)|' + restrictions[domain].toString().replace(/(^\/|\/$)/g, '') + ')'); + blocked_referer = true; + } + } + } + + // block external javascript for custom sites (optional) + if (['script'].includes(details.type)) { + let domain_blockjs_ext = matchUrlDomain(block_js_custom_ext, header_referer); + if (domain_blockjs_ext && !matchUrlDomain(domain_blockjs_ext, details.url) && isSiteEnabled({url: header_referer})) + return { cancel: true }; + } + + // check for blocked regular expression: domain enabled, match regex, block on an internal or external regex + if (['script', 'xmlhttprequest'].includes(details.type)) { + let domain = matchUrlDomain(blockedRegexesDomains, header_referer); + if (domain && details.url.match(blockedRegexes[domain]) && isSiteEnabled({url: header_referer})) + return { cancel: true }; + } + + // block general paywall scripts + if (['script', 'xmlhttprequest'].includes(details.type)) { + for (let domain in blockedRegexesGeneral) { + if (details.url.match(blockedRegexesGeneral[domain].block_regex) && !(matchUrlDomain(excludedSites.concat(disabledSites, blockedRegexesGeneral[domain].excluded_domains), header_referer))) + return { cancel: true }; + } + } + + if (!isSiteEnabled(details)) { + return; + } + + // block javascript of (sub)domain for custom sites (optional) + var domain_blockjs = matchUrlDomain(block_js_custom, details.url); + if (domain_blockjs && details.type === 'script') { + return { cancel: true }; + } + + var useUserAgentMobile = false; + var setReferer = false; + +var ignore_types = ['font', 'image', 'stylesheet']; + +if (matchUrlDomain(change_headers, details.url) && !ignore_types.includes(details.type)) { + var mobile = details.requestHeaders.filter(x => x.name.toLowerCase() === "user-agent" && x.value.toLowerCase().includes("mobile")).length; + var googlebotEnabled = matchUrlDomain(use_google_bot, details.url) && + !(matchUrlDomain(grouped_sites['###_es_grupo_vocento'], details.url) && mobile) && + !(matchUrlDomain(['economictimes.com', 'economictimes.indiatimes.com'], details.url) && !details.url.split(/[\?#]/)[0].endsWith('.cms')) && + !(matchUrlDomain('handelsblatt.com', details.url) && !details.url.split(/[\?#]/)[0].endsWith('.html')) && + !(matchUrlDomain('nytimes.com', details.url) && details.url.includes('.nytimes.com/live/')) && + !(matchUrlDomain('uol.com.br', details.url) && !matchUrlDomain('folha.uol.com.br', details.url)); + var bingbotEnabled = matchUrlDomain(use_bing_bot, details.url); + var facebookbotEnabled = matchUrlDomain(use_facebook_bot, details.url); + var useragent_customEnabled = matchUrlDomain(use_useragent_custom, details.url); + var headers_customEnabled = matchUrlDomain(use_headers_custom, details.url); + + // if referer exists, set it + requestHeaders = requestHeaders.map(function (requestHeader) { + if (requestHeader.name === 'Referer') { + if (googlebotEnabled || matchUrlDomain(use_google_referer, details.url)) { + requestHeader.value = 'https://www.google.com/'; + } else if (matchUrlDomain(use_facebook_referer, details.url)) { + requestHeader.value = 'https://www.facebook.com/'; + } else if (matchUrlDomain(use_twitter_referer, details.url)) { + requestHeader.value = 'https://t.co/'; + } else if (domain = matchUrlDomain(use_referer_custom, details.url)) { + requestHeader.value = use_referer_custom_obj[domain]; + } + setReferer = true; + } + if (requestHeader.name === 'User-Agent') { + useUserAgentMobile = requestHeader.value.toLowerCase().includes("mobile") && !matchUrlDomain([], details.url); + } + return requestHeader; + }); + + // otherwise add it + if (!setReferer) { + if (googlebotEnabled || matchUrlDomain(use_google_referer, details.url)) { + requestHeaders.push({ + name: 'Referer', + value: 'https://www.google.com/' + }); + } else if (matchUrlDomain(use_facebook_referer, details.url)) { + requestHeaders.push({ + name: 'Referer', + value: 'https://www.facebook.com/' + }); + } else if (matchUrlDomain(use_twitter_referer, details.url)) { + requestHeaders.push({ + name: 'Referer', + value: 'https://t.co/' + }); + } else if (domain = matchUrlDomain(use_referer_custom, details.url)) { + requestHeaders.push({ + name: 'Referer', + value: use_referer_custom_obj[domain] + }); + } + } + + // override User-Agent to use Googlebot + if (googlebotEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": useUserAgentMobile ? userAgentMobileG : userAgentDesktopG + }) + requestHeaders.push({ + "name": "X-Forwarded-For", + "value": "66.249.66.1" + }) + } + + // override User-Agent to use Bingbot + else if (bingbotEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": useUserAgentMobile ? userAgentMobileB : userAgentDesktopB + }) + } + + // override User-Agent to use Facebookbot + else if (facebookbotEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": userAgentDesktopF + }) + } + + // override User-Agent/headers to custom + else { + if (domain = useragent_customEnabled) { + requestHeaders.push({ + "name": "User-Agent", + "value": use_useragent_custom_obj[domain] + }); + } + if (domain = headers_customEnabled) { + for (let header in use_headers_custom_obj[domain]) { + requestHeaders.push({ + "name": header, + "value": use_headers_custom_obj[domain][header] + }) + } + } + } + + // random IP for sites in use_random_ip + let domain_random = matchUrlDomain(use_random_ip, details.url); + if (domain_random && !googlebotEnabled) { + let randomIP_val; + if (random_ip[domain_random] === 'eu') + randomIP_val = randomIP(185, 185); + else + randomIP_val = randomIP(); + requestHeaders.push({ + "name": "X-Forwarded-For", + "value": randomIP_val + }) + } +} + + // remove cookies before page load + if (!matchUrlDomain(allow_cookies, details.url)) { + requestHeaders = requestHeaders.map(function(requestHeader) { + if (requestHeader.name === 'Cookie') { + requestHeader.value = ''; + } + return requestHeader; + }); + } + return { requestHeaders: requestHeaders }; +}, { + urls: ['*://*/*'] +}, extraInfoSpec); +// extraInfoSpec is ['blocking', 'requestHeaders'] + possible 'extraHeaders' + +}// manifest v2 + +function check_sites_custom_ext() { + fetch(sites_custom_ext_json) + .then(response => { + if (response.ok) { + response.json().then(json => { + customSitesExt = Object.values(json).map(x => x.domain); + if (json['###_remove_sites'] && json['###_remove_sites'].cs_code) + customSitesExt_remove = json['###_remove_sites'].cs_code.split(/,\s?/); + }) + } + }).catch(err => false); +} + +var customSitesExt = []; +var customSitesExt_remove = []; +var sites_custom_ext_json = 'custom/sites_custom.json'; + +ext_api.tabs.onUpdated.addListener(function (tabId, info, tab) { updateBadge(tab); }); +ext_api.tabs.onActivated.addListener(function (activeInfo) { if (activeInfo.tabId) ext_api.tabs.get(activeInfo.tabId, updateBadge); }); + +var gpw_no_badge_domains = Object.values(defaultSites).filter(x => x.block_regex_general && !x.domain.startsWith('###') && x.excluded_domains && x.excluded_domains.includes(x.domain)).map(x => x.domain); +function updateBadge(activeTab) { + if (ext_api.runtime.lastError || !activeTab || !activeTab.active) + return; + let badgeText = ''; + let color = 'red'; + let currentUrl = activeTab.url; + if (currentUrl) { + if (isSiteEnabled({url: currentUrl})) { + badgeText = 'ON'; + color = 'red'; + } else if (matchUrlDomain(enabledSites, currentUrl)) { + badgeText = 'ON-'; + color = 'orange'; + } else if (matchUrlDomain(disabledSites, currentUrl)) { + badgeText = 'OFF'; + color = 'blue'; + } else if (matchUrlDomain(nofix_sites, currentUrl)) { + badgeText = 'X'; + color = 'silver'; + } + if (matchUrlDomain(gpw_no_badge_domains, currentUrl)) + badgeText = ''; + if (ext_version_new > ext_version) + badgeText = '^' + badgeText; + let isDefaultSite = matchUrlDomain(defaultSites_domains, currentUrl); + let isCustomSite = matchUrlDomain(customSites_domains, currentUrl); + let isUpdatedSite = matchUrlDomain(updatedSites_domains_new, currentUrl); + if (!isDefaultSite && (isCustomSite || isUpdatedSite)) { + ext_api.permissions.contains({ + origins: ['*://*.' + (isCustomSite || isUpdatedSite) + '/*'] + }, function (result) { + if (!result) + badgeText = enabledSites.includes(isCustomSite || isUpdatedSite) ? 'C' : ''; + if (color && badgeText) + ext_api.action.setBadgeBackgroundColor({color: color}); + ext_api.action.setBadgeText({text: badgeText}); + }); + } else { + if (!badgeText && matchUrlDomain(customSitesExt, currentUrl)) + badgeText = '+C'; + if (color && badgeText) + ext_api.action.setBadgeBackgroundColor({color: color}); + ext_api.action.setBadgeText({text: badgeText}); + } + } else + ext_api.action.setBadgeText({text: badgeText}); +} + +function setExtVersionNew(check_ext_version_new, check_ext_upd_version_new = '') { + ext_api.management.getSelf(function (result) { + var installType = result.installType; + var ext_version_len = (installType === 'development') ? 7 : 5; + ext_version_new = check_ext_version_new; + if (ext_version_len === 5 && check_ext_upd_version_new && check_ext_upd_version_new < check_ext_version_new) + ext_version_new = check_ext_upd_version_new; + if (ext_version_new && ext_version_new.substring(0, ext_version_len) <= ext_version.substring(0, ext_version_len)) + ext_version_new = '1'; + ext_api.storage.local.set({ + ext_version_new: ext_version_new + }); + }); +} + +var ext_version_new; +function check_update() { + let manifest_new = ext_path + 'manifest.json'; + fetch(manifest_new) + .then(response => { + if (response.ok) { + response.json().then(json => { + let json_ext_version_new = json['version']; + if (manifestData.browser_specific_settings && manifestData.browser_specific_settings.gecko.update_url) { + let json_upd_version_new = manifestData.browser_specific_settings.gecko.update_url; + fetch(json_upd_version_new) + .then(response => { + if (response.ok) { + response.json().then(upd_json => { + let ext_id = manifestData.browser_specific_settings.gecko.id; + let json_ext_upd_version_new = upd_json.addons[ext_id].updates[0].version; + setExtVersionNew(json_ext_version_new, json_ext_upd_version_new); + }) + } + }).catch(err => setExtVersionNew(json_ext_version_new)); + } else + setExtVersionNew(json_ext_version_new); + }) + } else + setExtVersionNew(''); + }).catch(err => setExtVersionNew('')); +} + +function site_switch() { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let currentUrl = tabs[0].url; + let isDefaultSite = matchUrlDomain(defaultSites_grouped_domains, currentUrl); + if (!isDefaultSite) { + let isDefaultSiteGroup = matchUrlDomain(defaultSites_domains, currentUrl); + if (isDefaultSiteGroup) + isDefaultSite = Object.keys(grouped_sites).find(key => grouped_sites[key].includes(isDefaultSiteGroup)); + } + if (!isDefaultSite) { + let sites_updated_domains_new = Object.values(updatedSites).filter(x => x.domain && !defaultSites_domains.includes(x.domain)).map(x => x.domain); + let isUpdatedSite = matchUrlDomain(sites_updated_domains_new, currentUrl); + if (!isUpdatedSite) { + let sites_updated_group_domains_new = Object.values(updatedSites).filter(x => x.group).map(x => x.group.filter(y => !defaultSites_domains.includes(y))).flat(); + let isUpdatedSite_group = matchUrlDomain(sites_updated_group_domains_new, currentUrl); + if (isUpdatedSite_group) + isUpdatedSite = Object.values(updatedSites).filter(x => x.group && x.group.includes(isUpdatedSite_group)).map(x => x.domain)[0]; + } + if (isUpdatedSite) + isDefaultSite = isUpdatedSite; + } + let defaultSite_title = isDefaultSite ? Object.keys(defaultSites).find(key => defaultSites[key].domain === isDefaultSite) : ''; + let isCustomSite = matchUrlDomain(customSites_domains, currentUrl); + let customSite_title = isCustomSite ? Object.keys(customSites).find(key => customSites[key].domain === isCustomSite || (customSites[key].group && customSites[key].group.split(',').includes(isCustomSite))) : ''; + if (isCustomSite && customSite_title && customSites[customSite_title].domain !== isCustomSite) + isCustomSite = customSites[customSite_title].domain; + let isCustomFlexSite = matchUrlDomain(custom_flex_domains, currentUrl); + let isCustomFlexGroupSite = isCustomFlexSite ? Object.keys(custom_flex).find(key => custom_flex[key].includes(isCustomFlexSite)) : ''; + let customFlexSite_title = isCustomFlexGroupSite ? Object.keys(defaultSites).find(key => defaultSites[key].domain === isCustomFlexGroupSite) : ''; + let site_title = defaultSite_title || customSite_title || customFlexSite_title; + let domain = isDefaultSite || isCustomSite || isCustomFlexGroupSite; + if (domain && site_title) { + let added_site = []; + let removed_site = []; + if (enabledSites.includes(domain)) + removed_site.push(site_title); + else + added_site.push(site_title); + ext_api.storage.local.get({ + sites: {} + }, function (items) { + var sites = items.sites; + for (let key of added_site) + sites[key] = domain; + for (let key of removed_site) { + key = Object.keys(sites).find(sites_key => compareKey(sites_key, key)); + delete sites[key]; + } + ext_api.storage.local.set({ + sites: sites + }, function () { + ext_api.tabs.reload({bypassCache: true}); + }); + }); + } + } + }); +} + +function remove_cookies_fn(domainVar, exclusions = false) { + ext_api.cookies.getAllCookieStores(function (cookieStores) { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (!ext_api.runtime.lastError && tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let tabId = tabs[0].id; + let storeId = '0'; + for (let store of cookieStores) { + if (store.tabIds.includes(tabId)) + storeId = store.id; + } + storeId = storeId.toString(); + if (domainVar === 'asia.nikkei.com') + domainVar = 'nikkei.com'; + var cookie_get_options = { + domain: domainVar + }; + if (storeId !== 'null') + cookie_get_options.storeId = storeId; + var cookie_remove_options = {}; + ext_api.cookies.getAll(cookie_get_options, function (cookies) { + for (let cookie of cookies) { + if (exclusions) { + var rc_domain = cookie.domain.replace(/^(\.?www\.|\.)/, ''); + // hold specific cookie(s) from remove_cookies domains + if ((rc_domain in remove_cookies_select_hold) && remove_cookies_select_hold[rc_domain].includes(cookie.name)) { + continue; // don't remove specific cookie + } + // drop only specific cookie(s) from remove_cookies domains + if ((rc_domain in remove_cookies_select_drop) && !(remove_cookies_select_drop[rc_domain].includes(cookie.name))) { + continue; // only remove specific cookie + } + // hold on to consent-cookie + if (cookie.name.match(/(consent|^optanon)/i)) { + continue; + } + } + cookie.domain = cookie.domain.replace(/^\./, ''); + cookie_remove_options = { + url: (cookie.secure ? "https://" : "http://") + cookie.domain + cookie.path, + name: cookie.name + }; + if (storeId !== 'null') + cookie_remove_options.storeId = storeId; + ext_api.cookies.remove(cookie_remove_options); + } + }); + } + }); + }) +} + +function clear_cookies() { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let tabId = tabs[0].id; + if (ext_manifest_version === 2) { + ext_api.tabs.executeScript({ + file: 'options/clearCookies.js', + runAt: 'document_start' + }, function (res) { + if (ext_api.runtime.lastError || res[0]) { + return; + } + }); + } else if (ext_manifest_version === 3) { + ext_api.scripting.executeScript({ + target: { + tabId: tabId + }, + files: ['options/clearCookies.js'] + }).catch(err => false); + } + ext_api.tabs.update(tabId, { + url: tabs[0].url + }); + } + }); +} + +var chrome_scheme = 'light'; +ext_api.runtime.onMessage.addListener(function (message, sender) { + if (message.request === 'clear_cookies') { + clear_cookies(); + } + // clear cookies for domain + if (message.request === 'clear_cookies_domain' && message.data) { + remove_cookies_fn(message.data.domain, true); + } + if (message.request === 'custom_domain' && message.data && message.data.domain) { + let custom_domain = message.data.domain; + let group = message.data.group; + if (group) { + let nofix_groups = ['###_au_nomedia', '###_beehiiv', '###_fi_alma_talent', '###_fi_kaleva', '###_ghost', '###_it_citynews', '###_nl_vmnmedia', '###_se_gota_media', '###_substack_custom', '###_uk_aspermont', '###_usa_cherryroad']; + if (!custom_flex_domains.includes(custom_domain)) { + if (!nofix_groups.includes(group)) { + if (custom_flex[group]) + custom_flex[group].push(custom_domain); + else + custom_flex[group] = [custom_domain]; + custom_flex_domains.push(custom_domain); + if (enabledSites.includes(group)) { + if (!enabledSites.includes(custom_domain)) + enabledSites.push(custom_domain); + let rules = Object.values(defaultSites).filter(x => x.domain === group)[0]; + if (rules) { + if (rules.hasOwnProperty('exception')) { + let exception_rule = rules.exception.filter(x => custom_domain === x.domain || (typeof x.domain !== 'string' && x.domain.includes(custom_domain))); + if (exception_rule.length) + rules = exception_rule[0]; + } + if (group === '###_de_madsack') { + if (!set_var_sites.includes(custom_domain)) + set_var_sites.push(custom_domain); + } + } else + rules = Object.values(customSites).filter(x => x.domain === group)[0]; + if (rules) { + customFlexAddRules(custom_domain, rules); + } + } else if (disabledSites.includes(group)) { + if (!disabledSites.includes(custom_domain)) + disabledSites.push(custom_domain); + } + } else + nofix_sites.push(custom_domain); + } + } else + custom_flex_not_domains.push(custom_domain); + } + if (message.request === 'site_switch') { + site_switch(); + } + if (message.request === 'check_sites_updated') { + check_sites_updated(sites_updated_json_online); + } + if (message.request === 'clear_sites_updated') { + clear_sites_updated(); + } + if (message.request === 'check_update') { + check_update(); + } + if (message.request === 'popup_show_toggle') { + ext_api.tabs.query({ + active: true, + currentWindow: true + }, function (tabs) { + if (tabs && tabs[0] && /^http/.test(tabs[0].url)) { + let currentUrl = tabs[0].url; + let domain; + let isExcludedSite = matchUrlDomain(excludedSites, currentUrl); + if (!isExcludedSite) { + let isDefaultSite = matchUrlDomain(defaultSites_domains, currentUrl); + let isCustomSite = matchUrlDomain(customSites_domains, currentUrl); + let isUpdatedSite = matchUrlDomain(updatedSites_domains_new, currentUrl); + let isCustomFlexSite = matchUrlDomain(custom_flex_domains, currentUrl); + domain = isDefaultSite || isCustomSite || isUpdatedSite || isCustomFlexSite; + if (domain) + ext_api.runtime.sendMessage({ + msg: "popup_show_toggle", + data: { + domain: domain, + enabled: enabledSites.includes(domain) + } + }) + } + } + }) + } + if (message.request === 'refreshCurrentTab') { + ext_api.tabs.reload(sender.tab.id, {bypassCache: true}); + } + + if (message.request === 'getExtFetch' && message.data) { + message.data.html = ''; + fetch(message.data.url, message.data.headers) + .then(response => { + if (response.ok) { + response.text().then(html => { + let json_key = message.data.json_key; + if (json_key) { + try { + let json = JSON.parse(html); + if (json) + message.data.html = getNestedKeys(json, json_key); + } catch (err) { + console.log(err); + } + } else + message.data.html = html; + ext_api.tabs.sendMessage(sender.tab.id, { + msg: "showExtFetch", + data: message.data + }); + }) + } + }) + } + + function sendArticleSrc(tab_id, message) { + if (ext_manifest_version === 3 || typeof browser === 'object') + ext_api.tabs.sendMessage(tab_id, { + msg: "showExtSrc", + data: message.data + }).catch(err => false); + else + ext_api.tabs.sendMessage(tab_id, { + msg: "showExtSrc", + data: message.data + }); + } + + // manifest v3: offscreen + let OFFSCREEN_DOCUMENT_PATH = '/options/offscreen.html'; + async function sendMessageToOffscreenDocument(request, data) { + if (!(await hasOffscreenDocument())) { + await ext_api.offscreen.createDocument({ + url: OFFSCREEN_DOCUMENT_PATH, + reasons: [ext_api.offscreen.Reason.DOM_PARSER], + justification: 'Parse DOM' + }).catch(err => false); + } + ext_api.runtime.sendMessage({request, data}).catch(err => false); + } + + if (message.request === 'getExtSrc' && message.data) { + message.data.html = ''; + function getArticleSrc(message) { + let url_src = message.data.url_src || message.data.url; + fetch(url_src, {headers: message.data.headers}) + .then(response => { + if (response.ok) { + response.text().then(html => { + let recursive; + if (message.data.url.startsWith('https://archive.')) { + if (url_src.includes('/https')) { + if (html.includes('' + json_text.map(x => (typeof x === 'string') ? x : (x.children ? x.children.map(y => y.text).join('') : x.text || x.innerHTML)).join('
') + '
' + DOMPurify.sanitize(par.content, dompurify_options) + '
', 'text/html'); + elem = doc.querySelector('p'); + if (par.type === 'subheadline1') + elem.style = 'font-weight: bold;'; + } + } else if (par.type = 'x-im/content-part') { + if (par.elements) { + elem = document.createElement('p'); + for (let item of par.elements) { + if (item.content) { + let doc = parser.parseFromString('' + DOMPurify.sanitize(item.content, dompurify_options) + '
', 'text/html'); + sub_elem = doc.querySelector('p'); + elem.appendChild(sub_elem); + } + } + } + } else if (par.type.match(/^x-im\//)) { + if (par.url) { + if (par.url.startsWith('https://twitter.com/')) { + elem = document.createElement('p'); + let sub_elem = document.createElement('a'); + sub_elem.href = elem.innerText = par.url; + sub_elem.target = '_blank'; + elem.appendChild(sub_elem); + } else { + elem = document.createElement('iframe'); + elem.src = par.url; + elem.style = 'height: ' + article.offsetWidth + 'px; width: ' + article.offsetWidth + 'px;'; + } + } + } + if (elem) + article.appendChild(elem); + } + } catch (err) { + console.log(err); + } + } + } + } + }, 1000); + let ads = 'div[class*="ads-container"], div.adblock-warning'; + hideDOMStyle(ads); +} + +else if (matchDomain('vn.at')) { + if (window.location.href.match(/\.vn\.at\/.+\/\d{4}\//)) { + let paywall = document.querySelector('div.paywalled-content'); + if (paywall) { + csDoneOnce = true; + let par = paywall.querySelector('p'); + if (!par) { + refreshCurrentTab_bg(); + } else { + let lazy_images = document.querySelectorAll('img[src^="data:image/"][lazy-src]'); + for (let elem of lazy_images) { + elem.src = elem.getAttribute('lazy-src'); + } + } + } else + refreshCurrentTab_bg(); + } +} + +else if (matchDomain('vol.at')) { + if (!window.location.pathname.match(/\/amp\/?$/)) { + window.setTimeout(function () { + let paywall = document.querySelector('div.vodl-region-article__premium-content'); + if (paywall && dompurify_loaded) { + paywall.removeAttribute('class'); + if (!paywall.hasChildNodes()) { + let json_script = document.querySelector('script#externalPostDataNode'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + let json_text = json.content.data.post.content; + let parser = new DOMParser(); + let doc = parser.parseFromString('' + DOMPurify.sanitize(par.text, dompurify_options) + '
', 'text/html'); + elem = doc.querySelector('p'); + if (par_type === 'Heading') + elem.style = 'font-weight: bold; font-size: 1.85rem;'; + } + } else if (['Photo', 'VideoFigaro'].includes(par_type)) { + if (par.thumbnail) + par = par.thumbnail; + if (par.image) { + elem = document.createElement('p'); + elem.className = 'fig-paragraph'; + let img = makeFigure(par.image.url, par.caption.replace(/<[^<]*>/g, '') + ' ' + par.credit, '', {class: 'fig-media__legend'}); + elem.append(img, document.createElement('br')); + } + } else if (par_type === 'Frame') { + if (par.text) { + elem = document.createElement('p'); + elem.className = 'fig-paragraph'; + let title = document.createElement('p'); + title.innerText = par.title; + title.className = 'fig-paragraph'; + title.style = 'font-weight: bold;'; + let doc = parser.parseFromString('')); + let json_text = json[0]; + if (json_text) { + let parser = new DOMParser(); + let doc = parser.parseFromString('
' + DOMPurify.sanitize(item, dompurify_options) + '
', 'text/html'); + elem = html.querySelector('p'); + let error_iframes = elem.querySelectorAll('iframe[allow*="fullscreen"][allowfullscreen]'); + for (let iframe of error_iframes) + iframe.removeAttribute('allowfullscreen'); + if (!['p', 'subhead', 'legacy-ml'].includes(type)) { + console.log(type); + console.log(item); + } + } + window.setTimeout(function () { + if (elem) + intro.parentNode.appendChild(elem); + }, 500); + } + } + } + } catch (err) { + console.log(err); + } + } + } + } + } + let ads = 'div.ad'; + hideDOMStyle(ads); +} + +else if (matchDomain('businesspost.ie')) { + function bpie_main() { + if ($) { + let article_id_dom = document.querySelector('article[id]'); + let article_id; + if (article_id_dom) + article_id = article_id_dom.id; + if (article_id) { + let bp_ajaxurl = 'https://www.businesspost.ie/wp-admin/admin-ajax.php'; + let data_ajax = { + action: 'fetch_article_content', + type: 'POST', + data: { + id: article_id + }, + dataType: 'json', + contentType: 'application/json' + }; + $.ajax({ + type: 'POST', + url: bp_ajaxurl, + data: data_ajax, + success: function (data) { + window.postMessage({type: 'from_page', data: data}); + } + }); + } + } else + refreshCurrentTab(); + } + csDoneOnce = true; + window.setTimeout(function () { + let paywall = document.querySelector('div#bp_paywall_content'); + let article_id_dom = document.querySelector('article[id]'); + let article_id; + if (article_id_dom) + article_id = article_id_dom.id; + if (paywall || article_id) { + removeDOMElement(paywall); + insert_script(bpie_main); + } + }, 1500); +} + +else if (matchDomain('decanter.com')) { + let paywall = document.querySelector('div[id^="react_subscriber_content_"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let data = document.querySelector('div[data-dom-id^="react_subscriber_content_"][data-props]'); + if (data) { + try { + let json = JSON.parse(data.getAttribute('data-props')); + if (json && json.content) { + let content = decode_utf8(atob(json.content)); + let parser = new DOMParser(); + let doc = parser.parseFromString('' + DOMPurify.sanitize(par.content) + '
', 'text/html'); + par_new = doc.querySelector('p'); + } + } else if (par.type === 'interstitial_link') { + if (par.url && par.content) { + par_new = document.createElement('p'); + int_link = document.createElement('a'); + int_link.href = par.url; + int_link.innerText = par.content; + par_new.appendChild(int_link); + } + } else if (par.type === 'image') { + if (par.url) { + let caption_text = par.caption; + if (par.credits && par.credits.by && par.credits.by[0] && par.credits.by[0].name) + caption_text += ' - ' + par.credits.by[0].name; + par_new = makeFigure(par.url, caption_text); + } + } else if (par.type === 'raw_html') { + let doc = parser.parseFromString('' + DOMPurify.sanitize(par.content) + '
', 'text/html'); + par_new = doc.querySelector('p'); + } + } else if (par.image_type) { + if (par.url) { + let caption_text = par.caption; + if (par.credits && par.credits.by && par.credits.by[0] && par.credits.by[0].byline) + caption_text += ' - ' + par.credits.by[0].byline; + par_new = makeFigure(par.url, caption_text, {alt: par.alt_text}, {'class': 'article__image-caption'}); + par_new.className = 'article__image'; + par_new.style = 'width: 75%; margin-left: auto; margin-right: auto;'; + } + } else if (par.type === 'custom_embed') { + if (par.subtype === 'custom-image' && par.embed && par.embed.config) { + let config = par.embed.config; + if (config.image_src) { + let caption_text = config.image_caption; + if (config.image_credit) + caption_text += ' ' + config.image_credit; + par_new = makeFigure(config.image_src, caption_text, {}, {'class': 'article__image-caption'}); + par_new.className = 'article__image'; + } + } + } else if (par.raw_oembed) { + if (par.raw_oembed.html) { + let doc = parser.parseFromString('' + DOMPurify.sanitize(par.raw_oembed.html, dompurify_options) + '
', 'text/html'); + par_new = doc.querySelector('p'); + } + } else if (par.type === 'list') { + if (par.items) { + par_new = document.createElement('ul'); + for (let item of par.items) { + let li = document.createElement('li'); + let doc = parser.parseFromString('' + DOMPurify.sanitize(item.content) + '', 'text/html'); + let span = doc.querySelector('span'); + li.appendChild(span); + par_new.appendChild(li); + } + } + } else if (!['quote', 'raw_html'].includes(par.type)) { + console.log(par); + } + if (par_new) + article.appendChild(par_new); + } + if (section) { + section.parentNode.removeAttribute('style'); + article.appendChild(section); + } + } + } catch (err) { + console.log(err); + } + } + let fusion_script = document.querySelector('script#fusion-metadata'); + if (fusion_script) { + paywall.classList.remove('paywall'); + if (fusion_script.text.includes('Fusion.globalContent=')) { + fusionGetContent(fusion_script.text); + } else { + let url = window.location.href.split(/[#\?]/)[0]; + fetch(url) + .then(response => { + if (response.ok) { + response.text().then(html => { + if (html.includes('Fusion.globalContent=')) + fusionGetContent(html); + }); + } + }); + } + } else + amp_redirect(paywall_sel, '', window.location.pathname + '?outputType=amp'); + } + } + let ads = 'div.ad, div.ad-inner, div.ad-unit, div#below-toprail, div[id^="taboola"]'; + hideDOMStyle(ads); +} + +else if (matchDomain('ajc.com')) { + let paygate = document.querySelector('div.story-paygate_placeholder'); + if (paygate) + paygate.removeAttribute('class'); + let video_blocker = document.querySelector('div.video-blocker'); + removeDOMElement(video_blocker); +} + +else if (matchDomain('americanbanker.com') || matchDomain(usa_arizent_custom_domains)) { + let inline_gate = document.querySelector('.inline-gate'); + if (inline_gate) { + inline_gate.classList.remove('inline-gate'); + let inline_gated = document.querySelectorAll('.inline-gated'); + for (let elem of inline_gated) + elem.classList.remove('inline-gated'); + } +} + +else if (matchDomain('artnet.com')) { + if (window.location.pathname.endsWith('/amp-page')) { + amp_unhide_subscr_section(); + } else { + let body_hidden = document.querySelector('.article-body'); + if (body_hidden) + body_hidden.style = 'display:block;'; + let banner = document.querySelector('div[id^="issuem-leaky-paywall-"]'); + removeDOMElement(banner); + } +} + +else if (matchDomain('asia.nikkei.com')) { + let paywall = document.querySelector('div#paywall-offer'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article = document.querySelector('div#article-body-preview > div'); + if (article) { + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.text); + if (json && json.props.pageProps.data.body) { + let json_text = json.props.pageProps.data.body; + if (!json_text.includes('missing photo: ' + p1 + '
'; + if (contributorId) + result = '')) { + let split = json_text.split(/(
)/);
+ json_text = split[1] + split[2];
+ };
+ return json_text;
+ }
+ };
+ getJsonUrl(paywall_sel, {rm_class: 'c-blog-post__body--locked'}, 'div.c-blog-post__content', art_options);
+ } else {
+ let img_dark = document.querySelector('div.c-hero-article__image-img.o-image');
+ if (img_dark)
+ img_dark.removeAttribute('class');
+ }
+ let modal = document.querySelector('div#emailsub-modal');
+ removeDOMElement(modal);
+ let noscroll = document.querySelector('body.modal-open');
+ if (noscroll)
+ noscroll.classList.remove('modal-open');
+}
+
+else if (matchDomain('theamericanscholar.org')) {
+ getJsonUrl('div.ssagk-form', '', 'div.post_summary');
+}
+
+else if (matchDomain('theatlantic.com')) {
+ let banners = 'aside#paywall, div[class^="LostInventoryMessage_"]';
+ hideDOMStyle(banners);
+}
+
+else if (matchDomain('thebulletin.org')) {
+ getJsonUrl('div.article--cropped', '', 'div#body-copy', {art_append: 1});
+}
+
+else if (matchDomain('thedailybeast.com')) {
+ let paywall = document.querySelector('div.Body__paywall-container');
+ if (paywall) {
+ removeDOMElement(paywall);
+ let json_script = document.querySelector('script[displayName="initialState"]');
+ if (json_script) {
+ let json_str = json_script.text.substring(json_script.textContent.indexOf('{'));
+ try {
+ let json = JSON.parse(json_str);
+ if (json.body) {
+ let pars = json.body.sections;
+ let cards = json.body.cards;
+ if (pars) {
+ let mobile_doc = document.querySelector('div.Mobiledoc');
+ if (mobile_doc) {
+ let mobile_doc_text = mobile_doc.innerText.replace(/(\r|\n)/g, '');
+ for (let elem of pars) {
+ let par_elem = '';
+ if (elem[0] === 1) {
+ if (elem[1] === 'p') {
+ let par = '';
+ for (let part of elem[2])
+ par += part[3];
+ if (par && !mobile_doc_text.includes(par)) {
+ par_elem = document.createElement('p');
+ par_elem.innerText = par;
+ }
+ }
+ } else if (elem[0] === 10) {
+ if (cards && cards[elem[1]]) {
+ let card = cards[elem[1]];
+ if (card[0] === 'pt-image') {
+ par_elem = document.createElement('p');
+ let par_fig = makeFigure(card[1].url, card[1].title + ' ' + card[1].credit);
+ par_elem.appendChild(par_fig);
+ } else if (card[0] === 'pt-fancy-links-card') {
+ par_elem = document.createElement('p');
+ let par_link = document.createElement('a');
+ par_link.href = card[1].links;
+ par_link.innerText = card[1].linksData[0].long_headline;
+ par_elem.appendChild(par_link);
+ }
+ }
+ }
+ if (par_elem)
+ mobile_doc.appendChild(par_elem);
+ }
+ }
+ }
+ }
+ csDoneOnce = true;
+ } catch (err) {
+ console.log(err);
+ }
+ }
+ }
+ let ads = document.querySelectorAll('div > div.tdb-ads-block');
+ for (let ad of ads)
+ hideDOMElement(ad.parentNode);
+}
+
+else if (matchDomain('thediplomat.com')) {
+ if (matchDomain('magazine.thediplomat.com')) {
+ let article = document.querySelector('article > section.h-96');
+ if (article)
+ article.classList.remove('h-96');
+ let fade = 'aside.bg-gradient-to-b';
+ hideDOMStyle(fade, 2);
+ }
+ let ads = 'aside.td-ad-container--labeled, div[data-actirise]';
+ hideDOMStyle(ads);
+}
+
+else if (matchDomain('theglobeandmail.com')) {
+ let lazy_images = document.querySelectorAll('img[src^="data:image/"][data-src]');
+ for (let elem of lazy_images)
+ elem.src = elem.getAttribute('data-src');
+ let ads = 'div.c-ad--base';
+ hideDOMStyle(ads);
+}
+
+else if (matchDomain(['thehindu.com', 'thehindubusinessline.com'])) {
+ if (!window.location.pathname.endsWith('/amp/')) {
+ let counter = '#test';
+ let ads = 'div.ad, div.article-ad, div.dfp-ad, div#paywallbox, div[id^="piano-art-"]';
+ hideDOMStyle(counter + ', ' + ads);
+ } else {
+ let ads = '[class^="height"], [class^="advt"], [id^="piano"]';
+ hideDOMStyle(ads);
+ }
+ function hindu_main() {
+ if (window) {
+ window.Adblock = false;
+ window.isNonSubcribed = false;
+ }
+ }
+ insert_script(hindu_main);
+}
+
+else if (matchDomain('theimpression.com')) {
+ let paywall = document.querySelector('div#modalpostsubscribe');
+ if (paywall) {
+ let blureffect = document.querySelectorAll('div.blureffect');
+ for (let elem of blureffect)
+ elem.classList.remove('blureffect');
+ }
+}
+
+else if (matchDomain(['thejuggernaut.com', 'jgnt.co'])) {
+ let paywall = pageContains('div.font-mono', /(Read this article and many more by subscribing today|Join today to read the full story)/);
+ if (paywall.length) {
+ removeDOMElement(paywall[0].parentNode);
+ let json_script = document.querySelector('script#__NEXT_DATA__');
+ if (json_script) {
+ try {
+ let json = JSON.parse(json_script.text);
+ if (json && json.props.pageProps.post.fields) {
+ let url_next = json.query.slug;
+ if (url_next && !window.location.pathname.includes(url_next))
+ refreshCurrentTab();
+ let fields = json.props.pageProps.post.fields;
+ let pars = fields.fullText ? fields.fullText.content : fields.textEssay.fields.body.content;
+ window.setTimeout(function () {
+ let article = document.querySelector('div[class*="opacity-"]');
+ if (article) {
+ article.innerHTML = '';
+ article.removeAttribute('class');
+ let fade = document.querySelectorAll('div.bg-gradient-to-b');
+ for (let elem of fade)
+ elem.removeAttribute('class');
+ let modal = document.querySelector('div#headlessui-portal-root');
+ removeDOMElement(modal);
+ let par_first = true;
+ function attach_text(sub_item, elem) {
+ if (sub_item.value) {
+ let sub_elem = document.createElement('span');
+ sub_elem.innerText = sub_item.value;
+ if (sub_item.marks && sub_item.marks.length) {
+ let style = '';
+ for (let mark of sub_item.marks) {
+ if (mark.type === 'bold')
+ style += 'font-weight: bold;';
+ else if (mark.type === 'italic')
+ style += 'font-style: italic;';
+ else if (mark.type === 'underline')
+ style += 'text-decoration: underline;';
+ }
+ sub_elem.style = style;
+ }
+ elem.appendChild(sub_elem);
+ }
+ }
+ function attach_hyperlink(sub_item, elem) {
+ if (sub_item.content && sub_item.content[0] && sub_item.content[0].value && sub_item.data && sub_item.data.uri) {
+ let sub_elem = document.createElement('a');
+ sub_elem.href = sub_item.data.uri;
+ sub_elem.innerText = sub_item.content[0].value;
+ if (!matchUrlDomain(['thejuggernaut.com', 'jgnt.co'], sub_item.data.uri))
+ sub_elem.target = '_blank';
+ sub_elem.style = 'text-decoration: underline;';
+ elem.appendChild(sub_elem);
+ }
+ }
+ function attach_paragraph(par, elem) {
+ if (par.content && par.content.length) {
+ let span_elem = document.createElement('span');
+ for (let item of par.content) {
+ if (item.nodeType === 'text') {
+ attach_text(item, span_elem);
+ } else if (item.nodeType === 'hyperlink') {
+ attach_hyperlink(item, span_elem);
+ } else
+ console.log(item);
+ }
+ elem.appendChild(span_elem);
+ }
+ }
+ for (let par of pars) {
+ let elem = document.createElement('p');
+ if (par.nodeType.match(/^(paragraph|heading-\d)$/)) {
+ attach_paragraph(par, elem);
+ } else if (['blockquote'].includes(par.nodeType)) {
+ if (par.content && par.content.length) {
+ for (let item of par.content) {
+ if (item.nodeType === 'paragraph') {
+ elem.style = 'margin: 0px 20px; font-style: italic;';
+ attach_paragraph(item, elem);
+ } else
+ console.log(item);
+ }
+ }
+ } else if (par.nodeType === 'hr') {
+ elem.appendChild(document.createElement('hr'));
+ } else if (par.nodeType === 'embedded-asset-block') {
+ if (!par_first) {
+ if (par.data && par.data.target && par.data.target.fields) {
+ if (par.data.target.fields.file && par.data.target.fields.file.url) {
+ let figure = makeFigure(par.data.target.fields.file.url, par.data.target.fields.description);
+ elem.appendChild(figure);
+ }
+ }
+ } else
+ par_first = false;
+ } else if (par.nodeType === 'unordered-list') {
+ if (par.content && par.content.length) {
+ let ul = document.createElement('ul');
+ for (let item of par.content) {
+ if (item.nodeType === 'list-item') {
+ if (item.content) {
+ for (let sub_item_par of item.content) {
+ if (sub_item_par.nodeType === 'paragraph') {
+ let li = document.createElement('li');
+ attach_paragraph(sub_item_par, li);
+ ul.appendChild(li);
+ }
+ }
+ }
+ } else
+ console.log(item);
+ }
+ elem.appendChild(ul);
+ }
+ } else {
+ console.log(par);
+ }
+ if (elem.hasChildNodes()) {
+ article.appendChild(document.createElement('br'));
+ article.appendChild(elem);
+ }
+ }
+ }
+ }, 1000);
+ } else
+ refreshCurrentTab();
+ } catch (err) {
+ console.log(err);
+ }
+ }
+ }
+}
+
+else if (matchDomain('thelampmagazine.com')) {
+ let paywall = document.querySelector('div.paywall-gradient');
+ if (paywall) {
+ paywall.removeAttribute('class');
+ let banner = document.querySelector('section.p-8');
+ removeDOMElement(banner);
+ }
+ let login = document.querySelectorAll('a.js-login-modal-trigger');
+ for (let elem of login) {
+ elem.removeAttribute('class');
+ let url_search = '/search?q=' + elem.innerText.replace(/\s/g, '+');
+ elem.href = url_search;
+ elem.onclick = x => window.location.href = url_search;
+ }
+}
+
+else if (matchDomain('thenewatlantis.com')) {
+ let article_gated = document.querySelector('.article-gated');
+ if (article_gated)
+ article_gated.classList.remove('article-gated');
+}
+
+else if (matchDomain('thenewslens.com')) {
+ let paywall = document.querySelector('div.article-mask-box');
+ if (paywall) {
+ removeDOMElement(paywall);
+ let json_script = getArticleJsonScript();
+ if (json_script) {
+ let json = JSON.parse(json_script.text);
+ if (json) {
+ let json_text = json.articleBody;
+ let article = document.querySelector('section.article-body');
+ if (json_text && article) {
+ let article_text = article.innerText.replace(/\n/g, '');
+ let split = json_text.split('。');
+ for (let elem of split) {
+ if (!elem.includes('(function(') && !article_text.includes(elem)) {
+ let par_new = document.createElement('p');
+ par_new.innerText = elem + '。';
+ article.append(par_new);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+else if (matchDomain('thepointmag.com')) {
+ let overlay = document.querySelectorAll('div.overlay, div#tpopup-');
+ removeDOMElement(...overlay);
+}
+
+else if (matchDomain('thequint.com')) {
+ window.setTimeout(function () {
+ let lock = document.querySelector('div > img[alt^="lock"]');
+ if (lock && dompurify_loaded) {
+ lock.removeAttribute('alt');
+ let paywall = document.querySelector('div#paywall-widget');
+ if (paywall) {
+ removeDOMElement(paywall);
+ let article = document.querySelector('div.story-element');
+ if (article) {
+ let article_new = getArticleQuintype();
+ if (article_new && article.parentNode)
+ article.parentNode.replaceChild(article_new, article);
+ }
+ }
+ let body_hidden = document.querySelector('div#story-body-wrapper');
+ if (body_hidden) {
+ body_hidden.removeAttribute('class');
+ body_hidden.removeAttribute('style');
+ }
+ function thequint_unhide(node) {
+ node.removeAttribute('style');
+ }
+ waitDOMAttribute('div#story-body-wrapper', 'DIV', 'style', thequint_unhide, true);
+ }
+ }, 4000);
+}
+
+else if (matchDomain('thespectator.com')) {
+ let div_hidden = document.querySelector('div.ev-meter-content-class');
+ if (div_hidden)
+ div_hidden.classList.remove('ev-meter-content-class');
+}
+
+else if (matchDomain('theweek.com')) {
+ let paywall = document.querySelector('div.kiosq-main-layer');
+ removeDOMElement(paywall);
+ let locker = document.querySelector('div.paywall-locker');
+ if (locker)
+ locker.classList.remove('paywall-locker');
+}
+
+else if (matchDomain('thewrap.com')) {
+ getJsonUrl('div#zephr-payment-form-root', '', 'div.entry-content', {art_append: 1});
+ let fade = document.querySelector('div.content-area div[style*="background-image: linear-gradient"]');
+ removeDOMElement(fade);
+}
+
+else if (matchDomain('timeshighereducation.com')) {
+ let paywall = document.querySelector('div.paywall-active');
+ if (paywall) {
+ removeDOMElement(paywall);
+ let fade = document.querySelectorAll('div.paywall-fade');
+ for (let elem of fade)
+ elem.classList.remove('paywall-fade');
+ }
+ let hidden_images = document.querySelectorAll('img.b-lazy[src^="data:image/"][data-src]');
+ for (let hidden_image of hidden_images) {
+ hidden_image.setAttribute('src', hidden_image.getAttribute('data-src'));
+ hidden_image.classList.remove('b-lazy');
+ hidden_image.parentElement.classList.remove('media--loading');
+ }
+ let ads = 'div[data-ad-page], section.block-the-dfp';
+ hideDOMStyle(ads);
+}
+
+else if (matchDomain(timesofindia_domains)) {
+ if (matchDomain('epaper.indiatimes.com')) {
+ let blocker = document.querySelector('div.epaperBlockerWrap');
+ removeDOMElement(blocker);
+ if (window.location.pathname.startsWith('/english-news-paper-today-toi-print-edition/')) {
+ let paywall = document.querySelector('section#blocker');
+ if (paywall) {
+ let fq = document.querySelector('section#fq');
+ removeDOMElement(paywall, fq);
+ let json_script = getArticleJsonScript();
+ if (json_script) {
+ let json = JSON.parse(json_script.text);
+ if (json) {
+ let json_text = json.articleBody;
+ let content = document.querySelector('section[type="synopsis"]');
+ if (json_text && content) {
+ let article_new = document.createElement('p');
+ article_new.innerText = breakText(json_text);
+ content.innerHTML = '';
+ addStyle('[type="synopsis"]::after {background: none !important;}');
+ content.appendChild(article_new);
+ }
+ }
+ }
+ }
+ }
+ } else {
+ let url = window.location.href;
+ let region_block = document.querySelector('div.plan-popup.active');
+ if (region_block) {
+ removeDOMElement(region_block);
+ let overflow = document.querySelector('html[style]');
+ if (overflow)
+ overflow.removeAttribute('style');
+ }
+ if (!window.location.pathname.includes('/amp_')) {
+ let paywall = document.querySelector('div[id^="story-blocker"]');
+ if (paywall && dompurify_loaded) {
+ removeDOMElement(paywall);
+ let json_script = getArticleJsonScript();
+ if (json_script) {
+ try {
+ let json = JSON.parse(json_script.text);
+ if (json) {
+ let json_text = json.articleBody;
+ let article = document.querySelector('div.paywall');
+ if (json_text && article) {
+ if (!json_text.match(/\s(src|href)=/))
+ json_text = breakText(json_text).replace(/\n\n/g, '
');
+ window.setTimeout(function () {
+ let parser = new DOMParser();
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html'); + elem = content_new.querySelector('p'); + if (par.value) + elem.style = 'font-weight: bold;'; + } + } else if (type === 'picture') { + if (img_first) + img_first = false; + else { + let caption_text = pars[par.caption]; + if (par.credit) + caption_text += ' (' + pars[par.credit] + ')'; + elem = makeFigure(pars[par.src], caption_text); + elem.className = 'dn-image'; + } + } else if (type === 'factbox') { + elem = document.createElement('p'); + if (par.title) + elem.innerText = pars[par.title]; + if (par.html) { + let content_new = parser.parseFromString('' + DOMPurify.sanitize(par.innerHTML.replace(/(<\/?mark([^>]+)?>)/g, ''), dompurify_options) + '', 'text/html'); + par_new = doc.querySelector('p'); + if (par_new) { + let app_links = par_new.querySelectorAll('a[data-canonical-url][href^="wsj:"], a[data-canonical-url]:not([href])'); + for (let elem of app_links) + elem.href = elem.getAttribute('data-canonical-url'); + } + } else if (!par_first && par.tagName === 'panel') { + if (media_items[image_nr]) { + let media_item = media_items[image_nr]; + if (media_item.type === 'image' && media_item['manifest-url']) { + par_new = makeFigure(media_item['manifest-url'], media_item.caption + ' PHOTO: ' + media_item.credit.toUpperCase(), {style: 'width: 100%;'}); + } else if (media_item.type === 'video' && media_item.sourceid) { + par_new = document.createElement('p'); + par_new.className = par_class; + let title = document.createTextNode(media_item.title); + let video = document.createElement('iframe'); + video.src = schema_data.find(x => x['@type'] === 'VideoObject' && x.embedUrl.includes(media_item.sourceid)).embedUrl; + video.style = 'width: ' + article.offsetWidth + 'px; height: ' + article.offsetWidth * 3 / 4 + 'px;'; + let caption = document.createTextNode(media_item.caption + ' ' + media_item.credit); + par_new.append(title, video, caption); + } else if (media_item.type === 'youtube' && media_item['sourceid']) { + par_new = document.createElement('iframe'); + par_new.src = 'https://www.youtube.com/embed/' + media_item['sourceid']; + par_new.style = 'width: 100%; height: 400px;'; + } else { + console.log(media_item); + } + image_nr++; + } + } + if (par_new) + article.appendChild(par_new); + } + } + } + } catch (err) { + console.log(err); + } + } + } + } + } + let ads = 'div.wsj-ad, div.adWrapper, div.css-xgokil-Box, div#cx-article-cover-overlay'; + hideDOMStyle(ads); +} + +else if (matchDomain('zerohedge.com')) { + window.setTimeout(function () { + let paywall = document.querySelector('div[class^="PremiumOverlay_container__"]'); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let json_script = document.querySelector('script#__NEXT_DATA__'); + if (json_script) { + try { + let json = JSON.parse(json_script.innerText); + if (json && json.props.pageProps.node.body) { + let article_new = parseHtmlEntities(decode_utf8(atob(json.props.pageProps.node.body.substring(21)))); + let article = document.querySelector('div[class^="NodeContent_mainContent__"'); + if (article) { + article.innerHTML = ''; + let parser = new DOMParser(); + let doc = parser.parseFromString('
Bypass Paywalls Clean
- custom sites, check update & setCookie opt-in
custom sites opt-in
+If you want to enable custom sites and also have the option to remove cookies/block general paywall-scripts of 'unlisted' sites: +
custom sites enabled:
+You can also just request permissions for the custom sites you added yourself.
+check update opt-in
+Check for update of version (on startup and when opening options): +
check update enabled:
+setCookie opt-in
+For some sites a necessary cookie has to be set (this cookie doesn't contain any personal information about the user or device):
+ None
setCookie opt-in enabled:
++