mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 05:37:47 +01:00
Fix National Geographic USA (magazine)
This commit is contained in:
parent
8335331804
commit
aae4b9cbba
5 changed files with 32 additions and 7 deletions
|
@ -52,7 +52,7 @@ var use_google_bot, use_bing_bot;
|
|||
// Set Referer
|
||||
var use_facebook_referer, use_google_referer, use_twitter_referer;
|
||||
// Set random IP-address
|
||||
var use_random_ip = ['esprit.presse.fr'];
|
||||
var use_random_ip = ['esprit.presse.fr', 'nationalgeographic.com'];
|
||||
// concat all sites with change of headers (useragent, referer or random ip)
|
||||
var change_headers;
|
||||
|
||||
|
@ -912,9 +912,14 @@ if (matchUrlDomain(change_headers, details.url) && !['font', 'image', 'styleshee
|
|||
|
||||
// random IP for sites in use_random_ip
|
||||
if (matchUrlDomain(use_random_ip, details.url)) {
|
||||
let randomIP_val;
|
||||
if (matchUrlDomain('nationalgeographic.com', details.url))
|
||||
randomIP_val = randomIP(185, 187);
|
||||
else
|
||||
randomIP_val = randomIP();
|
||||
requestHeaders.push({
|
||||
"name": "X-Forwarded-For",
|
||||
"value": randomIP()
|
||||
"value": randomIP_val
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -1371,10 +1376,14 @@ function randomInt(max) {
|
|||
return Math.floor(Math.random() * Math.floor(max));
|
||||
}
|
||||
|
||||
function randomIP() {
|
||||
function randomIP(range_low = 0, range_high = 223) {
|
||||
let rndmIP = [];
|
||||
for (let n = 0; n < 4; n++)
|
||||
rndmIP.push(randomInt(254) + 1);
|
||||
for (let n = 0; n < 4; n++) {
|
||||
if (n === 0)
|
||||
rndmIP.push(range_low + randomInt(range_high - range_low) + 1);
|
||||
else
|
||||
rndmIP.push(randomInt(255) + 1);
|
||||
}
|
||||
return rndmIP.join('.');
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ Add San Antonio Express-News (local USA)
|
|||
Add The Indian Express
|
||||
Add Vrij Nederland
|
||||
Fix Bloomberg (permission block js)
|
||||
Fix National Geographic USA (magazine)
|
||||
Remove tabs-permission (amo - Firefox 86+)
|
||||
|
||||
* v2.4.7.0 (2021-12-12)
|
||||
|
|
|
@ -3211,7 +3211,7 @@ function replaceDomElementExt(url, proxy, base64, selector, text_fail = '') {
|
|||
}
|
||||
|
||||
function archiveLink(url) {
|
||||
let archive_url = 'https://archive.today?run=1&url=' + url;
|
||||
let archive_url = 'https://archive.today?run=1&url=' + url.split('?')[0];
|
||||
let text_fail_div = document.createElement('div');
|
||||
text_fail_div.id = 'bpc_archive';
|
||||
text_fail_div.appendChild(document.createTextNode('BPC > Full article text:\r\n'));
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
"domain": "ara.cat",
|
||||
"useragent": "googlebot"
|
||||
},
|
||||
"Bauernzeitung.ch": {
|
||||
"allow_cookies": 1,
|
||||
"domain": "bauernzeitung.ch",
|
||||
"useragent": "googlebot"
|
||||
},
|
||||
"Beobachter.ch": {
|
||||
"allow_cookies": 1,
|
||||
"domain": "beobachter.ch",
|
||||
|
@ -70,6 +75,11 @@
|
|||
"allow_cookies": 1,
|
||||
"domain": "internationalepolitik.de"
|
||||
},
|
||||
"Investorschronicle.co.uk": {
|
||||
"allow_cookies": 1,
|
||||
"domain": "investorschronicle.co.uk",
|
||||
"referer": "google"
|
||||
},
|
||||
"Lindipendente.online": {
|
||||
"allow_cookies": 1,
|
||||
"domain": "lindipendente.online",
|
||||
|
@ -139,6 +149,11 @@
|
|||
"domain": "thebanker.com",
|
||||
"useragent": "googlebot"
|
||||
},
|
||||
"Thecourier.co.uk": {
|
||||
"allow_cookies": 1,
|
||||
"domain": "thecourier.co.uk",
|
||||
"useragent": "googlebot"
|
||||
},
|
||||
"Thenational.scot": {
|
||||
"allow_cookies": 1,
|
||||
"block_regex": "\\.tinypass\\.com\\/",
|
||||
|
|
|
@ -595,5 +595,5 @@
|
|||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.4.7.7"
|
||||
"version": "2.4.7.8"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue