diff --git a/README.md b/README.md index c5c2f8e..1048a00 100755 --- a/README.md +++ b/README.md @@ -580,6 +580,7 @@ Grupo Vocento (ABC) regional sites like [Bloomberg Quint](https://www.bloombergquint.com)* - [Business Standard](https://www.business-standard.com) - [Hindustan Times](https://www.hindustantimes.com) - +[Inc42](https://inc42.com) - [LiveMint](https://www.livemint.com) - [MediaNama](https://www.medianama.com) - [The Economic Times (ET Prime)](https://economictimes.indiatimes.com) - diff --git a/background.js b/background.js index d2ff970..b9bd106 100755 --- a/background.js +++ b/background.js @@ -84,6 +84,7 @@ var allow_cookies_default = [ 'hindustantimes.com', 'hs.fi', 'ilfattoquotidiano.it', + 'inc42.com', 'independent.ie', 'infzm.com', 'intelligentinvestor.com.au', @@ -317,6 +318,7 @@ var blockedRegexes = { 'historyextra.com': /\.evolok\.net\/.+\/authorize\//, 'houstonchronicle.com': /\.blueconic\.net\//, 'inc.com': /\.tinypass\.com\//, + 'inc42.com': /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|analytics)-.+\.(m)?js)/, 'independent.ie': /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js)/, 'inquirer.com': /\.tinypass\.com\//, 'irishtimes.com': /cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js/, @@ -1129,7 +1131,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { let usa_today_site = (matchUrlDomain('gannett-cdn.com', details.url) && matchUrlDomain(['usatoday.com'], header_referer)); allow_ext_source = allow_ext_source || inkl_site || cl_elmerc_site || es_elesp_site || it_repubblica_site || usa_mw_site || usa_natgeo_site || usa_today_site; - bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(['asiatimes.com', 'augsburger-allgemeine.de', 'barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elpais.com', 'elperiodico.com', 'freiepresse.de', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'marketwatch.com', 'nationalreview.com', 'noz.de', 'nwzonline.de', 'scmp.com', 'seekingalpha.com', 'shz.de', 'staradvertiser.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk', 'washingtonpost.com'].concat(au_news_corp_domains, au_nine_domains, de_madsack_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_repubblica_domains, usa_mcc_domains, usa_theathletic_domains), header_referer)); + bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(['asiatimes.com', 'augsburger-allgemeine.de', 'barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elpais.com', 'elperiodico.com', 'freiepresse.de', 'inc42.com', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'marketwatch.com', 'nationalreview.com', 'noz.de', 'nwzonline.de', 'scmp.com', 'seekingalpha.com', 'shz.de', 'staradvertiser.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk', 'washingtonpost.com'].concat(au_news_corp_domains, au_nine_domains, de_madsack_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_repubblica_domains, usa_mcc_domains, usa_theathletic_domains), header_referer)); } if (!isSiteEnabled(details) && !allow_ext_source && !bpc_amp_site && !au_apn_site && !au_swm_site) { diff --git a/changelog.txt b/changelog.txt index c755ecb..54a5e4e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release +Add Inc42 (India) Fix Bloomberg (blurred images) Fix Telegraaf.nl diff --git a/contentScript.js b/contentScript.js index eed53e9..2a0aea8 100755 --- a/contentScript.js +++ b/contentScript.js @@ -23,7 +23,7 @@ var usa_mcc_domains = ['bnd.com', 'charlotteobserver.com', 'fresnobee.com', 'kan 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', 'irishtimes.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk'].concat(es_unidad_domains, no_nhst_media_domains); +var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'houstonchronicle.com', 'inc42.com', 'irishtimes.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk'].concat(es_unidad_domains, no_nhst_media_domains); arr_localstorage_hold = arr_localstorage_hold.concat(de_funke_media_domains, es_grupo_vocento_domains); if (!matchDomain(arr_localstorage_hold)) { window.localStorage.clear(); @@ -2015,6 +2015,27 @@ else if (matchDomain(['houstonchronicle.com', 'sfchronicle.com'])) { removeDOMElement(wrapper); } +else if (matchDomain('inc42.com')) { + let url = window.location.href; + if (!url.includes('/amp/')) { + let premium = document.querySelector('div.premium-container'); + if (premium) { + removeDOMElement(premium); + window.location.href = url.split('?')[0] + 'amp/'; + } + } else { + let plus_popup = document.querySelector('div#plus-pop'); + if (plus_popup) { + removeDOMElement(plus_popup); + let expired = document.querySelectorAll('div[amp-access="p.showPageviewExpired"], div[amp-access="cm.maxViews AND NOT loggedIn"]'); + removeDOMElement(...expired); + let not_expired = document.querySelectorAll('div[amp-access^="NOT p.showPageviewExpired"][amp-access-hide]'); + for (let elem of not_expired) + elem.removeAttribute('amp-access-hide'); + } + } +} + else if (matchDomain('infzm.com')) { let url = window.location.href; if (url.includes('/wap/#/')) { diff --git a/custom/manifest.json b/custom/manifest.json index f8299cd..e33ac5d 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -38,5 +38,5 @@ "webRequestBlocking", "" ], - "version": "2.3.1.2" + "version": "2.3.1.3" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 4f69eda..4ec4b9f 100755 --- a/manifest.json +++ b/manifest.json @@ -220,6 +220,7 @@ "*://*.iltalehti.fi/*", "*://*.iltelegrafolivorno.it/*", "*://*.inc.com/*", + "*://*.inc42.com/*", "*://*.independent.ie/*", "*://*.infzm.com/*", "*://*.inkl.com/*", @@ -528,5 +529,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.3.1.2" + "version": "2.3.1.3" } \ No newline at end of file diff --git a/sites.js b/sites.js index 3d7ccb1..80c6a3e 100755 --- a/sites.js +++ b/sites.js @@ -116,6 +116,7 @@ var defaultSites = "Il Messaggero (+ regional)": "###_it_ilmessaggero", "Il Secolo XIX": "ilsecoloxix.it", "Inc.com": "inc.com", + "Inc42": "inc42.com", "Inkl": "inkl.com", "Intelligent Investor": "intelligentinvestor.com.au", "Irish Independent (opt-in)": "independent.ie",