From 72b957b2d98e339e67969bf123937d538da97ba5 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 10 Aug 2021 17:24:03 +0200 Subject: [PATCH] Fix MediaNama (modal) --- background.js | 3 ++- changelog.txt | 1 + contentScript.js | 7 +++++++ manifest.json | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index 9c24f043..22ed2436 100644 --- a/background.js +++ b/background.js @@ -23,11 +23,12 @@ const restrictions = { 'faz.net': /^((?!\/.+\.faz\.net\/aktuell\/(\?switchfaznet)?$).)*$/, 'foreignaffairs.com': /.+\.foreignaffairs\.com\/(articles|fa-caching|interviews|reviews|sites)\/.+/, 'ft.com': /.+\.ft\.com\/content\//, - 'medianama.com': /\.medianama\.com\/(\d){4}\/(\d){2}\//, + 'medianama.com': /\.medianama\.com\/((\d){4}\/(\d){2}|wp-content)\//, 'timesofindia.com': /.+\.timesofindia\.com\/($|toi-plus(\/.+)?|.+\.cms)/, 'nknews.org': /^((?!nknews\.org\/pro\/).)*$/, 'quora.com': /^((?!quora\.com\/search\?q=).)*$/, 'seekingalpha.com': /.+\/seekingalpha\.com\/($|(amp\/)?(article|news)\/|samw\/)/, + 'statista.com': /^((?!\.statista\.com\/(outlook|study)\/).)*$/, 'sueddeutsche.de': /^((?!projekte\.sueddeutsche\.de\/).)*$/, 'techinasia.com': /\.techinasia\.com\/.+/, 'wsj.com': /^((?!\/cn\.wsj\.com\/).)*$/ diff --git a/changelog.txt b/changelog.txt index e68a90ec..0b9f9801 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release +Fix MediaNama (modal) * v2.3.2.0 (2021-08-08) Add Inc42 (India) diff --git a/contentScript.js b/contentScript.js index 0f8f7332..986f0b06 100644 --- a/contentScript.js +++ b/contentScript.js @@ -2134,6 +2134,13 @@ else if (matchDomain('marketwatch.com')) { removeDOMElement(...ads); } +else if (matchDomain('medianama.com')) { + window.setTimeout(function () { + let modal = document.querySelector('div.modal'); + removeDOMElement(modal); + }, 500); // Delay (in milliseconds) +} + else if (matchDomain('mexiconewsdaily.com')) { window.setTimeout(function () { let popup = document.querySelector('div.pigeon-widget-prompt'); diff --git a/manifest.json b/manifest.json index bf942a76..ce2ac8ef 100644 --- a/manifest.json +++ b/manifest.json @@ -542,5 +542,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.3.2.0" + "version": "2.3.2.1" } \ No newline at end of file