From 7364c4c1e0b4625c5f198f42a60c3bb2782c043d Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 4 Jan 2023 12:37:54 +0100 Subject: [PATCH] Remove Entrepreneur (fix obsolete) --- README.md | 1 - background.js | 4 +++- changelog.txt | 1 + contentScript.js | 13 ------------- manifest.json | 1 - sites.js | 4 ---- 6 files changed, 4 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 54b271b5..84ef0168 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,6 @@ _* free articles only._ [Business Insider](https://www.businessinsider.com) - [CNBC](https://www.cnbc.com) - [Digiday](https://digiday.com) - -[Entrepreneur](https://www.entrepreneur.com) - [Forbes](https://www.forbes.com) - [Fortune](https://fortune.com) - [Harvard Business Review](https://www.hbr.org) - diff --git a/background.js b/background.js index 8525e385..2cc52b62 100644 --- a/background.js +++ b/background.js @@ -786,7 +786,9 @@ if (typeof browser !== 'object') { ext_api.tabs.executeScript(tabId, { file: lib_file, runAt: 'document_start' - }, function () { + }, function (res) { + if (ext_api.runtime.lastError) + return; ext_api.tabs.executeScript(tabId, { file: 'contentScript.js', runAt: 'document_start' diff --git a/changelog.txt b/changelog.txt index f4b6f947..38c253c3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Add McClatchy DC Add Mundo Deportivo Add PhiloMag.de Add ZeroHedge +Remove Entrepreneur (fix obsolete) Fix Boston Globe (css) Fix Substack (split content) Fix Telegraaf.nl diff --git a/contentScript.js b/contentScript.js index 27d7e46c..5846ad04 100644 --- a/contentScript.js +++ b/contentScript.js @@ -2984,19 +2984,6 @@ else if (matchDomain('enotes.com')) { } } -else if (matchDomain('entrepreneur.com')) { - let promo = document.querySelector('.paywall-promo'); - if (promo) { - removeDOMElement(promo); - let gate_check = document.querySelector('.gate-check'); - if (gate_check) - gate_check.removeAttribute('class'); - let hidden_images = document.querySelectorAll('img.lazy[src*="blur"][data-src]'); - for (let hidden_image of hidden_images) - hidden_image.setAttribute('src', hidden_image.getAttribute('data-src')); - } -} - else if (matchDomain('espn.com')) { let url = window.location.href; let paywall = document.querySelector('aside.espn-plus-container-wrapper'); diff --git a/manifest.json b/manifest.json index 160e579e..51f33a90 100644 --- a/manifest.json +++ b/manifest.json @@ -212,7 +212,6 @@ "*://*.eltiempo.com/*", "*://*.em.com.br/*", "*://*.enotes.com/*", - "*://*.entrepreneur.com/*", "*://*.epe.es/*", "*://*.espn.com/*", "*://*.esprit.presse.fr/*", diff --git a/sites.js b/sites.js index 5d32fddb..b50aaea6 100644 --- a/sites.js +++ b/sites.js @@ -483,10 +483,6 @@ var defaultSites = { domain: "enotes.com", allow_cookies: 1 }, - "Entrepreneur": { - domain: "entrepreneur.com", - allow_cookies: 1 - }, "ESPN USA (news only; link to archive.is))": { domain: "espn.com", allow_cookies: 1