mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 02:34:26 +02:00
Add elmundo.es (most articles)
This commit is contained in:
parent
6f652eedf2
commit
ef0d40be15
@ -69,7 +69,8 @@
|
||||
"*://*.wsj.com/*",
|
||||
"*://*.hbr.org/*",
|
||||
"*://*.financialpost.com/*",
|
||||
"*://*.sueddeutsche.de/*"
|
||||
"*://*.sueddeutsche.de/*",
|
||||
"*://*.elmundo.es/*"
|
||||
],
|
||||
"js": ["src/js/contentScript.js"]
|
||||
}
|
||||
@ -266,7 +267,8 @@
|
||||
"*://*.ambito/*",
|
||||
"*://*.sueddeutsche.de/*",
|
||||
"*://*.spectator.us/*",
|
||||
"*://*.humo.be/*"
|
||||
"*://*.humo.be/*",
|
||||
"*://*.elmundo.es/*"
|
||||
],
|
||||
"version": "1.7.8"
|
||||
}
|
||||
|
@ -73,7 +73,8 @@ const allowCookies = [
|
||||
'haaretz.com',
|
||||
'themarker.com',
|
||||
'sueddeutsche.de',
|
||||
'gelocal.it'
|
||||
'gelocal.it',
|
||||
'elmundo.es'
|
||||
];
|
||||
|
||||
// Removes cookies after page load
|
||||
@ -237,7 +238,8 @@ const blockedRegexes = {
|
||||
'thehindu.com': /ajax\.cloudflare\.com\/cdn-cgi\/scripts\/.+\/cloudflare-static\/rocket-loader\.min\.js/,
|
||||
'technologyreview.com': /.+\.blueconic\.net\/.+/,
|
||||
'spectator.us': /(cdn\.cxense\.com\/.+|\.tinypass\.com\/.+)/,
|
||||
'gelocal.it': /(\.repstatic\.it\/minify\/sites\/gelocal\/.+\/config\.cache(_\d)?\.php|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/
|
||||
'gelocal.it': /(\.repstatic\.it\/minify\/sites\/gelocal\/.+\/config\.cache(_\d)?\.php|cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js)/,
|
||||
'elmundo.es': /cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js/
|
||||
};
|
||||
|
||||
const userAgentDesktop = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
|
||||
|
@ -1,4 +1,4 @@
|
||||
if (!matchDomain(['seekingalpha.com', 'sfchronicle.com', 'cen.acs.org', 'thetimes.co.uk'])) {
|
||||
if (!matchDomain(['seekingalpha.com', 'sfchronicle.com', 'cen.acs.org', 'thetimes.co.uk', 'elmundo.es'])) {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
|
||||
@ -346,17 +346,16 @@ if (matchDomain('elmercurio.com')) {
|
||||
}, 500); // Delay (in milliseconds)
|
||||
} else if (matchDomain('elperiodico.com')) {
|
||||
setTimeout(function () {
|
||||
const unavailableArea = document.querySelector(".closed");
|
||||
const infoBox = document.querySelector(".ep-masPeriodico-info");
|
||||
const unavailableArea = document.querySelector('.closed');
|
||||
const infoBox = document.querySelector('.ep-masPeriodico-info');
|
||||
if (unavailableArea) {
|
||||
unavailableArea.classList.remove("closed");
|
||||
unavailableArea.classList.remove('closed');
|
||||
}
|
||||
if (infoBox) {
|
||||
infoBox.parentNode.removeChild(infoBox);
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
else if (matchDomain('techinasia.com')) {
|
||||
}
|
||||
}, 1000);
|
||||
} else if (matchDomain('techinasia.com')) {
|
||||
const paywall = document.querySelector('.paywall-content');
|
||||
if (paywall) {
|
||||
paywall.classList.remove('paywall-content');
|
||||
@ -480,7 +479,7 @@ if (matchDomain('elmercurio.com')) {
|
||||
.forEach(function (el) {
|
||||
el.removeAttribute('class');
|
||||
});
|
||||
}, 2000); // Delay (in milliseconds)
|
||||
}, 1000); // Delay (in milliseconds)
|
||||
} else if (matchDomain('theatlantic.com')) {
|
||||
// Remove all nudge elements
|
||||
document.querySelectorAll('div[class*="c-nudge"]').forEach(function (el) {
|
||||
@ -572,6 +571,26 @@ if (matchDomain('elmercurio.com')) {
|
||||
const ampAds = document.querySelectorAll('amp-ad');
|
||||
removeDOMElement(...ampAds);
|
||||
}
|
||||
} else if (matchDomain('elmundo.es')) {
|
||||
const premium = document.querySelector('.ue-c-article__premium');
|
||||
const url = window.location.href;
|
||||
if (!url.includes('/amp.' + 'elmundo.es' + '/')) {
|
||||
if (premium) {
|
||||
removeDOMElement(premium);
|
||||
window.location.href = window.location.href.replace('/www.', '/amp.');
|
||||
}
|
||||
} else {
|
||||
const paywall = document.querySelector('div[amp-access="authorized!=true"]');
|
||||
if (paywall) {
|
||||
removeDOMElement(paywall);
|
||||
const divHidden = document.querySelector('div[amp-access="authorized=true"]');
|
||||
if (divHidden) {
|
||||
divHidden.removeAttribute('amp-access-hide');
|
||||
}
|
||||
}
|
||||
const advertising = document.querySelectorAll('.advertising, amp-embed');
|
||||
removeDOMElement(...advertising);
|
||||
}
|
||||
}
|
||||
|
||||
function matchDomain (domains) {
|
||||
|
@ -31,7 +31,8 @@ const defaultSites = {
|
||||
'Domani': 'editorialedomani.it',
|
||||
'Dynamed Plus': 'dynamed.com',
|
||||
'Eindhovens Dagblad': 'ed.nl',
|
||||
'El Mercurio':'elmercurio.com',
|
||||
'El Mercurio': 'elmercurio.com',
|
||||
'El Mundo': 'elmundo.es',
|
||||
'El Pais': 'elpais.com',
|
||||
'El Periodico': 'elperiodico.com',
|
||||
'Elu24': 'elu24.ee',
|
||||
|
Loading…
x
Reference in New Issue
Block a user