mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-13 01:34:16 +01:00
Add Rp.pl
Update ld_json_url (default url)
This commit is contained in:
parent
0344b142b0
commit
6b8c669a13
10 changed files with 61 additions and 44 deletions
|
@ -766,6 +766,9 @@ Grouped in options:\
|
||||||
[TradeWinds](https://www.tradewindsnews.com) -
|
[TradeWinds](https://www.tradewindsnews.com) -
|
||||||
[Upstream](https://www.upstreamonline.com)
|
[Upstream](https://www.upstreamonline.com)
|
||||||
|
|
||||||
|
##### Poland
|
||||||
|
[Rzeczpospolita](https://www.rp.pl)
|
||||||
|
|
||||||
##### Portugal
|
##### Portugal
|
||||||
[Correio da Manhã](https://www.cmjornal.pt) -
|
[Correio da Manhã](https://www.cmjornal.pt) -
|
||||||
[Record](https://www.record.pt) -
|
[Record](https://www.record.pt) -
|
||||||
|
|
|
@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
|
||||||
|
|
||||||
Post-release
|
Post-release
|
||||||
Add Bild.de (link to archive.is)
|
Add Bild.de (link to archive.is)
|
||||||
|
Add Rp.pl
|
||||||
Remove Money.it (fix obsolete)
|
Remove Money.it (fix obsolete)
|
||||||
Fix Automobilwoche.de (js)
|
Fix Automobilwoche.de (js)
|
||||||
Fix Groupe Centre France (identify sites)
|
Fix Groupe Centre France (identify sites)
|
||||||
|
@ -14,6 +15,7 @@ Fix Media Group Westfalen
|
||||||
Fix National Review (cookies)
|
Fix National Review (cookies)
|
||||||
Fix NYmag-sites (js)
|
Fix NYmag-sites (js)
|
||||||
Enable optional host permissions on Android (Firefox 120+)
|
Enable optional host permissions on Android (Firefox 120+)
|
||||||
|
Update ld_json_url (default url)
|
||||||
|
|
||||||
* v3.4.7.0 (2023-12-14)
|
* v3.4.7.0 (2023-12-14)
|
||||||
Add Die Presse (at)
|
Add Die Presse (at)
|
||||||
|
|
|
@ -1438,8 +1438,12 @@ else if (matchDomain(de_madsack_domains) || document.querySelector('head > link[
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (matchDomain('ruhrnachrichten.de') || document.querySelector('a.mgw-logo[href^="https://mgw.de"]')) {
|
else if (matchDomain('ruhrnachrichten.de') || document.querySelector('a.mgw-logo[href^="https://mgw.de"]')) {
|
||||||
|
let pathname = window.location.pathname;
|
||||||
|
let article_id;
|
||||||
|
if (pathname.includes('-p-'))
|
||||||
|
article_id = pathname.split('-p-')[1].split('/')[0];
|
||||||
if (dompurify_loaded)
|
if (dompurify_loaded)
|
||||||
getJsonUrl('body.is_plus_article', {rm_class: 'is_plus_article'}, 'article');
|
getJsonUrl('body.is_plus_article', {rm_class: 'is_plus_article'}, 'article', {art_append: 1, art_hold: 1}, article_id);
|
||||||
let ads = document.querySelector('div.OUTBRAIN');
|
let ads = document.querySelector('div.OUTBRAIN');
|
||||||
hideDOMElement(ads);
|
hideDOMElement(ads);
|
||||||
if (!matchDomain('ruhrnachrichten.de')) {
|
if (!matchDomain('ruhrnachrichten.de')) {
|
||||||
|
@ -4568,6 +4572,11 @@ else if (matchDomain('quora.com')) {
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (matchDomain('rp.pl')) {
|
||||||
|
let url = window.location.href;
|
||||||
|
getGoogleWebcache(url, 'div.paywallComponentWrapper', '', 'div.main--content--body');
|
||||||
|
}
|
||||||
|
|
||||||
else if (matchDomain('rugbypass.com')) {
|
else if (matchDomain('rugbypass.com')) {
|
||||||
if (window.location.pathname.startsWith('/plus/')) {
|
if (window.location.pathname.startsWith('/plus/')) {
|
||||||
let paywall = document.querySelector('.premium-fold-bottom');
|
let paywall = document.querySelector('.premium-fold-bottom');
|
||||||
|
@ -6141,22 +6150,26 @@ function findKeyJson(json, keys, min_val_len = 0) {
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJsonUrlText(article, callback) {
|
function getJsonUrlText(article, callback, article_id = '') {
|
||||||
let json_url_dom = document.querySelector('head > link[rel="alternate"][type="application/json"][href]');
|
let json_url_dom = document.querySelector('head > link[rel="alternate"][type="application/json"][href]');
|
||||||
let json_url = json_url_dom.href;
|
let json_url = json_url_dom.href;
|
||||||
fetch(json_url)
|
if (!json_url && article_id)
|
||||||
.then(response => {
|
json_url = 'https://' + window.location.hostname + '/wp-json/wp/v2/posts/' + article_id;
|
||||||
if (response.ok) {
|
if (json_url) {
|
||||||
response.json().then(json => {
|
fetch(json_url)
|
||||||
try {
|
.then(response => {
|
||||||
let json_text = parseHtmlEntities(json.content.rendered);
|
if (response.ok) {
|
||||||
callback(json_text, article);
|
response.json().then(json => {
|
||||||
} catch (err) {
|
try {
|
||||||
console.log(err);
|
let json_text = parseHtmlEntities(json.content.rendered);
|
||||||
}
|
callback(json_text, article);
|
||||||
});
|
} catch (err) {
|
||||||
}
|
console.log(err);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJsonUrlAdd(json_text, article, art_options = {}) {
|
function getJsonUrlAdd(json_text, article, art_options = {}) {
|
||||||
|
@ -6185,7 +6198,7 @@ function getJsonUrlAdd(json_text, article, art_options = {}) {
|
||||||
article.parentNode.replaceChild(article_new, article);
|
article.parentNode.replaceChild(article_new, article);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJsonUrl(paywall_sel, paywall_action = '', article_sel, art_options = {}) {
|
function getJsonUrl(paywall_sel, paywall_action = '', article_sel, art_options = {}, article_id = '') {
|
||||||
let paywall = document.querySelectorAll(paywall_sel);
|
let paywall = document.querySelectorAll(paywall_sel);
|
||||||
let article = document.querySelector(article_sel);
|
let article = document.querySelector(article_sel);
|
||||||
if (paywall.length && article && dompurify_loaded) {
|
if (paywall.length && article && dompurify_loaded) {
|
||||||
|
@ -6193,7 +6206,7 @@ function getJsonUrl(paywall_sel, paywall_action = '', article_sel, art_options =
|
||||||
getJsonUrlText(article, (json_text, article) => {
|
getJsonUrlText(article, (json_text, article) => {
|
||||||
if (json_text && article)
|
if (json_text && article)
|
||||||
getJsonUrlAdd(json_text, article, art_options);
|
getJsonUrlAdd(json_text, article, art_options);
|
||||||
});
|
}, article_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,5 +51,5 @@
|
||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
"*://*/*"
|
"*://*/*"
|
||||||
],
|
],
|
||||||
"version": "3.4.7.5"
|
"version": "3.4.7.6"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"###_remove_sites": {
|
"###_remove_sites": {
|
||||||
"cs_code": "africaintelligence.fr, al-monitor.com, arkansasonline.com, bild.de, columbian.com, die-glocke.de, doorbraak.be, gp.se, intelligenceonline.com, intelligenceonline.fr, interestingengineering.com, jeuneafrique.com, lalettrea.fr, lastampa.it, lavozdegalicia.es, law360.com, lepoint.fr, limburger.nl, manager-magazin.de, ouest-france.fr, pressherald.com, repubblica.it, risk.net, saechsische.de, sueddeutsche.de, swarajyamag.com, theepochtimes.com, theinformation.com, thestage.co.uk, thetexan.news, theweek.com, vikatan.com",
|
"cs_code": "africaintelligence.fr, al-monitor.com, arkansasonline.com, bild.de, columbian.com, die-glocke.de, doorbraak.be, gp.se, handelsblatt.com, intelligenceonline.com, intelligenceonline.fr, interestingengineering.com, jeuneafrique.com, lalettrea.fr, lastampa.it, lavozdegalicia.es, law360.com, lepoint.fr, limburger.nl, manager-magazin.de, ouest-france.fr, politiken.dk, pressherald.com, repubblica.it, risk.net, saechsische.de, sueddeutsche.de, swarajyamag.com, theepochtimes.com, theinformation.com, thestage.co.uk, thetexan.news, theweek.com, vikatan.com",
|
||||||
"domain": "###"
|
"domain": "###"
|
||||||
},
|
},
|
||||||
"Abajournal.com": {
|
"Abajournal.com": {
|
||||||
|
@ -81,10 +81,10 @@
|
||||||
"domain": "businessam.be"
|
"domain": "businessam.be"
|
||||||
},
|
},
|
||||||
"Businessinsider.de": {
|
"Businessinsider.de": {
|
||||||
"add_ext_link": "div.piano-article__paywall|div.piano-article__content>p",
|
"add_ext_link": "div.piano-article__paywall|div.piano-article__content",
|
||||||
"add_ext_link_type": "google_search_tool",
|
"add_ext_link_type": "google_search_tool",
|
||||||
"allow_cookies": 1,
|
"allow_cookies": 1,
|
||||||
"block_regex": "\\.tinypass\\.com",
|
"block_regex": "\\.piano\\.io",
|
||||||
"domain": "businessinsider.de"
|
"domain": "businessinsider.de"
|
||||||
},
|
},
|
||||||
"Businessnews.com.au": {
|
"Businessnews.com.au": {
|
||||||
|
@ -275,12 +275,6 @@
|
||||||
"domain": "group_nation_media",
|
"domain": "group_nation_media",
|
||||||
"group": "monitor.co.ug,nation.africa,thecitizen.co.tz"
|
"group": "monitor.co.ug,nation.africa,thecitizen.co.tz"
|
||||||
},
|
},
|
||||||
"Handelsblatt.com (refresh)": {
|
|
||||||
"add_ext_link": "app-paywall|app-storyline-paragraph",
|
|
||||||
"add_ext_link_type": "archive.is",
|
|
||||||
"allow_cookies": 1,
|
|
||||||
"domain": "handelsblatt.com"
|
|
||||||
},
|
|
||||||
"Hartenergy.com": {
|
"Hartenergy.com": {
|
||||||
"allow_cookies": 1,
|
"allow_cookies": 1,
|
||||||
"block_regex": "js\\.pelcro\\.com",
|
"block_regex": "js\\.pelcro\\.com",
|
||||||
|
@ -540,12 +534,6 @@
|
||||||
"Physicsworld.com": {
|
"Physicsworld.com": {
|
||||||
"domain": "physicsworld.com"
|
"domain": "physicsworld.com"
|
||||||
},
|
},
|
||||||
"Politiken.dk": {
|
|
||||||
"add_ext_link": "div.stopsign|div.article__body",
|
|
||||||
"add_ext_link_type": "google_search_tool",
|
|
||||||
"allow_cookies": 1,
|
|
||||||
"domain": "politiken.dk"
|
|
||||||
},
|
|
||||||
"Portfolio.hu": {
|
"Portfolio.hu": {
|
||||||
"add_ext_link": "section.paywall|article",
|
"add_ext_link": "section.paywall|article",
|
||||||
"add_ext_link_type": "archive.is",
|
"add_ext_link_type": "archive.is",
|
||||||
|
@ -597,10 +585,6 @@
|
||||||
"allow_cookies": 1,
|
"allow_cookies": 1,
|
||||||
"domain": "rp-online.de"
|
"domain": "rp-online.de"
|
||||||
},
|
},
|
||||||
"Rp.pl": {
|
|
||||||
"domain": "rp.pl",
|
|
||||||
"ld_google_webcache": "div.paywallComponentWrapper|div.main--content--body"
|
|
||||||
},
|
|
||||||
"Schwaebische-post.de": {
|
"Schwaebische-post.de": {
|
||||||
"allow_cookies": 1,
|
"allow_cookies": 1,
|
||||||
"block_regex": "\\.schwaebische-post\\.de\\/sub\\/js\\/pc-offer-west\\.js",
|
"block_regex": "\\.schwaebische-post\\.de\\/sub\\/js\\/pc-offer-west\\.js",
|
||||||
|
|
|
@ -573,6 +573,7 @@
|
||||||
"*://*.rnd.de/*",
|
"*://*.rnd.de/*",
|
||||||
"*://*.roadandtrack.com/*",
|
"*://*.roadandtrack.com/*",
|
||||||
"*://*.rollingstone.com/*",
|
"*://*.rollingstone.com/*",
|
||||||
|
"*://*.rp.pl/*",
|
||||||
"*://*.rubbernews.com/*",
|
"*://*.rubbernews.com/*",
|
||||||
"*://*.rugbypass.com/*",
|
"*://*.rugbypass.com/*",
|
||||||
"*://*.rugbyrama.fr/*",
|
"*://*.rugbyrama.fr/*",
|
||||||
|
@ -823,5 +824,5 @@
|
||||||
"*://archive.vn/*",
|
"*://archive.vn/*",
|
||||||
"*://webcache.googleusercontent.com/*"
|
"*://webcache.googleusercontent.com/*"
|
||||||
],
|
],
|
||||||
"version": "3.4.7.5"
|
"version": "3.4.7.6"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
// defaultSites are loaded from sites.js at installation extension (and are saved to local storage)
|
var ext_api = (typeof browser === 'object') ? browser : chrome;
|
||||||
// var defaultSites = {};
|
|
||||||
var ext_api = chrome || browser;
|
|
||||||
|
|
||||||
// Saves options to ext_api.storage
|
// Saves options to ext_api.storage
|
||||||
function save_options() {
|
function save_options() {
|
||||||
var gh_url = document.getElementById('bypass_sites').value;
|
|
||||||
var inputEls = document.querySelectorAll('#bypass_sites input');
|
var inputEls = document.querySelectorAll('#bypass_sites input');
|
||||||
var sites = {};
|
var sites = {};
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,9 @@ function show_update(ext_version_new, check = true) {
|
||||||
ext_version_new: ext_version_new
|
ext_version_new: ext_version_new
|
||||||
});
|
});
|
||||||
anchorEl = document.createElement('a');
|
anchorEl = document.createElement('a');
|
||||||
if (manifestData.applications && manifestData.applications.gecko.id.includes('magnolia')) {
|
anchorEl.target = '_blank';
|
||||||
|
let manifest_id = manifestData.applications ? manifestData.applications.gecko.id : '';
|
||||||
|
if (manifest_id && manifest_id.includes('magnolia')) {
|
||||||
if (installType === 'development')
|
if (installType === 'development')
|
||||||
anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-' + url_loc + '-clean';
|
anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-' + url_loc + '-clean';
|
||||||
else {
|
else {
|
||||||
|
@ -31,9 +33,15 @@ function show_update(ext_version_new, check = true) {
|
||||||
anchorEl.innerText = 'New release v' + ext_version_new;
|
anchorEl.innerText = 'New release v' + ext_version_new;
|
||||||
anchorEl.target = '_blank';
|
anchorEl.target = '_blank';
|
||||||
versionString_new.appendChild(anchorEl);
|
versionString_new.appendChild(anchorEl);
|
||||||
|
let warning;
|
||||||
if (!manifestData.name.includes('Clean')) {
|
if (!manifestData.name.includes('Clean')) {
|
||||||
|
warning = 'fake';
|
||||||
|
} else if (manifest_id && !manifest_id.match(/^magnolia(_limited_permissions)?@12\.34$/)) {
|
||||||
|
warning = 'cloned';
|
||||||
|
}
|
||||||
|
if (warning) {
|
||||||
let par = document.createElement('p');
|
let par = document.createElement('p');
|
||||||
par.innerHTML = "<strong>You've installed a fake version of BPC (check GitLab)</strong>";
|
par.innerHTML = "<strong>You've installed a " + warning + " version of BPC (check GitLab)</strong>";
|
||||||
versionString_new.appendChild(par);
|
versionString_new.appendChild(par);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
sites.js
4
sites.js
|
@ -1964,6 +1964,10 @@ var defaultSites = {
|
||||||
block_js_inline: /\.rugbypass\.com\/plus\//,
|
block_js_inline: /\.rugbypass\.com\/plus\//,
|
||||||
block_regex: /\.tinypass\.com\//
|
block_regex: /\.tinypass\.com\//
|
||||||
},
|
},
|
||||||
|
"Rzeczpospolita": {
|
||||||
|
domain: "rp.pl",
|
||||||
|
cs_dompurify: 1
|
||||||
|
},
|
||||||
"S&P Global": {
|
"S&P Global": {
|
||||||
domain: "spglobal.com",
|
domain: "spglobal.com",
|
||||||
allow_cookies: 1,
|
allow_cookies: 1,
|
||||||
|
|
|
@ -70,6 +70,11 @@
|
||||||
"block_regex": "\\.cloudfront\\.net\\/embed\\/widget\\/subx.+\\.js",
|
"block_regex": "\\.cloudfront\\.net\\/embed\\/widget\\/subx.+\\.js",
|
||||||
"upd_version": "3.4.7.6"
|
"upd_version": "3.4.7.6"
|
||||||
},
|
},
|
||||||
|
"Rzeczpospolita": {
|
||||||
|
"domain": "rp.pl",
|
||||||
|
"ld_google_webcache": "div.paywallComponentWrapper|div.main--content--body",
|
||||||
|
"upd_version": "3.4.7.6"
|
||||||
|
},
|
||||||
"The Economist": {
|
"The Economist": {
|
||||||
"domain": "economist.com",
|
"domain": "economist.com",
|
||||||
"allow_cookies": 1,
|
"allow_cookies": 1,
|
||||||
|
|
Loading…
Reference in a new issue