From dea712655d7417f03e5c036ca13588fbc6d49823 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 31 Jan 2021 10:53:55 +0100 Subject: [PATCH] Add Stratfor --- README.md | 1 + background.js | 2 ++ changelog.txt | 1 + contentScript.js | 10 +++++++++- manifest.json | 3 ++- sites.js | 1 + 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3e2cc1b..d7ec429 100755 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ _* free articles only._ [Inkl](https://www.inkl.com) - [National Review](https://www.nationalreview.com) - [Newsweek](https://www.newsweek.com) - +[Stratfor](https://stratfor.com) - [The American Interest](https://www.the-american-interest.com) - [The Atlantic](https://www.theatlantic.com) - [The Christian Science Monitor](https://www.csmonitor.com) - diff --git a/background.js b/background.js index 8d6a2e2..2ec34c1 100755 --- a/background.js +++ b/background.js @@ -111,6 +111,7 @@ var allow_cookies_default = [ 'slader.com', 'startribune.com', 'stocknews.com', + 'stratfor.com', 'sudouest.fr', 'sueddeutsche.de', 'svz.de', @@ -183,6 +184,7 @@ var use_google_bot_default = [ 'republic.ru', 'ruhrnachrichten.de', 'seekingalpha.com', + 'stratfor.com', 'thetimes.co.uk', 'usinenouvelle.com', 'washingtonpost.com', diff --git a/changelog.txt b/changelog.txt index a2cece4..6bbe646 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release Add Griffith Review (Australia) +Add Stratfor Add The Hill Times (Canada) Add The Jerusalem Post (Israel) Fix-update Adweek (amp for premium) diff --git a/contentScript.js b/contentScript.js index 7cc0aac..8b2bd40 100755 --- a/contentScript.js +++ b/contentScript.js @@ -681,7 +681,7 @@ else if (matchDomain("lesechos.fr") && window.location.href.match(/-\d{6,}/)) { let data = JSON.parse(state); let article = data.article.data.stripes[0].mainContent[0].data.description; let url_loaded = data.article.data.path; - if (!url.includes(url_loaded)) + if (!url.replace(/%20/g, '').includes(url_loaded)) window.location.reload(true); let paywallNode = document.querySelector('.post-paywall'); if (paywallNode) { @@ -2008,6 +2008,14 @@ else if (matchDomain('elmercurio.com')) { }, 1000); // Delay (in milliseconds) } +else if (matchDomain('stratfor.com')) { + let banner = document.querySelector('.free-cta-container'); + removeDOMElement(banner); + let css_link = document.querySelector('link[rel="stylesheet"][href="/assets/worldview.586bbca0b199b8ce5042.css"]'); + if (css_link) + css_link.href = '/assets/worldview.d6b47e5305e05acb0c45.css'; +} + else if (!matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) csDone = true; diff --git a/manifest.json b/manifest.json index af7af9e..4f5ac81 100755 --- a/manifest.json +++ b/manifest.json @@ -327,6 +327,7 @@ "*://*.statista.com/*", "*://*.stcatharinesstandard.ca/*", "*://*.stocknews.com/*", + "*://*.stratfor.com/*", "*://*.sudinfo.be/*", "*://*.sudouest.fr/*", "*://*.sueddeutsche.de/*", @@ -432,5 +433,5 @@ "*://*.userzoom.com/*", "*://*.wsj.net/*" ], - "version": "2.0.5.4" + "version": "2.0.5.5" } \ No newline at end of file diff --git a/sites.js b/sites.js index a9c9ed0..ca5f7fa 100755 --- a/sites.js +++ b/sites.js @@ -189,6 +189,7 @@ var defaultSites = "Star Tribune": "startribune.com", "Statista": "statista.com", "Stock News": "stocknews.com", + "Stratfor": "stratfor.com", "Sud Ouest": "sudouest.fr", "Süddeutsche Zeitung": "sueddeutsche.de", "SunSentinel": "sun-sentinel.com",