Fix MarketWatch (amp-redirect)

This commit is contained in:
magnolia1234 2023-09-07 21:25:12 +02:00
parent a9ab7929c2
commit f0e3829106
6 changed files with 22 additions and 8 deletions

View file

@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release Post-release
Fix Inc42 (js) Fix Inc42 (js)
Fix MarketWatch (amp-redirect)
Fix Puck.news (ld_json_url) Fix Puck.news (ld_json_url)
Fix Tes Magazine (css) Fix Tes Magazine (css)
Fix The Diplomat (magazine) Fix The Diplomat (magazine)

View file

@ -4124,12 +4124,12 @@ else if (matchDomain('magazine.atavist.com')) {
} }
else if (matchDomain('marketwatch.com')) { else if (matchDomain('marketwatch.com')) {
let premium = document.querySelector('html.is-paywall'); if (!window.location.pathname.startsWith('/amp/')) {
let url = window.location.href; let paywall = document.querySelector('div#cx-snippet');
if (!url.includes('/amp/')) { let amphtml = document.querySelector('link[rel="amphtml"]');
if (premium) { if (paywall && amphtml) {
premium.classList.remove('is-paywall'); removeDOMElement(paywall);
window.location.href = url.replace('.marketwatch.com/', '.marketwatch.com/amp/'); window.location.href = amphtml.href;
} }
} else { } else {
let meter = document.querySelector('div.meter'); let meter = document.querySelector('div.meter');

View file

@ -51,5 +51,5 @@
"webRequestBlocking", "webRequestBlocking",
"*://*/*" "*://*/*"
], ],
"version": "3.3.2.5" "version": "3.3.2.6"
} }

View file

@ -283,6 +283,12 @@
"allow_cookies": 1, "allow_cookies": 1,
"domain": "lefigaro.fr" "domain": "lefigaro.fr"
}, },
"Lepoint.fr": {
"add_ext_link": "div.info-paywall|div.ArticleBody>p",
"add_ext_link_type": "archive.is",
"allow_cookies": 1,
"domain": "lepoint.fr"
},
"Libraryjournal.com": { "Libraryjournal.com": {
"allow_cookies": 1, "allow_cookies": 1,
"block_regex": "\\.libraryjournal.com\\.com\\/.+\\/js\\/metering\\.js", "block_regex": "\\.libraryjournal.com\\.com\\/.+\\/js\\/metering\\.js",

View file

@ -796,5 +796,5 @@
"*://*.wyleex.com/*", "*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "3.3.2.5" "version": "3.3.2.6"
} }

View file

@ -63,6 +63,13 @@
"ld_google_webcache": "div.post-subscribe|div.post-body-wrapper", "ld_google_webcache": "div.post-subscribe|div.post-body-wrapper",
"upd_version": "3.3.0.5" "upd_version": "3.3.0.5"
}, },
"MarketWatch": {
"domain": "marketwatch.com",
"allow_cookies": 1,
"block_regex": "(cdn\\.cxense\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-(access|subscriptions)-.+\\.js)",
"amp_redirect": "div#cx-snippet",
"upd_version": "3.3.2.6"
},
"Mediahuis Noord": { "Mediahuis Noord": {
"domain": "###_nl_mediahuis_noord", "domain": "###_nl_mediahuis_noord",
"group": [ "group": [