mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-02 15:40:13 +00:00
Fix Toronto Star (enable Javascript)
This commit is contained in:
parent
0494d43a65
commit
b36da10715
@ -307,7 +307,7 @@ chrome.webRequest.onBeforeRequest.addListener(function(details) {
|
||||
return {cancel: true};
|
||||
},
|
||||
{
|
||||
urls: ["*://*.theglobeandmail.com/*", "*://*.thestar.com/*", "*://*.newstatesman.com/*", "*://*.afr.com/*"],
|
||||
urls: ["*://*.theglobeandmail.com/*", "*://*.newstatesman.com/*", "*://*.afr.com/*"],
|
||||
types: ["script"]
|
||||
},
|
||||
["blocking"]
|
||||
|
@ -248,6 +248,15 @@ if (window.location.href.indexOf("newcastleherald.com.au") !== -1) {
|
||||
}
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("thestar.com") !== -1) {
|
||||
const paywall = document.querySelector('.basic-paywall-new');
|
||||
removeDOMElement(paywall);
|
||||
const tbc = document.querySelectorAll('.text-block-container');
|
||||
for (let i = 0; i < tbc.length; i++) {
|
||||
tbc[i].removeAttribute('style');
|
||||
}
|
||||
}
|
||||
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
if (element) element.remove();
|
||||
|
@ -27,7 +27,8 @@
|
||||
"*://*.nrc.nl/*",
|
||||
"*://*.theathletic.com/*",
|
||||
"*://*.techinasia.com/*",
|
||||
"*://*.newcastleherald.com.au/*"
|
||||
"*://*.newcastleherald.com.au/*",
|
||||
"*://*.thestar.com/*"
|
||||
],
|
||||
"js": ["contentScript.js"]
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ var defaultSites = {
|
||||
'The Sydney Morning Herald': 'smh.com.au',
|
||||
'The Telegraph': 'telegraph.co.uk',
|
||||
'The Times': 'thetimes.co.uk',
|
||||
'The Toronto Star (javascript disabled)': 'thestar.com',
|
||||
'The Toronto Star': 'thestar.com',
|
||||
'The Washington Post': 'washingtonpost.com',
|
||||
'The Wall Street Journal': 'wsj.com',
|
||||
'Times Literary Supplement': 'the-tls.co.uk',
|
||||
|
Loading…
Reference in New Issue
Block a user