mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:31:57 +01:00
Fix Barron's (amp-redirect)
Fix WSJ (hard refresh)
This commit is contained in:
parent
548be848ac
commit
b2590988de
7 changed files with 37 additions and 23 deletions
|
@ -60,7 +60,7 @@ var remove_cookies_select_hold, remove_cookies_select_drop;
|
|||
// Set User-Agent
|
||||
var use_google_bot, use_bing_bot, use_facebook_bot;
|
||||
// Set Referer
|
||||
var use_facebook_referer, use_google_referer, use_twitter_referer;
|
||||
var use_drudgereport_referer, use_facebook_referer, use_google_referer, use_twitter_referer;
|
||||
// Set random IP-address
|
||||
var random_ip = {};
|
||||
var use_random_ip = [];
|
||||
|
@ -105,6 +105,7 @@ function initSetRules() {
|
|||
use_google_bot = [];
|
||||
use_bing_bot = [];
|
||||
use_facebook_bot = [];
|
||||
use_drudgereport_referer = [];
|
||||
use_facebook_referer = [];
|
||||
use_google_referer = [];
|
||||
use_twitter_referer = [];
|
||||
|
@ -258,6 +259,10 @@ function addRules(domain, rule) {
|
|||
}
|
||||
if (rule.referer) {
|
||||
switch (rule.referer) {
|
||||
case 'drudgereport':
|
||||
if (!use_drudgereport_referer.includes(domain))
|
||||
use_drudgereport_referer.push(domain);
|
||||
break;
|
||||
case 'facebook':
|
||||
if (!use_facebook_referer.includes(domain))
|
||||
use_facebook_referer.push(domain);
|
||||
|
@ -404,7 +409,7 @@ function set_rules(sites, sites_updated, sites_custom) {
|
|||
blockedJsInlineDomains = Object.keys(blockedJsInline);
|
||||
disableJavascriptInline();
|
||||
use_random_ip = Object.keys(random_ip);
|
||||
change_headers = use_google_bot.concat(use_bing_bot, use_facebook_bot, use_facebook_referer, use_google_referer, use_twitter_referer, use_random_ip);
|
||||
change_headers = use_google_bot.concat(use_bing_bot, use_facebook_bot, use_drudgereport_referer, use_facebook_referer, use_google_referer, use_twitter_referer, use_random_ip);
|
||||
}
|
||||
|
||||
// add grouped sites to en/disabledSites (and exclude sites)
|
||||
|
@ -1022,6 +1027,8 @@ if (matchUrlDomain(change_headers, details.url) && !ignore_types.includes(detail
|
|||
if (requestHeader.name === 'Referer') {
|
||||
if (googlebotEnabled || matchUrlDomain(use_google_referer, details.url)) {
|
||||
requestHeader.value = 'https://www.google.com/';
|
||||
} else if (matchUrlDomain(use_drudgereport_referer, details.url)) {
|
||||
requestHeader.value = 'https://www.drudgereport.com/';
|
||||
} else if (matchUrlDomain(use_facebook_referer, details.url)) {
|
||||
requestHeader.value = 'https://www.facebook.com/';
|
||||
} else if (matchUrlDomain(use_twitter_referer, details.url)) {
|
||||
|
@ -1042,6 +1049,11 @@ if (matchUrlDomain(change_headers, details.url) && !ignore_types.includes(detail
|
|||
name: 'Referer',
|
||||
value: 'https://www.google.com/'
|
||||
});
|
||||
} else if (matchUrlDomain(use_drudgereport_referer, details.url)) {
|
||||
requestHeaders.push({
|
||||
name: 'Referer',
|
||||
value: 'https://www.drudgereport.com/'
|
||||
});
|
||||
} else if (matchUrlDomain(use_facebook_referer, details.url)) {
|
||||
requestHeaders.push({
|
||||
name: 'Referer',
|
||||
|
|
|
@ -4,9 +4,10 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
|
|||
|
||||
Post-release
|
||||
Fix Apollo Magazine
|
||||
Fix Barron's (amp-redirect)
|
||||
Fix Harvard Business Review (cookie)
|
||||
Fix Spectator.com.au
|
||||
Fix WSJ (non-pro; link to archive.is)
|
||||
Fix WSJ (hard refresh or non-pro; link to archive.is)
|
||||
|
||||
* v3.3.9.0 (2023-10-22)
|
||||
Add Balkan Insight
|
||||
|
|
|
@ -3461,17 +3461,12 @@ else if (matchDomain('barandbench.com')) {
|
|||
else if (matchDomain('barrons.com')) {
|
||||
let url = window.location.href;
|
||||
if (!url.includes('barrons.com/amp/')) {
|
||||
let body_continuous = document.querySelector('body.is-continuous');
|
||||
let snippet = document.querySelector('head > meta[content="snippet"]');
|
||||
if (body_continuous && snippet) {
|
||||
removeDOMElement(snippet);
|
||||
window.location.href = url.replace('barrons.com', 'barrons.com/amp');
|
||||
}
|
||||
amp_redirect('div#cx-interstitial-snippet', '', '/amp' + window.location.pathname);
|
||||
let continue_buttons = document.querySelectorAll('button.snippet__buttons--continue');
|
||||
for (let elem of continue_buttons)
|
||||
elem.addEventListener('click', function () { window.location.reload(); });
|
||||
let barrons_ads = document.querySelectorAll('.barrons-body-ad-placement');
|
||||
hideDOMElement(...barrons_ads);
|
||||
let ads = document.querySelectorAll('div[class*="_AdWrapper-"], div[class*="-adWrapper-"]');
|
||||
hideDOMElement(...ads);
|
||||
} else {
|
||||
amp_unhide_subscr_section('.wsj-ad, amp-ad');
|
||||
}
|
||||
|
@ -5424,6 +5419,8 @@ else if (matchDomain('wsj.com')) {
|
|||
article.firstChild.before(googleSearchToolLink(window.location.href));
|
||||
else
|
||||
article.firstChild.before(archiveLink(window.location.href));
|
||||
if (!mobile)
|
||||
header_nofix(document.querySelector('div#bpc_archive'), 'BPC > hard refresh page (for Windows: Ctrl + Enter in address bar) or use link below');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,5 +51,5 @@
|
|||
"webRequestBlocking",
|
||||
"*://*/*"
|
||||
],
|
||||
"version": "3.3.9.3"
|
||||
"version": "3.3.9.4"
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"###_remove_sites": {
|
||||
"cs_code": "africaintelligence.fr, arkansasonline.com, columbian.com, intelligenceonline.com, intelligenceonline.fr, interestingengineering.com, jeuneafrique.com, lalettrea.fr, lastampa.it, lavozdegalicia.es, law360.com, lepoint.fr, manager-magazin.de, ouest-france.fr, pressherald.com, repubblica.it, risk.net, saechsische.de, swarajyamag.com, thetexan.news, theweek.com, vikatan.com",
|
||||
"cs_code": "africaintelligence.fr, arkansasonline.com, columbian.com, die-glocke.de, intelligenceonline.com, intelligenceonline.fr, interestingengineering.com, jeuneafrique.com, lalettrea.fr, lastampa.it, lavozdegalicia.es, law360.com, lepoint.fr, manager-magazin.de, ouest-france.fr, pressherald.com, repubblica.it, risk.net, saechsische.de, swarajyamag.com, thetexan.news, theweek.com, vikatan.com",
|
||||
"domain": "###"
|
||||
},
|
||||
"Abajournal.com": {
|
||||
|
@ -118,6 +118,12 @@
|
|||
"domain": "christianitytoday.com",
|
||||
"useragent": "googlebot"
|
||||
},
|
||||
"Churchtimes.co.uk": {
|
||||
"allow_cookies": 1,
|
||||
"block_js_inline": "\\.churchtimes\\.co\\.uk\\/articles\\/",
|
||||
"domain": "churchtimes.co.uk",
|
||||
"useragent": "googlebot"
|
||||
},
|
||||
"Clareecho.ie": {
|
||||
"allow_cookies": 1,
|
||||
"block_regex": "\\.clareecho\\.ie\\/.+\\/flip-pay\\.js",
|
||||
|
@ -158,12 +164,6 @@
|
|||
"domain": "diariodenavarra.es",
|
||||
"ld_json": "div#paywall_message|div.free-html"
|
||||
},
|
||||
"Die-glocke.de": {
|
||||
"add_ext_link": "div.cardPw|div.mainContent",
|
||||
"add_ext_link_type": "google_search_tool",
|
||||
"allow_cookies": 1,
|
||||
"domain": "die-glocke.de"
|
||||
},
|
||||
"Dn.se": {
|
||||
"add_ext_link": "div.esi-paywall|div.article__content",
|
||||
"add_ext_link_type": "archive.is",
|
||||
|
@ -223,6 +223,10 @@
|
|||
"domain": "faithfullymagazine.com",
|
||||
"ld_json": "div.pmpro_content_message|div.content-inner"
|
||||
},
|
||||
"Farmersjournal.ie": {
|
||||
"amp_redirect": "div#memberplusModal",
|
||||
"domain": "farmersjournal.ie"
|
||||
},
|
||||
"Finansavisen.no": {
|
||||
"allow_cookies": 1,
|
||||
"domain": "finansavisen.no",
|
||||
|
|
|
@ -807,5 +807,5 @@
|
|||
"*://*.wyleex.com/*",
|
||||
"*://webcache.googleusercontent.com/*"
|
||||
],
|
||||
"version": "3.3.9.3"
|
||||
"version": "3.3.9.4"
|
||||
}
|
||||
|
|
6
sites.js
6
sites.js
|
@ -231,7 +231,7 @@ var defaultSites = {
|
|||
"Barron's (when blocked disable Googlebot in BPC-settings)": {
|
||||
domain: "barrons.com",
|
||||
allow_cookies: 1,
|
||||
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/,
|
||||
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/,
|
||||
useragent: "googlebot"
|
||||
},
|
||||
"BBC History Extra": {
|
||||
|
@ -2408,8 +2408,8 @@ var defaultSites = {
|
|||
"The Wall Street Journal": {
|
||||
domain: "wsj.com",
|
||||
allow_cookies: 1,
|
||||
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|subscriptions)-.+\.js)/,
|
||||
useragent: "googlebot"
|
||||
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/,
|
||||
referer: "drudgereport"
|
||||
},
|
||||
"The Washington Post": {
|
||||
domain: "washingtonpost.com",
|
||||
|
|
Loading…
Reference in a new issue