From 7ac09de35a6e8d17ce7a303f968032557318b8db Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 17 Mar 2024 18:45:34 +0100 Subject: [PATCH] Add GB News --- README.md | 1 + changelog.txt | 1 + contentScript.js | 7 ++++++- custom/manifest.json | 2 +- custom/sites_custom.json | 5 ----- manifest.json | 3 ++- sites.js | 5 +++++ 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b34c073..150a516 100644 --- a/README.md +++ b/README.md @@ -460,6 +460,7 @@ Grouped in options:\ [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) - diff --git a/changelog.txt b/changelog.txt index e1a60a6..9c4f11f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal Post-release Add Courrier international +Add GB News Add LeMoniteur.fr (Groupe Infopro Digital) Add Observador.pt Add Pour l'Eco diff --git a/contentScript.js b/contentScript.js index f1876f9..22bf11c 100644 --- a/contentScript.js +++ b/contentScript.js @@ -2874,7 +2874,7 @@ else if (document.querySelector('head > link[href="//ppt.promedia.nl"]') || docu else csDone = true; -} else if ((window.location.hostname.match(/\.(ie|uk)$/) && !matchDomain(['investmentweek.co.uk', 'vogue.co.uk'])) || matchDomain(['apollo-magazine.com', 'autosport.com', 'citywire.com', 'fnlondon.com', 'ft.com', 'granta.com', 'scotsman.com', 'tes.com', 'unherd.com'])) {//united kingdom/ireland +} else if ((window.location.hostname.match(/\.(ie|uk)$/) && !matchDomain(['investmentweek.co.uk', 'vogue.co.uk'])) || matchDomain(['apollo-magazine.com', 'autosport.com', 'citywire.com', 'fnlondon.com', 'ft.com', 'gbnews.com', 'granta.com', 'scotsman.com', 'tes.com', 'unherd.com'])) {//united kingdom/ireland if (matchDomain('apollo-magazine.com')) { let banner = document.querySelector('#subscribe-ribbon'); @@ -3048,6 +3048,11 @@ else if (matchDomain('ft.com')) { hideDOMElement(...banners); } +else if (matchDomain('gbnews.com')) { + let ads = document.querySelectorAll('div.ad--billboard, div.ad--placeholder'); + hideDOMElement(...ads); +} + else if (matchDomain('granta.com')) { if (dompurify_loaded) getJsonUrl('div.article-sign-up-container', '', 'div.article-excerpt'); diff --git a/custom/manifest.json b/custom/manifest.json index 332fdd9..7b20251 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.5.9.7" + "version": "3.5.9.8" } diff --git a/custom/sites_custom.json b/custom/sites_custom.json index 3cc497f..3d94824 100644 --- a/custom/sites_custom.json +++ b/custom/sites_custom.json @@ -272,11 +272,6 @@ "block_regex": "loader-cdn\\.azureedge\\.net", "domain": "gazette.com" }, - "Gbnews.com": { - "allow_cookies": 1, - "block_regex": "\\.piano\\.io", - "domain": "gbnews.com" - }, "Gplanet.co.il (not lectures)": { "allow_cookies": 1, "domain": "gplanet.co.il", diff --git a/manifest.json b/manifest.json index a0ac79d..3dc11a9 100644 --- a/manifest.json +++ b/manifest.json @@ -296,6 +296,7 @@ "*://*.ftm.nl/*", "*://*.gazetadopovo.com.br/*", "*://*.gazzetta.it/*", + "*://*.gbnews.com/*", "*://*.geelongadvertiser.com.au/*", "*://*.gelderlander.nl/*", "*://*.genomeweb.com/*", @@ -859,5 +860,5 @@ "*://archive.vn/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.5.9.7" + "version": "3.5.9.8" } diff --git a/sites.js b/sites.js index 7961c59..08750cc 100644 --- a/sites.js +++ b/sites.js @@ -868,6 +868,11 @@ var defaultSites = { allow_cookies: 1, block_regex: /(\.tinypass\.com\/|cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/ }, + "GB News": { + domain: "gbnews.com", + allow_cookies: 1, + block_regex: /\.piano\.io\// + }, "Glassdoor (regwall)": { domain: "glassdoor.com" },