Fix The New Statesman (version US/UK)

Plus remove banner.
master
magnolia1234 2020-01-13 21:32:24 +01:00 committed by GitHub
parent 31afbb8cdb
commit 663690bc02
2 changed files with 9 additions and 3 deletions

View File

@ -45,8 +45,9 @@ var 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

View File

@ -1,4 +1,4 @@
var arr_localstorage_hold = ['sfchronicle.com'];
var arr_localstorage_hold = ['sfchronicle.com', 'newstatesman.com'];
var localstorage_hold = arr_localstorage_hold.some(function(url) {
return window.location.href.indexOf(url) !== -1;
});
@ -369,6 +369,11 @@ if (window.location.href.indexOf("theathletic.com") !== -1) {
removeDOMElement(landing_banner, sample_banner, bottom_banner, subscribe);
}
if (window.location.href.indexOf("newstatesman.com") !== -1) {
const tns_modal_wrapper = document.querySelector('.tns-modal-wrapper');
removeDOMElement(tns_modal_wrapper);
}
// General Functions
function removeDOMElement(...elements) {
for (let element of elements) {