This commit is contained in:
magnolia1234 2022-03-04 16:14:14 +01:00
parent b299e03bc4
commit 79528924c9
6 changed files with 52 additions and 40 deletions

View File

@ -21,7 +21,8 @@ You can install the add-on from Mozilla add-ons (AMO): [Bypass Paywalls Clean](h
Latest add-on versions (2.4.8.0+) require a browser based on Firefox 86+ (else use the non-amo version below).\ Latest add-on versions (2.4.8.0+) require a browser based on Firefox 86+ (else use the non-amo version below).\
Or download and install the latest xpi-version from [GitLab](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases) Or download and install the latest xpi-version from [GitLab](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases)
If you want to install the latest [master ZIP-file from GitLab](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/archive/master/bypass-paywalls-firefox-clean-master.zip) use a Firefox browser which allows using unsigned add-ons like Firefox Developer Portable (go to about:config and set xpinstall.signatures.required to false) or LibreWolf (for both no automatic updates of add-on). If you want to install the latest [master ZIP-file from GitLab](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/archive/master/bypass-paywalls-firefox-clean-master.zip) use a Firefox browser which allows using unsigned add-ons like Firefox Developer Portable (go to about:config and set xpinstall.signatures.required to false) or LibreWolf (for both no automatic updates of add-on).\
Or load a temporary add-on in regular Firefox (go to about:debugging#/runtime/this-firefox & load manifest.json from unpacked folder (of master-zip)).
By default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for non-listed sites). You can also just request permissions for the custom sites you added yourself (or click `clear cookies` (BPC-icon) to ask for permission for current site). By default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for non-listed sites). You can also just request permissions for the custom sites you added yourself (or click `clear cookies` (BPC-icon) to ask for permission for current site).

View File

