Add Rp.pl

Update ld_json_url (default url)
merge-requests/17/head
magnolia1234 5 months ago
parent 0344b142b0
commit 6b8c669a13

@ -766,6 +766,9 @@ Grouped in options:\
[TradeWinds](https://www.tradewindsnews.com) -
[Upstream](https://www.upstreamonline.com)
##### Poland
[Rzeczpospolita](https://www.rp.pl)
##### Portugal
[Correio da Manhã](https://www.cmjornal.pt) -
[Record](https://www.record.pt) -

@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release
Add Bild.de (link to archive.is)
Add Rp.pl
Remove Money.it (fix obsolete)
Fix Automobilwoche.de (js)
Fix Groupe Centre France (identify sites)
@ -14,6 +15,7 @@ Fix Media Group Westfalen
Fix National Review (cookies)
Fix NYmag-sites (js)
Enable optional host permissions on Android (Firefox 120+)
Update ld_json_url (default url)
* v3.4.7.0 (2023-12-14)
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"]')) {
let pathname = window.location.pathname;
let article_id;
if (pathname.includes('-p-'))
article_id = pathname.split('-p-')[1].split('/')[0];
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');
hideDOMElement(ads);
if (!matchDomain('ruhrnachrichten.de')) {
@ -4568,6 +4572,11 @@ else if (matchDomain('quora.com')) {
}, 500);
}
else if (matchDomain('rp.pl')) {
let url = window.location.href;
getGoogleWebcache(url, 'div.paywallComponentWrapper', '', 'div.main--content--body');
}
else if (matchDomain('rugbypass.com')) {
if (window.location.pathname.startsWith('/plus/')) {
let paywall = document.querySelector('.premium-fold-bottom');
@ -6141,22 +6150,26 @@ function findKeyJson(json, keys, min_val_len = 0) {
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 = json_url_dom.href;
fetch(json_url)
.then(response => {
if (response.ok) {
response.json().then(json => {
try {
let json_text = parseHtmlEntities(json.content.rendered);
callback(json_text, article);
} catch (err) {
console.log(err);
}
});
}
});
if (!json_url && article_id)
json_url = 'https://' + window.location.hostname + '/wp-json/wp/v2/posts/' + article_id;
if (json_url) {
fetch(json_url)
.then(response => {
if (response.ok) {
response.json().then(json => {
try {
let json_text = parseHtmlEntities(json.content.rendered);
callback(json_text, article);
} catch (err) {
console.log(err);
}
});
}
});
}
}
function getJsonUrlAdd(json_text, article, art_options = {}) {
@ -6185,7 +6198,7 @@ function getJsonUrlAdd(json_text, article, art_options = {}) {
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 article = document.querySelector(article_sel);
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) => {
if (json_text && article)
getJsonUrlAdd(json_text, article, art_options);
});
}, article_id);
}
}

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.4.7.5"
"version": "3.4.7.6"
}

@ -1,6 +1,6 @@
{
"###_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": "###"
},
"Abajournal.com": {
@ -81,10 +81,10 @@
"domain": "businessam.be"
},
"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",
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com",
"block_regex": "\\.piano\\.io",
"domain": "businessinsider.de"
},
"Businessnews.com.au": {
@ -275,12 +275,6 @@
"domain": "group_nation_media",
"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": {
"allow_cookies": 1,
"block_regex": "js\\.pelcro\\.com",
@ -540,12 +534,6 @@
"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": {
"add_ext_link": "section.paywall|article",
"add_ext_link_type": "archive.is",
@ -597,10 +585,6 @@
"allow_cookies": 1,
"domain": "rp-online.de"
},
"Rp.pl": {
"domain": "rp.pl",
"ld_google_webcache": "div.paywallComponentWrapper|div.main--content--body"
},
"Schwaebische-post.de": {
"allow_cookies": 1,
"block_regex": "\\.schwaebische-post\\.de\\/sub\\/js\\/pc-offer-west\\.js",

@ -573,6 +573,7 @@
"*://*.rnd.de/*",
"*://*.roadandtrack.com/*",
"*://*.rollingstone.com/*",
"*://*.rp.pl/*",
"*://*.rubbernews.com/*",
"*://*.rugbypass.com/*",
"*://*.rugbyrama.fr/*",
@ -823,5 +824,5 @@
"*://archive.vn/*",
"*://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 defaultSites = {};
var ext_api = chrome || browser;
var ext_api = (typeof browser === 'object') ? browser : chrome;
// Saves options to ext_api.storage
function save_options() {
var gh_url = document.getElementById('bypass_sites').value;
var inputEls = document.querySelectorAll('#bypass_sites input');
var sites = {};

@ -18,7 +18,9 @@ function show_update(ext_version_new, check = true) {
ext_version_new: ext_version_new
});
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')
anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-' + url_loc + '-clean';
else {
@ -31,9 +33,15 @@ function show_update(ext_version_new, check = true) {
anchorEl.innerText = 'New release v' + ext_version_new;
anchorEl.target = '_blank';
versionString_new.appendChild(anchorEl);
let warning;
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');
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);
}
}

@ -1964,6 +1964,10 @@ var defaultSites = {
block_js_inline: /\.rugbypass\.com\/plus\//,
block_regex: /\.tinypass\.com\//
},
"Rzeczpospolita": {
domain: "rp.pl",
cs_dompurify: 1
},
"S&P Global": {
domain: "spglobal.com",
allow_cookies: 1,

@ -70,6 +70,11 @@
"block_regex": "\\.cloudfront\\.net\\/embed\\/widget\\/subx.+\\.js",
"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": {
"domain": "economist.com",
"allow_cookies": 1,

Loading…
Cancel
Save