From 2cf8230bc6c00e4daa56e4b8a291fc6d17bc41a9 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 1 Dec 2021 19:06:29 +0100 Subject: [PATCH] Fix The Business of Fashion Plus fix Live Law (permission) --- changelog.txt | 2 ++ contentScript.js | 25 +++++++------------------ custom/manifest.json | 4 ++-- manifest.json | 6 +++--- sites.js | 3 ++- sites_updated.json | 7 ++++++- 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6ae6c88..0bd7838 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,7 +2,9 @@ Changelog Bypass Paywalls Clean - Chrome Post-release +Fix The Business of Fashion Fix El Mundo & Groupe EBRA (amp-iframe) +Fix Live Law (permission) Fix The New Yorker (amp) Fix TheTimes.co.uk (only link to archive.today) Remove Saechsische Zeitung (obsolete) diff --git a/contentScript.js b/contentScript.js index 089df2b..2523a4c 100755 --- a/contentScript.js +++ b/contentScript.js @@ -26,7 +26,7 @@ var usa_mng_domains = ['denverpost.com', 'eastbaytimes.com', 'mercurynews.com' var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com']; // clean local storage of sites (with an exemption for hold-list) -var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'houstonchronicle.com', 'inc42.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk'].concat(de_funke_media_domains, es_grupo_vocento_domains, es_unidad_domains, no_nhst_media_domains); +var arr_localstorage_hold = ['augsburger-allgemeine.de', 'businessoffashion.com', 'charliehebdo.fr', 'cmjornal.pt', 'houstonchronicle.com', 'inc42.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk'].concat(de_funke_media_domains, es_grupo_vocento_domains, es_unidad_domains, no_nhst_media_domains); if (!matchDomain(arr_localstorage_hold)) { window.localStorage.clear(); } @@ -203,12 +203,12 @@ else { if (domain = matchDomain(au_nc_sites)) { let header_ads = document.querySelector('.header_ads-container'); removeDOMElement(header_ads); - let amp_ads_sel = 'amp-ad, amp-embed, [id^="ad-mrec-"], .story-ad-container'; - if (window.location.hostname.startsWith('amp.')) { - amp_unhide_access_hide('="access AND subscriber"', '', amp_ads_sel, true); - } else if (window.location.href.includes('?amp')) { - amp_unhide_access_hide('="subscriber AND status=\'logged-in\'"', '', amp_ads_sel, true); - } + let amp_ads_sel = 'amp-ad, amp-embed, [id^="ad-mrec-"], .story-ad-container'; + if (window.location.hostname.startsWith('amp.')) { + amp_unhide_access_hide('="access AND subscriber"', '', amp_ads_sel, true); + } else if (window.location.href.includes('?amp')) { + amp_unhide_access_hide('="subscriber AND status=\'logged-in\'"', '', amp_ads_sel, true); + } } else { // Australian Seven West Media let swm_script = document.querySelector('script[src^="https://s.thewest.com.au"]'); @@ -1746,17 +1746,6 @@ else if (matchDomain('business-standard.com')) { } } -else if (matchDomain('businessoffashion.com')) { - let paywall = document.querySelector('div.paywall'); - if (paywall) { - let article_locked = document.querySelector('div.article-locked'); - if (article_locked) - article_locked.removeAttribute('class'); - let article_locked_overlay = document.querySelector('div.article-locked-overlay'); - removeDOMElement(paywall, article_locked_overlay); - } -} - else if (matchDomain('caixinglobal.com')) { window.setTimeout(function () { let pay_tips = document.querySelectorAll('.cons-pay-tip'); diff --git a/custom/manifest.json b/custom/manifest.json index 512d71a..b99c661 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -39,5 +39,5 @@ "webRequestBlocking", "" ], - "version": "2.4.5.3" -} \ No newline at end of file + "version": "2.4.5.4" +} diff --git a/manifest.json b/manifest.json index cd89f63..87dc820 100755 --- a/manifest.json +++ b/manifest.json @@ -296,7 +296,7 @@ "*://*.liberation-champagne.fr/*", "*://*.limesonline.com/*", "*://*.lindependant.fr/*", - "*://*.livelaw.com/*", + "*://*.livelaw.in/*", "*://*.livemint.com/*", "*://*.ln-online.de/*", "*://*.lne.es/*", @@ -558,5 +558,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.4.5.3" -} \ No newline at end of file + "version": "2.4.5.4" +} diff --git a/sites.js b/sites.js index d9348ad..61014de 100755 --- a/sites.js +++ b/sites.js @@ -1331,7 +1331,8 @@ var defaultSites = { }, "The Business of Fashion": { domain: "businessoffashion.com", - allow_cookies: 1 + allow_cookies: 1, + block_regex: /\.businessoffashion\.com\/pf\/dist\/components\/combinations\/2\.chunk\.js/ }, "The Christian Science Monitor": { domain: "csmonitor.com" diff --git a/sites_updated.json b/sites_updated.json index 6c903f1..6f7588d 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -12,8 +12,13 @@ "domain": "italian.tech", "group_rule": "###_gr_it_repubblica_domains" }, + "The Business of Fashion": { + "domain": "businessoffashion.com", + "allow_cookies": 1, + "block_regex": "\\.businessoffashion\\.com\\/pf\\/dist\\/components\\/combinations\\/2\\.chunk\\.js" + }, "The Spectator World": { "domain": "spectatorworld.com", "block_regex": "(cdn\\.cxense\\.com\\/|\\.tinypass\\.com\\/)" } -} \ No newline at end of file +}