@ -7,7 +7,7 @@ var manifestData = ext_api.runtime.getManifest();
var ext_name = manifestData.name; var ext_name = manifestData.name;
var ext_version = manifestData.version; var ext_version = manifestData.version;
const cs_limit_except = ['elespanol.com', 'faz.net', 'inkl.com', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk']; const cs_limit_except = ['elespanol.com', 'faz.net', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk'];
const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'iltalehti.fi', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(fr_groupe_sud_ouest_domains, nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains); const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'iltalehti.fi', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(fr_groupe_sud_ouest_domains, nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains);
var currentTabUrl = ''; var currentTabUrl = '';
var csDone = false; var csDone = false;
@ -487,12 +487,14 @@ ext_api.webRequest.onBeforeRequest.addListener(function (details) {
["blocking"] ["blocking"]
); );
// inkl disable newsletter login // inkl bypass
ext_api.webRequest.onBeforeRequest.addListener(function (details) { ext_api.webRequest.onBeforeRequest.addListener(function (details) {
if (!isSiteEnabled(details)) { if (!isSiteEnabled(details)) {
return; return;
} }
var updatedUrl = details.url.replace(/etok=[\w]*&/, ''); var updatedUrl = details.url.replace(/etok=[\w]*&/, '');
if (details.url.includes('/signin?') && details.url.includes('redirect_to='))
updatedUrl = 'https://www.inkl.com' + decodeURIComponent(updatedUrl.split('redirect_to=')[1]);
return { redirectUrl: updatedUrl }; return { redirectUrl: updatedUrl };
}, },
{urls:["*://*.inkl.com/*"], types:["main_frame"]}, {urls:["*://*.inkl.com/*"], types:["main_frame"]},
@ -914,7 +916,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
(matchUrlDomain('elespanol.com', header_referer) && matchUrlDomain('eestatic.com', details.url)) || (matchUrlDomain('elespanol.com', header_referer) && matchUrlDomain('eestatic.com', details.url)) ||
(matchUrlDomain('elmercurio.com', header_referer) && matchUrlDomain('emol.cl', details.url)) || (matchUrlDomain('elmercurio.com', header_referer) && matchUrlDomain('emol.cl', details.url)) ||
(matchUrlDomain('epaper.thetimes.co.uk', header_referer) && matchUrlDomain(['prcdn.co'], details.url)) || (matchUrlDomain('epaper.thetimes.co.uk', header_referer) && matchUrlDomain(['prcdn.co'], details.url)) ||
(matchUrlDomain('inkl.com', header_referer) && matchUrlDomain('cdn.jsdelivr.net', details.url)) ||
(matchUrlDomain('law360.com', header_referer) && matchUrlDomain('law360news.com', details.url)) || (matchUrlDomain('law360.com', header_referer) && matchUrlDomain('law360news.com', details.url)) ||
(matchUrlDomain('marketwatch.com', header_referer) && matchUrlDomain('wsj.net', details.url)) || (matchUrlDomain('marketwatch.com', header_referer) && matchUrlDomain('wsj.net', details.url)) ||
(matchUrlDomain('nationalgeographic.com', header_referer) && matchUrlDomain('natgeofe.com', details.url)) || (matchUrlDomain('nationalgeographic.com', header_referer) && matchUrlDomain('natgeofe.com', details.url)) ||

View File

@ -5,6 +5,7 @@ Post-release
Add Causeur.fr Add Causeur.fr
Add La Opinion de Malaga Add La Opinion de Malaga
Fix Iltalehti.fi (Youtube video/image no source) Fix Iltalehti.fi (Youtube video/image no source)
Fix Inkl
* v2.5.8.0 (2022-02-27) * v2.5.8.0 (2022-02-27)
Add Cycling Tips Add Cycling Tips

View File

@ -2695,39 +2695,7 @@ else if (matchDomain('infzm.com')) {
} }
else if (matchDomain('inkl.com')) { else if (matchDomain('inkl.com')) {
let menu_btn = document.querySelector('div.left-buttons-container button.menu-btn'); // plus code in contentScript_once.js
if (!menu_btn) {
let article_container = document.querySelector('div.article-content-container');
if (article_container) {
article_container.setAttribute('style', 'overflow: visible; max-height: none;');
let figures = document.querySelectorAll('figure');
for (let figure of figures)
figure.setAttribute('style', 'display:block !important;');
}
let gradient_container = document.querySelector('div.gradient-container');
if (gradient_container)
gradient_container.setAttribute('style', 'height:auto;');
}
let what_is_inkl = document.querySelector('.what-is-inkl-container');
let signup = document.querySelector('.article-signup-container');
removeDOMElement(what_is_inkl, signup);
let dismiss_button = document.querySelector('div.dismiss-button-container button.btn');
if (dismiss_button)
dismiss_button.click();
let shared_banner = document.querySelector('div.shared-article-inline-banner');
removeDOMElement(shared_banner);
let dive_deeper_summary_bodies = document.querySelectorAll('div.dive-deeper-container div.summary-body');
if (dive_deeper_summary_bodies) {
for (let summary_body of dive_deeper_summary_bodies) {
if (!summary_body.querySelector('a')) {
let ng_click = summary_body.getAttribute('ng-click').replace("showArticle('", '').replace("')", '');
let weblink = document.createElement('a');
weblink.text = 'open';
weblink.href = 'https://www.inkl.com/news/' + ng_click;
summary_body.appendChild(weblink);
}
}
}
} }
else if (matchDomain('jpost.com')) { else if (matchDomain('jpost.com')) {

View File

@ -1,6 +1,47 @@
//"use strict"; //"use strict";
if (matchDomain('nationalgeographic.com')) { if (matchDomain('inkl.com')) {
window.setTimeout(function () {
let menu_btn = document.querySelector('div.left-buttons-container button.menu-btn');
if (!menu_btn) {
let article_container = document.querySelector('div.article-content-container');
if (article_container) {
article_container.setAttribute('style', 'overflow: visible; max-height: none;');
let figures = document.querySelectorAll('figure');
for (let figure of figures)
figure.setAttribute('style', 'display:block !important;');
}
let gradient_container = document.querySelector('div.gradient-container');
if (gradient_container)
gradient_container.setAttribute('style', 'height:auto;');
let locked = document.querySelector('div.locked');
if (locked)
locked.classList.remove('locked');
}
let what_is_inkl = document.querySelector('.what-is-inkl-container, .features-panel');
let signup = document.querySelector('.article-signup-container, .locked-sign-up-container');
removeDOMElement(what_is_inkl, signup);
let dismiss_button = document.querySelector('div.dismiss-button-container button.btn');
if (dismiss_button)
dismiss_button.click();
let shared_banner = document.querySelector('div.shared-article-inline-banner');
removeDOMElement(shared_banner);
let dive_deeper_summary_bodies = document.querySelectorAll('div.dive-deeper-container div.summary-body');
if (dive_deeper_summary_bodies) {
for (let summary_body of dive_deeper_summary_bodies) {
if (!summary_body.querySelector('a')) {
let ng_click = summary_body.getAttribute('ng-click').replace("showArticle('", '').replace("')", '');
let weblink = document.createElement('a');
weblink.text = 'open';
weblink.href = 'https://www.inkl.com/news/' + ng_click;
summary_body.appendChild(weblink);
}
}
}
}, 1000);
}
else if (matchDomain('nationalgeographic.com')) {
function natgeo_func(node) { function natgeo_func(node) {
removeDOMElement(node); removeDOMElement(node);
let body = document.querySelector('body[class]'); let body = document.querySelector('body[class]');

View File

@ -39,6 +39,7 @@
], ],
"content_scripts": [{ "content_scripts": [{
"matches": [ "matches": [
"*://*.inkl.com/*",
"*://*.nationalgeographic.com/*", "*://*.nationalgeographic.com/*",
"*://*.nyteknik.se/*" "*://*.nyteknik.se/*"
], ],
@ -613,7 +614,6 @@
"*://*.gannett-cdn.com/*", "*://*.gannett-cdn.com/*",
"*://*.gitlab.com/magnolia1234/*", "*://*.gitlab.com/magnolia1234/*",
"*://*.hearstnp.com/*", "*://*.hearstnp.com/*",
"*://*.jsdelivr.net/*",
"*://*.lightboxcdn.com/*", "*://*.lightboxcdn.com/*",
"*://*.loader-cdn.azureedge.net/*", "*://*.loader-cdn.azureedge.net/*",
"*://*.mcclatchy-wires.com/*", "*://*.mcclatchy-wires.com/*",
@ -629,5 +629,5 @@
"*://*.wallkit.net/*", "*://*.wallkit.net/*",
"*://*.wsj.net/*" "*://*.wsj.net/*"
], ],
"version": "2.5.8.3" "version": "2.5.8.4"
} }