Fix MarketWatch (amp-redirect)

merge-requests/16/head
magnolia1234 10 months ago
parent a9ab7929c2
commit f0e3829106

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

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

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

@ -283,6 +283,12 @@
"allow_cookies": 1,
"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": {
"allow_cookies": 1,
"block_regex": "\\.libraryjournal.com\\.com\\/.+\\/js\\/metering\\.js",

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

@ -63,6 +63,13 @@
"ld_google_webcache": "div.post-subscribe|div.post-body-wrapper",
"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": {
"domain": "###_nl_mediahuis_noord",
"group": [

Loading…
Cancel
Save