Fix The New Statesman (version US/UK)

Also enable Javascript & remove banner.
merge-requests/1/head
magnolia1234 4 years ago committed by GitHub
parent 99e866674b
commit b8fbc34ad3

@ -50,7 +50,6 @@
[MIT Technology Review](https://www.technologyreview.com)\
[Mountain View Voice](https://www.mv-voice.com)\
[National Post](https://www.nationalpost.com)\
[New Statesman](https://www.newstatesman.com)\
[New York Magazine](https://www.nymag.com)\
[New Zealand Herald](https://www.nzherald.co.nz)\
[Newcastle Herald](https://www.newcastleherald.com.au)\
@ -86,6 +85,7 @@
[The Mercury Tasmania](https://www.themercury.com.au)\
[The Morning Call](https://www.mcall.com)\
[The Nation](https://www.thenation.com)\
[The New Statesman](https://www.newstatesman.com)\
[The New York Times](https://www.nytimes.com)\
[The New Yorker](https://www.newyorker.com)\
[The News-Gazette](https://www.news-gazette.com)\

@ -46,7 +46,6 @@ var defaultSites = {
'MIT Technology Review': 'technologyreview.com',
'Mountain View Voice': 'mv-voice.com',
'National Post': 'nationalpost.com',
'New Statesman': 'newstatesman.com',
'New York Magazine': 'nymag.com',
'New Zealand Herald': 'nzherald.co.nz',
'Newcastle Herald': 'newcastleherald.com.au',
@ -84,6 +83,7 @@ var defaultSites = {
'The Mercury News': 'mercurynews.com',
'The Morning Call': 'mcall.com',
'The Nation': 'thenation.com',
'The New Statesman': 'newstatesman.com',
'The New York Times': 'nytimes.com',
'The New Yorker': 'newyorker.com',
'The News-Gazette': 'news-gazette.com',
@ -210,8 +210,9 @@ const remove_cookies = [
// select specific cookie(s) to hold from remove_cookies domains
const remove_cookies_select_hold = {
'washingtonpost.com': ['wp_gdpr'],
'qz.com': ['gdpr']
'newstatesman.com': ['STYXKEY_nsversion'],
'qz.com': ['gdpr'],
'washingtonpost.com': ['wp_gdpr']
}
// select only specific cookie(s) to drop from remove_cookies domains
@ -317,7 +318,7 @@ browser.webRequest.onBeforeRequest.addListener(function(details) {
return {cancel: true};
},
{
urls: ["*://*.newstatesman.com/*"],
urls: [],
types: ["script"]
},
["blocking"]

@ -326,6 +326,11 @@ if (window.location.href.indexOf("hbr.org") !== -1) {
removeDOMElement(popup);
}
if (window.location.href.indexOf("newstatesman.com") !== -1) {
const tns_modal_wrapper = document.querySelector('.tns-modal-wrapper');
removeDOMElement(tns_modal_wrapper);
}
function removeDOMElement(...elements) {
for (let element of elements) {
if (element) element.remove();

@ -2,6 +2,12 @@
"background": {
"scripts": ["background.js"]
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["contentScript.js"]
}
],
"applications": {
"gecko": {
"id": "magnolia@12.34",
@ -39,4 +45,4 @@
"webRequestBlocking"
],
"version": "1.6.3.3"
}
}

@ -44,7 +44,6 @@ var defaultSites = {
'MIT Technology Review': 'technologyreview.com',
'Mountain View Voice': 'mv-voice.com',
'National Post': 'nationalpost.com',
'New Statesman (javascript disabled)': 'newstatesman.com',
'New York Magazine': 'nymag.com',
'New Zealand Herald': 'nzherald.co.nz',
'Newcastle Herald': 'newcastleherald.com.au',
@ -81,6 +80,7 @@ var defaultSites = {
'The Mercury Tasmania': 'themercury.com.au',
'The Morning Call': 'mcall.com',
'The Nation': 'thenation.com',
'The New Statesman': 'newstatesman.com',
'The New York Times': 'nytimes.com',
'The New Yorker': 'newyorker.com',
'The News-Gazette': 'news-gazette.com',

Loading…
Cancel
Save