From 05137b5ad8080a47650a0ed2f3c0a83ad879a1cd Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Mon, 28 Aug 2023 08:56:53 +0200 Subject: [PATCH] Fix Star Tribune (css) --- background.js | 2 +- changelog.txt | 1 + contentScript.js | 13 +++++-------- custom/manifest.json | 2 +- manifest.json | 2 +- sites.js | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/background.js b/background.js index c7112664..16893e1b 100644 --- a/background.js +++ b/background.js @@ -903,7 +903,7 @@ if (typeof browser !== 'object') { ext_api.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { let tab_status = changeInfo.status; if (/^http/.test(tab.url)) { - if ((tab_status && tab_status === 'complete') || (changeInfo.url)) { + if ((tab_status && (tab_status === 'complete' || matchUrlDomain(['startribune.com'], tab.url))) || changeInfo.url) { let timeout = changeInfo.url ? 500 : 0; setTimeout(function () { if (isSiteEnabled(tab)) { diff --git a/changelog.txt b/changelog.txt index 68f51f29..caa1384e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Fix Star Tribune (css) * v3.3.1.0 (2023-08-27) Add Bridge Tower Media (opt-in to custom sites) diff --git a/contentScript.js b/contentScript.js index 61a36ecf..29e42fcf 100644 --- a/contentScript.js +++ b/contentScript.js @@ -4479,15 +4479,12 @@ else if (matchDomain('staradvertiser.com')) { } else if (matchDomain('startribune.com')) { - let modal = document.querySelector('body.ReactModal__Body--open'); - if (modal) - modal.classList.remove('ReactModal__Body--open'); - let banner = document.querySelector('div#meterContent, div[class*="Limit-container-"]'); - let banner_modal; - if (banner) - banner_modal = banner.closest('div.ReactModalPortal'); + let noscroll = document.querySelector('body[class]'); + if (noscroll) + noscroll.style = 'overflow: auto !important; position: static !important;'; + let modal = document.querySelector('div.modal-backdrop'); let ads = document.querySelectorAll('div.ad-placeholder'); - removeDOMElement(banner_modal, ...ads); + removeDOMElement(modal, ...ads); } else if (matchDomain('statista.com')) { diff --git a/custom/manifest.json b/custom/manifest.json index 3bce9703..12ff6715 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.3.1.0" + "version": "3.3.1.1" } diff --git a/manifest.json b/manifest.json index 701b718a..f2431d50 100644 --- a/manifest.json +++ b/manifest.json @@ -792,5 +792,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.3.1.0" + "version": "3.3.1.1" } diff --git a/sites.js b/sites.js index 0cce3d17..e1ea673c 100644 --- a/sites.js +++ b/sites.js @@ -1927,7 +1927,7 @@ var defaultSites = { }, "Star Tribune": { domain: "startribune.com", - remove_cookies_select_drop: ["client_id"] + allow_cookies: 1 }, "Statista": { domain: "statista.com",