Add El Mercurio de Valparaíso (Chile)
This commit is contained in:
parent
380bec5b88
commit
d1bcaf0cc1
@ -317,6 +317,7 @@ Visit the [Firefox repository](https://bitbucket.org/magnolia1234/bypass-paywall
|
||||
[Valor Econômico](https://valor.globo.com)*
|
||||
##### Chile
|
||||
[El Mercurio](https://digital.elmercurio.com) -
|
||||
[El Mercurio de Valparaíso](https://www.mercuriovalpo.cl) -
|
||||
[La Segunda](https://digital.lasegunda.com) -
|
||||
[La Tercera](https://www.latercera.com)
|
||||
##### Mexico
|
||||
|
@ -29,6 +29,7 @@ var allow_cookies = [
|
||||
'dn.se',
|
||||
'dvhn.nl',
|
||||
'elmercurio.com',
|
||||
'mercuriovalpo.cl',
|
||||
'eurekareport.com.au',
|
||||
'faz.net',
|
||||
'folha.uol.com.br',
|
||||
@ -184,6 +185,7 @@ var blockedRegexes = {
|
||||
'livemint.com': /(.+\.livemint\.com\/js\/localWorker\.js|analytics\.htmedia\.in\/analytics-js\/.+\.js)/,
|
||||
'lopinion.fr': /.+\.poool\.fr\/.+/,
|
||||
'lrb.co.uk': /.+\.tinypass\.com\/.+/,
|
||||
'mercuriovalpo.cl': /(.+\.mercuriovalpo\.cl\/impresa\/wp-content\/themes\/papel-digital-2019-desktop\/assets\/(vendor|\d)\.js|pram\.pasedigital\.cl\/API\/User\/Status\?)/,
|
||||
'modernhealthcare.com': /.+\.tinypass\.com\/.+/,
|
||||
'nationalgeographic.com': /.+\.blueconic\.net\/.+/,
|
||||
'nationalreview.com': /.+\.blueconic\.net\/.+/,
|
||||
@ -569,21 +571,24 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
});
|
||||
}
|
||||
|
||||
if (tabId !== -1) {
|
||||
ext_api.tabs.get(tabId, function (currentTab) {
|
||||
if (isSiteEnabled(currentTab) || medium_custom_domain) {
|
||||
ext_api.tabs.query({
|
||||
active: true,
|
||||
currentWindow: true
|
||||
}, function (tabs) {
|
||||
if (tabs.length > 0 && tabs[0].url && tabs[0].url.indexOf("http") !== -1) {
|
||||
if (isSiteEnabled({url: tabs[0].url}) || medium_custom_domain) {
|
||||
// run contentScript inside tab
|
||||
ext_api.tabs.executeScript(tabId, {
|
||||
ext_api.tabs.executeScript({
|
||||
file: 'contentScript.js',
|
||||
runAt: 'document_start'
|
||||
}, function(res) {
|
||||
}, function (res) {
|
||||
if (ext_api.runtime.lastError || res[0]) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return { requestHeaders: requestHeaders };
|
||||
}, {
|
||||
|
@ -1011,6 +1011,17 @@ else if (matchDomain("limesonline.com")) {
|
||||
}, 500); // Delay (in milliseconds)
|
||||
}
|
||||
|
||||
else if (matchDomain("mercuriovalpo.cl")) {
|
||||
let content = document.querySelector('div.content');
|
||||
if (content)
|
||||
content.setAttribute('id', 'content_new');
|
||||
let modal_wrapper = document.querySelector('div.modal-wrapper');
|
||||
removeDOMElement(modal_wrapper);
|
||||
let body_modal = document.querySelector('body.modal-open');
|
||||
if (body_modal)
|
||||
body_modal.classList.remove('modal-open');
|
||||
}
|
||||
|
||||
// General Functions
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
|
@ -147,6 +147,7 @@
|
||||
"*://*.lrb.co.uk/*",
|
||||
"*://*.mcall.com/*",
|
||||
"*://*.medium.com/*",
|
||||
"*://*.mercuriovalpo.cl/*",
|
||||
"*://*.mercurynews.com/*",
|
||||
"*://*.mexiconewsdaily.com/*",
|
||||
"*://*.miamiherald.com/*",
|
||||
|
1
sites.js
1
sites.js
@ -38,6 +38,7 @@ var defaultSites =
|
||||
"Discover Magazine": "discovermagazine.com",
|
||||
"El Comercio": "elcomercio.pe",
|
||||
"El Mercurio": "elmercurio.com",
|
||||
"El Mercurio de Valparaíso": "mercuriovalpo.cl",
|
||||
"El Mundo": "elmundo.es",
|
||||
"El País": "elpais.com",
|
||||
"Encyclopedia Britannica": "britannica.com",
|
||||
|
Loading…
x
Reference in New Issue
Block a user