mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-13 02:14:15 +01:00
Merge branch 'master' of https://github.com/iamadamdev/bypass-paywalls-firefox
This commit is contained in:
commit
32caa509f7
4 changed files with 7 additions and 6 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
web-ext-artifacts
|
|
@ -230,10 +230,10 @@ chrome.webRequest.onBeforeRequest.addListener(function(details) {
|
||||||
if (!isSiteEnabled(details) || details.url.indexOf("mod=rsswn") !== -1) {
|
if (!isSiteEnabled(details) || details.url.indexOf("mod=rsswn") !== -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return {cancel: true};
|
return {cancel: true};
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
urls: ["*://*.theglobeandmail.com/*", "*://*.economist.com/*", "*://*.thestar.com/*"],
|
urls: ["*://*.theglobeandmail.com/*", "*://*.economist.com/*", "*://*.thestar.com/*", "*://*.newstatesman.com/*"],
|
||||||
types: ["script"]
|
types: ["script"]
|
||||||
},
|
},
|
||||||
["blocking"]
|
["blocking"]
|
||||||
|
@ -292,7 +292,7 @@ browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||||
|
|
||||||
// override User-Agent to use Googlebot
|
// override User-Agent to use Googlebot
|
||||||
var useGoogleBot = use_google_bot.filter(function(item) {
|
var useGoogleBot = use_google_bot.filter(function(item) {
|
||||||
return typeof item == 'string' && details.url.indexOf(item) > -1;
|
return typeof item == 'string' && details.url.indexOf(item) > -1;
|
||||||
}).length > 0;
|
}).length > 0;
|
||||||
|
|
||||||
if (useGoogleBot) {
|
if (useGoogleBot) {
|
||||||
|
|
|
@ -69,7 +69,7 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
|
||||||
}
|
}
|
||||||
} else if (window.location.href.indexOf("wsj.com") !== -1) {
|
} else if (window.location.href.indexOf("wsj.com") !== -1) {
|
||||||
if (location.href.includes('/articles/')) {
|
if (location.href.includes('/articles/')) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
document.querySelector('.close-btn').click();
|
document.querySelector('.close-btn').click();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,6 @@ if (window.location.href.indexOf("bizjournals.com") !== -1) {
|
||||||
|
|
||||||
document.querySelector('.gdpr-consent-container .consent-page:not(.hide) .continue-btn.button.accept-consent').click();
|
document.querySelector('.gdpr-consent-container .consent-page:not(.hide) .continue-btn.button.accept-consent').click();
|
||||||
}
|
}
|
||||||
}, 300); // Delay (in milliseconds)
|
}, 300); // Delay (in milliseconds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ var defaultSites = {
|
||||||
'MIT Technology Review': 'technologyreview.com',
|
'MIT Technology Review': 'technologyreview.com',
|
||||||
'Mountain View Voice': 'mv-voice.com',
|
'Mountain View Voice': 'mv-voice.com',
|
||||||
'National Post': 'nationalpost.com',
|
'National Post': 'nationalpost.com',
|
||||||
'New Statesman': 'newstatesman.com',
|
'New Statesman (javascript disabled)': 'newstatesman.com',
|
||||||
'New York Magazine': 'nymag.com',
|
'New York Magazine': 'nymag.com',
|
||||||
'New Zealand Herald': 'nzherald.co.nz',
|
'New Zealand Herald': 'nzherald.co.nz',
|
||||||
'Nikkei Asian Review': 'asia.nikkei.com',
|
'Nikkei Asian Review': 'asia.nikkei.com',
|
||||||
|
|
Loading…
Reference in a new issue