Add Republic.ru

This commit is contained in:
magnolia1234 2020-06-14 18:37:06 +02:00
parent 6e12ce527f
commit 3758b47174
5 changed files with 11 additions and 1 deletions

View file

@ -207,6 +207,8 @@ Install add-on by downloading xpi-file.
[Trouw](https://www.trouw.nl) - [Trouw](https://www.trouw.nl) -
[Volkskrant](https://www.volkskrant.nl) - [Volkskrant](https://www.volkskrant.nl) -
[Vrij Nederland](https://www.vn.nl) [Vrij Nederland](https://www.vn.nl)
##### Russia
[Republic.ru](https://republic.ru)
##### Spain ##### Spain
[El Mundo](https://www.elmundo.es) - [El Mundo](https://www.elmundo.es) -
[El País](https://elpais.com) [El País](https://elpais.com)

View file

@ -123,6 +123,7 @@ const use_google_bot_default = [
'miamiherald.com', 'miamiherald.com',
'ntnews.com.au', 'ntnews.com.au',
'quora.com', 'quora.com',
'republic.ru',
'seekingalpha.com', 'seekingalpha.com',
'switzersuperreport.com.au', 'switzersuperreport.com.au',
'theathletic.co.uk', 'theathletic.co.uk',
@ -382,7 +383,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
} }
// remove cookies Discover Magazine // remove cookies Discover Magazine
if (matchUrlDomain('ctfassets.net', details.url) && matchUrlDomain('discovermagazine.com', header_referer)) { if (matchUrlDomain('ctfassets.net', details.url) && matchUrlDomain('discovermagazine.com', header_referer) && isSiteEnabled({url: 'https://www.discovermagazine.com'})) {
ext_api.cookies.getAll({domain: 'discovermagazine.com'}, function(cookies) { ext_api.cookies.getAll({domain: 'discovermagazine.com'}, function(cookies) {
for (let cookie of cookies) { for (let cookie of cookies) {
ext_api.cookies.remove({url: (cookie.secure ? "https://" : "http://") + cookie.domain + cookie.path, name: cookie.name}); ext_api.cookies.remove({url: (cookie.secure ? "https://" : "http://") + cookie.domain + cookie.path, name: cookie.name});

View file

@ -679,6 +679,11 @@ else if (matchDomain('independent.ie')) {
} }
} }
else if (matchDomain('republic.ru')) {
let paywall = document.querySelector('.paywall-section');
removeDOMElement(paywall);
}
// General Functions // General Functions
function removeDOMElement(...elements) { function removeDOMElement(...elements) {
for (let element of elements) { for (let element of elements) {

View file

@ -169,6 +169,7 @@
"*://*.quora.com/*", "*://*.quora.com/*",
"*://*.qz.com/*", "*://*.qz.com/*",
"*://*.repubblica.it/*", "*://*.repubblica.it/*",
"*://*.republic.ru/*",
"*://*.sacbee.com/*", "*://*.sacbee.com/*",
"*://*.sandiegouniontribune.com/*", "*://*.sandiegouniontribune.com/*",
"*://*.science-et-vie.com/*", "*://*.science-et-vie.com/*",

View file

@ -113,6 +113,7 @@ var defaultSites =
"Pittsburgh Post Gazette": "post-gazette.com", "Pittsburgh Post Gazette": "post-gazette.com",
"Quartz": "qz.com", "Quartz": "qz.com",
"Quora": "quora.com", "Quora": "quora.com",
"Republic.ru": "republic.ru",
"San Diego Union Tribune": "sandiegouniontribune.com", "San Diego Union Tribune": "sandiegouniontribune.com",
"San Francisco Chronicle": "sfchronicle.com", "San Francisco Chronicle": "sfchronicle.com",
"Science & Vie": "science-et-vie.com", "Science & Vie": "science-et-vie.com",