Fix-update Adweek (amp for premium)

master
magnolia1234 2021-01-28 17:33:48 +01:00
parent 1996aeb948
commit fe5a64e340
4 changed files with 14 additions and 2 deletions

View File

@ -13,6 +13,7 @@ var csDone = false;
// var defaultSites = {};
const restrictions = {
'adweek.com': /^((?!\.adweek\.com\/(.+\/)?(amp|agencyspy|tvnewser|tvspy)\/).)*$/,
'barrons.com': /.+\.barrons\.com\/(amp\/)?article(s)?\/.+/,
'bloombergquint.com': /^((?!\.bloombergquint\.com\/bq-blue-exclusive\/).)*$/,
'elcomercio.pe': /.+\/elcomercio\.pe\/.+((\w)+(\-)+){3,}.+/,

View File

@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Chrome
Post-release
Add The Hill Times (Canada)
Add The Jerusalem Post (Israel)
Fix-update Adweek (amp for premium)
Fix-update El Pais (premium/images)
Update custom sites (block Javascript)

View File

@ -347,7 +347,7 @@ else if (matchDomain("nzherald.co.nz")) {
let article_offer = document.querySelector('.article-offer');
if (article_offer) {
removeDOMElement(article_offer);
let css_selector = article_content.querySelectorAll('p')[5].getAttribute('class');
let css_selector = article_content.querySelectorAll('p[style]')[1].getAttribute('class');
let hidden_not_pars = article_content.querySelectorAll('.' + css_selector + ':not(p)');
for (let hidden_not_par of hidden_not_pars) {
hidden_not_par.classList.remove(css_selector);
@ -1982,6 +1982,16 @@ else if (matchDomain('jpost.com')) {
removeDOMElement(...premium_banners);
}
else if (matchDomain('adweek.com')) {
let url = window.location.href;
let body_single = document.querySelector('body.single');
let amphtml = document.querySelector('link[rel="amphtml"]');
if (body_single && amphtml) {
body_single.classList.remove('single');
window.location.href = amphtml.href;
}
}
else if (!matchDomain(['belfasttelegraph.co.uk', 'independent.ie']))
csDone = true;

View File

@ -431,5 +431,5 @@
"*://*.userzoom.com/*",
"*://*.wsj.net/*"
],
"version": "2.0.5.2"
"version": "2.0.5.3"
}