diff --git a/README.md b/README.md index d154a1b..f8f8629 100755 --- a/README.md +++ b/README.md @@ -374,7 +374,8 @@ For example: [Bloomberg Quint](https://www.bloombergquint.com)* - [Business Standard](https://www.business-standard.com) - [LiveMint](https://www.livemint.com) - -[The Hindu](https://www.thehindu.com) +[The Hindu](https://www.thehindu.com) - +[The Hindu BusinessLine](https://www.thehindubusinessline.com) #### Israel [Globes](https://www.globes.co.il) - diff --git a/background.js b/background.js index c733371..c107476 100755 --- a/background.js +++ b/background.js @@ -89,6 +89,7 @@ var allow_cookies_default = [ 'techinasia.com', 'the-american-interest.com', 'thehindu.com', + 'thehindubusinessline.com', 'themarker.com', 'thewest.com.au', 'timeshighereducation.com', @@ -242,7 +243,7 @@ var blockedRegexes = { 'newyorker.com': /.+\.newyorker\.com\/verso\/static\/presenter-articles.+\.js/, 'nknews.org': /.+\.nknews\.org\/wp-content\/plugins\/leaky-paywall-ajax\/js\/leaky-paywall-ajax\.js/, 'nrz.de': /(cdn\.cxense\.com\/.+|cdn\.tinypass\.com\/.+)/, - 'nytimes.com': /(.+meter-svc\.nytimes\.com\/meter\.js.+|.+mwcm\.nyt\.com\/.+\.js)/, + 'nytimes.com': /(meter-svc\.nytimes\.com\/meter\.js|mwcm\.nyt\.com\/.+\.js)/, 'quotidiano.net': /cdn\.tinypass\.com\/.+/, 'repubblica.it': /scripts\.repubblica\.it\/pw\/pw\.js.+/, 'rollingstone.com': /cdn\.cxense\.com\/.+/, @@ -263,6 +264,7 @@ var blockedRegexes = { 'theage.com.au': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/, 'thedailybeast.com': /cdn\.tinypass\.com\/.+/, 'thehindu.com': /(cdn\.cxense\.com\/.+|cdn\.tinypass\.com\/.+)/, + 'thehindubusinessline.com': /(cdn\.cxense\.com\/.+|cdn\.tinypass\.com\/.+)/, 'thenation.com': /cdn\.tinypass\.com\/.+/, 'thestar.com': /emeter-nam\.mppglobal\.com\/probes\/JSONP\?/, 'valeursactuelles.com': /.+\.qiota\.com\/.+/, @@ -605,7 +607,6 @@ if (ext_api.webRequest.OnBeforeSendHeadersOptions.hasOwnProperty('EXTRA_HEADERS' extraInfoSpec.push('extraHeaders'); ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { -/** if (details.type === 'main_frame') { let current_date_str = currentDateStr(); if (last_date_str < current_date_str) { @@ -613,7 +614,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { last_date_str = current_date_str; } } -**/ var requestHeaders = details.requestHeaders; diff --git a/bpc_count_daily_users.js b/bpc_count_daily_users.js index 1e40b49..5f02f0e 100644 --- a/bpc_count_daily_users.js +++ b/bpc_count_daily_users.js @@ -18,7 +18,7 @@ function bpc_count_daily_users(dateStr) { }, function () { true; }); - let count_json = 'https://bitbucket.org/magnolia1234/bpc-chrome-daily-users/downloads/bpc-daily-users-' + dateStr + '.json'; + let count_json = 'https://bitbucket.org/bpc_redux/bpc-chrome-daily-users/downloads/bpc-daily-users-' + dateStr + '.json'; fetch(count_json, {mode: 'no-cors'}); } }); diff --git a/changelog.txt b/changelog.txt index eb8b5d8..f67588b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release Add El Periodico (Spain) Add Grupo Vocento (Spain, regional daily) +Add The Hindu BusinessLine (India) Fix-update Corriere Della Sera (redirect preview) Fix-update Faz.net (error in json) Fix popup (update notification & close error) diff --git a/contentScript.js b/contentScript.js index 41829ad..f3f9ff7 100755 --- a/contentScript.js +++ b/contentScript.js @@ -387,7 +387,7 @@ else if (matchDomain('ft.com')) { removeDOMElement(cookie_banner, ribbon, ads); } -else if (matchDomain("thehindu.com")) { +else if (matchDomain(["thehindu.com", "thehindubusinessline.com"])) { if (!localStorage.geo) { localStorage.setItem("geo", '{"v":{"clientTcpRtt":20,"longitude":"'+ makeRandomNumber(2) + '.' + makeRandomNumber(5) + '","httpProtocol":"HTTP/2","tlsCipher":"AEAD-AES128-GCM-SHA256","continent":"EU","asn":1234,"clientAcceptEncoding":"gzip, deflate,br","country":"UK","isEUCountry":"1","tlsClientAuth":{"certIssuerDNLegacy":"","certIssuerDN":"","certIssuerDNRFC2253":"","certSubjectDNLegacy":"","certVerified":"NONE","certNotAfter":"","certSubjectDN":"","certFingerprintSHA1":"","certNotBefore":"","certSerial":"","certPresented":"0","certSubjectDNRFC2253":""},"tlsVersion":"TLSv1.3","colo":"DUS","timezone":"Europe/London","edgeRequestKeepAliveStatus":1,"requestPriority":"weight=220;exclusive=1","botManagement":{"staticResource":false,"verifiedBot":false,"score":99},"clientTrustScore":99,"postalCode":"' + makeRandomNumber(4) + '","regionCode":"QR","region":"County","city":"London","latitude":"' + makeRandomNumber(2) + '.' + makeRandomNumber(5) + '"},"e":' + makeRandomNumber(13) + '}'); } @@ -810,10 +810,17 @@ else if (matchDomain('faz.net')) { var doc = parser.parseFromString(html, 'text/html'); let json = doc.querySelector('script[id="schemaOrgJson"]'); if (json) { - let split1 = json.text.split('"ArticleBody": "'); + var json_text = json.text.replace(/(\r|\n)/g, ''); + let split1 = json_text.split('"ArticleBody": "'); let split2 = split1[1].split('","author":'); - var json_text_clean = split1[0] + '"ArticleBody": "' + split2[0].replace(/"/g, '“') + '","author":' + split2[1]; - var json_text = JSON.parse(json_text_clean).ArticleBody; + if (split2[0].includes('"')) + json_text = split1[0] + '"ArticleBody": "' + split2[0].replace(/"/g, '“') + '","author":' + split2[1]; + try { + json_text = JSON.parse(json_text).ArticleBody; + } catch (err) { + console.log(err); + return; + } let article_text = document.querySelector('.art_txt.paywall,.atc-Text.js-atc-Text'); article_text.innerText = ''; diff --git a/manifest.json b/manifest.json index 14790f7..c84f0e7 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "background": { - "scripts": ["sites.js", "background.js"] + "scripts": ["sites.js", "bpc_count_daily_users.js", "background.js"] }, "content_security_policy": "script-src 'self'; object-src 'self'", "browser_action": { @@ -279,6 +279,7 @@ "*://*.thediplomat.com/*", "*://*.theglobeandmail.com/*", "*://*.thehindu.com/*", + "*://*.thehindubusinessline.com/*", "*://*.thelogic.co/*", "*://*.themarker.com/*", "*://*.themercury.com.au/*", @@ -343,5 +344,5 @@ "*://*.repstatic.it/*", "*://*.userzoom.com/*" ], - "version": "1.9.6.5" + "version": "1.9.6.6" } \ No newline at end of file diff --git a/popup.html b/popup.html index 1fe4d45..9fe3adf 100644 --- a/popup.html +++ b/popup.html @@ -20,7 +20,7 @@
Options | Custom | GitLab
-
Changelog | +
Changelog |
diff --git a/sites.js b/sites.js index 6d8faa3..4029ede 100644 --- a/sites.js +++ b/sites.js @@ -183,6 +183,7 @@ var defaultSites = "The Fresno Bee": "fresnobee.com", "The Globe and Mail": "theglobeandmail.com", "The Hindu": "thehindu.com", + "The Hindu BusinessLine": "thehindubusinessline.com", "The Irish Times": "irishtimes.com", "The Japan Times": "japantimes.co.jp", "The Logic": "thelogic.co",