mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 05:27:48 +01:00
Fix Australian Financial Review
Eenable Javascript/photos.
This commit is contained in:
parent
b36da10715
commit
d562914762
3 changed files with 21 additions and 3 deletions
|
@ -258,7 +258,8 @@ const blockedRegexes = {
|
|||
'foreignpolicy.com': /.+\.tinypass\.com\/.+/,
|
||||
'inquirer.com': /.+\.tinypass\.com\/.+/,
|
||||
'spectator.co.uk': /.+\.tinypass\.com\/.+/,
|
||||
'newcastleherald.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/
|
||||
'newcastleherald.com.au': /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/,
|
||||
'afr.com': /afr\.com\/assets\/vendorsReactRedux_client.+\.js/
|
||||
};
|
||||
|
||||
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||
|
@ -307,7 +308,7 @@ chrome.webRequest.onBeforeRequest.addListener(function(details) {
|
|||
return {cancel: true};
|
||||
},
|
||||
{
|
||||
urls: ["*://*.theglobeandmail.com/*", "*://*.newstatesman.com/*", "*://*.afr.com/*"],
|
||||
urls: ["*://*.theglobeandmail.com/*", "*://*.newstatesman.com/*"],
|
||||
types: ["script"]
|
||||
},
|
||||
["blocking"]
|
||||
|
|
|
@ -257,6 +257,22 @@ if (window.location.href.indexOf("thestar.com") !== -1) {
|
|||
}
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("afr.com") !== -1) {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const hidden_image = document.querySelectorAll('img');
|
||||
for (let i = 0; i < hidden_image.length; i++) {
|
||||
var src = hidden_image[i].src;
|
||||
if ('src: ' + src.indexOf(".gif") !== -1) {
|
||||
var data_src = hidden_image[i].getAttribute("data-src");
|
||||
if (data_src)
|
||||
hidden_image[i].setAttribute('src', data_src);
|
||||
}
|
||||
}
|
||||
const plista = document.querySelector('div[data-plista-placement="underArticle_Group"]');
|
||||
removeDOMElement(plista);
|
||||
});
|
||||
}
|
||||
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
if (element) element.remove();
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
"*://*.theathletic.com/*",
|
||||
"*://*.techinasia.com/*",
|
||||
"*://*.newcastleherald.com.au/*",
|
||||
"*://*.thestar.com/*"
|
||||
"*://*.thestar.com/*",
|
||||
"*://*.afr.com/*"
|
||||
],
|
||||
"js": ["contentScript.js"]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue