Fix-update Adweek (amp for premium)

This commit is contained in:
magnolia1234 2021-01-28 17:34:00 +01:00
parent 45670abc47
commit 021a873c84
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 - Firefox
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

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