Add Esprit (France)
Plus fix-update Mexico News Daily
This commit is contained in:
parent
b3a9251d8c
commit
68741fc8af
@ -210,6 +210,7 @@ Alma Talent sites (grouped in options) like
|
||||
[Alternatives Economiques](https://www.alternatives-economiques.fr) -
|
||||
[Challenges](https://www.challenges.fr) –
|
||||
[Charlie Hebdo](https://charliehebdo.fr) -
|
||||
[Esprit](https://esprit.presse.fr) -
|
||||
[L'Écho](https://lecho.be) -
|
||||
[L'Opinion](https://www.lopinion.fr) –
|
||||
[La Croix](https://www.la-croix.com) -
|
||||
|
@ -39,11 +39,13 @@ var allow_cookies_default = [
|
||||
'elmundo.es',
|
||||
'elpais.com',
|
||||
'elperiodico.com',
|
||||
'esprit.presse.fr',
|
||||
'eurekareport.com.au',
|
||||
'faz.net',
|
||||
'financialpost.com',
|
||||
'folha.uol.com.br',
|
||||
'ftm.nl',
|
||||
'fortune.com',
|
||||
'gelocal.it',
|
||||
'gestion.pe',
|
||||
'gva.be',
|
||||
@ -63,7 +65,6 @@ var allow_cookies_default = [
|
||||
'lesoir.be',
|
||||
'limesonline.com',
|
||||
'lrb.co.uk',
|
||||
'mexiconewsdaily.com',
|
||||
'modernhealthcare.com',
|
||||
'nationalgeographic.com',
|
||||
'nationalpost.com',
|
||||
@ -794,6 +795,14 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
})
|
||||
}
|
||||
|
||||
// random IP for esprit.presse.fr
|
||||
if (matchUrlDomain('esprit.presse.fr', details.url)) {
|
||||
requestHeaders.push({
|
||||
"name": "X-Forwarded-For",
|
||||
"value": randomIP()
|
||||
})
|
||||
}
|
||||
|
||||
// remove cookies before page load
|
||||
if (!matchUrlDomain(allow_cookies, details.url)) {
|
||||
requestHeaders = requestHeaders.map(function(requestHeader) {
|
||||
@ -1087,3 +1096,14 @@ function getParameterByName(name, url) {
|
||||
function stripQueryStringAndHashFromPath(url) {
|
||||
return url.split("?")[0].split("#")[0];
|
||||
}
|
||||
|
||||
function randomInt(max) {
|
||||
return Math.floor(Math.random() * Math.floor(max));
|
||||
}
|
||||
|
||||
function randomIP() {
|
||||
let rndmIP = [];
|
||||
for (let n = 0; n < 4; n++)
|
||||
rndmIP.push(randomInt(254) + 1);
|
||||
return rndmIP.join('.');
|
||||
}
|
||||
|
@ -3,9 +3,11 @@ Changelog Bypass Paywalls Clean - Chrome
|
||||
|
||||
Post-release
|
||||
Add El Comercio, Ideal & La Voz de Cadiz (Spain)
|
||||
Add Esprit (France)
|
||||
Add The Spectator USA
|
||||
Remove Aftonbladet.se (obsolete)
|
||||
Fix-update El Mercurio & La Segunda (mobile)
|
||||
Fix-update Mexico News Daily
|
||||
Fix-update Telegraph.co.uk (amp pages)
|
||||
Fix-update The New Yorker (embed)
|
||||
Update popup (Twitter)
|
||||
|
@ -285,13 +285,8 @@ else if (matchDomain("sloanreview.mit.edu")) {
|
||||
}
|
||||
|
||||
else if (matchDomain("mexiconewsdaily.com")) {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const sideNotification = document.querySelector('.pigeon-widget-prompt');
|
||||
const subMessage = document.querySelector('.sub_message_container');
|
||||
const popup = document.querySelector('.popupally-pro-outer-full-width-7-fluid_qemskqa');
|
||||
const bgFocusRemoverId = document.getElementById('popup-box-pro-gfcr-7');
|
||||
removeDOMElement(sideNotification, subMessage, popup, bgFocusRemoverId);
|
||||
});
|
||||
let cpro_overlay = document.querySelector('.cpro-overlay');
|
||||
removeDOMElement(cpro_overlay);
|
||||
}
|
||||
|
||||
else if (matchDomain("the-american-interest.com")) {
|
||||
@ -1761,6 +1756,11 @@ else if (matchDomain("telegraph.co.uk")) {
|
||||
}
|
||||
}
|
||||
|
||||
else if (matchDomain('esprit.presse.fr')) {
|
||||
let paywall = document.querySelector('.panel-popup-paywall');
|
||||
removeDOMElement(paywall);
|
||||
}
|
||||
|
||||
// General Functions
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
|
@ -326,6 +326,7 @@
|
||||
"*://*.wr.de/*",
|
||||
"*://*.wsj.com/*",
|
||||
"*://*.zeit.de/*",
|
||||
"*://esprit.presse.fr/*",
|
||||
"*://*.apnarm.net.au/*",
|
||||
"*://*.blueconic.net/*",
|
||||
"*://*.matheranalytics.com/*",
|
||||
@ -357,5 +358,5 @@
|
||||
"*://*.repstatic.it/*",
|
||||
"*://*.userzoom.com/*"
|
||||
],
|
||||
"version": "1.9.7.4"
|
||||
"version": "1.9.7.5"
|
||||
}
|
4
popup.js
4
popup.js
@ -18,7 +18,7 @@ function popup_show_toggle(domain) {
|
||||
site_switch_span.appendChild(labelEl);
|
||||
document.getElementById("site_switch").addEventListener('click', function () {
|
||||
ext_api.extension.getBackgroundPage().site_switch();
|
||||
close();
|
||||
try {open(location, '_self').close()} catch(err) {false}
|
||||
});
|
||||
}
|
||||
};
|
||||
@ -26,5 +26,5 @@ ext_api.extension.getBackgroundPage().popup_show_toggle_tab(popup_show_toggle);
|
||||
|
||||
document.getElementById("clear_cookies").addEventListener('click', function () {
|
||||
ext_api.extension.getBackgroundPage().clear_cookies();
|
||||
close();
|
||||
try {open(location, '_self').close()} catch(err) {false}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user