From 629b253ee2e0c3bf86d0c38ecc549da020db5e77 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 12 Feb 2020 18:55:28 +0100 Subject: [PATCH] Add Leeuwarder Courant & Dagblad van het Noorden Local Dutch newspapers. --- README.md | 3 +++ background.js | 2 ++ contentScript.js | 8 ++++++++ sites.json | 2 ++ 4 files changed, 15 insertions(+) diff --git a/README.md b/README.md index d405837..537d537 100644 --- a/README.md +++ b/README.md @@ -157,10 +157,12 @@ [PZC](https://www.pzc.nl) - [Stentor](https://www.destentor.nl) - [Tubantia](https://tubantia.nl)\ +[Dagblad van het Noorden](https://www.dvhn.nl) - [De Morgen](https://www.demorgen.be) - [De Tijd](https://www.tijd.be) - [Groene Amsterdammer](https://www.groene.nl) - [Het Financieel Dagblad](https://fd.nl) - +[Leeuwarder Courant](https://www.lc.nl) - [NRC Handelsblad](https://www.nrc.nl) - [Parool](https://www.parool.nl) - [Telegraaf](https://www.telegraaf.nl) - @@ -237,6 +239,7 @@ You can submit a request for a new website [here](https://github.com/magnolia123 ### Troubleshooting * This add-on works best alongside [uBlock Origin](https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/). * If a site doesn't work try turning off uBlock and refreshing. +* Make sure the (new) site is checked under Options. ### Changelog * Visit the [releases page](https://github.com/magnolia1234/bypass-paywalls-firefox-clean/releases). diff --git a/background.js b/background.js index 7f961f9..821b848 100644 --- a/background.js +++ b/background.js @@ -22,6 +22,7 @@ var allow_cookies = [ 'couriermail.com.au', 'dailytelegraph.com.au', 'dn.se', +'dvhn.nl', 'elmercurio.com', 'fd.nl', 'folha.uol.com.br', @@ -32,6 +33,7 @@ var allow_cookies = [ 'heraldsun.com.au', 'kleinezeitung.at', 'lemonde.fr', +'lc.nl', 'lrb.co.uk', 'mexiconewsdaily.com', 'modernhealthcare.com', diff --git a/contentScript.js b/contentScript.js index fa7dfde..0e20c59 100644 --- a/contentScript.js +++ b/contentScript.js @@ -424,6 +424,14 @@ if (window.location.href.indexOf("thesaturdaypaper.com.au") !== -1) { expand_button.click(); } +if (window.location.href.indexOf("lc.nl") !== -1 || window.location.href.indexOf("dvhn.nl") !== -1) { + document.addEventListener('DOMContentLoaded', () => { + const preview = document.querySelector('.preview'); + if (preview) + location.href = location.href + '?harvest_referrer=https%3A%2F%2Fnos.nl%2Fplus.html'; + }); +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/sites.json b/sites.json index 0582822..47c544e 100644 --- a/sites.json +++ b/sites.json @@ -17,6 +17,7 @@ "CommonWealth Magazine Taiwan": "cw.com.tw", "Corriere Della Sera": "corriere.it", "Crain's Chicago Business": "chicagobusiness.com", + "Dagblad van het Noorden": "dvhn.nl", "Dagens Nyheter": "dn.se", "Daily Press": "dailypress.com", "Dark Reading": "darkreading.com", @@ -57,6 +58,7 @@ "Le Journal du Dimanche": "lejdd.fr", "Le Monde": "lemonde.fr", "Le Parisien": "leparisien.fr", + "Leeuwarder Courant": "lc.nl", "Les Échos": "lesechos.fr", "Libération (free articles only)": "liberation.fr", "Loeb Classical Library": "loebclassics.com",