diff --git a/LICENSE b/LICENSE index 15bc72f..ab20918 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 +Copyright (c) 2020, magnolia1234 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0a09dfc..294fd11 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ### Installation You can install the add-on from Mozilla add-ons (AMO): [Bypass Paywalls Clean](https://addons.mozilla.org/en-US/firefox/addon/bypass-paywalls-clean) -Or download and install the latest version from [BitBucket](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads) +Or download and install the latest xpi-version from [GitLab](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases) By default BPC has limited permissions, but you can opt-in to enable custom sites (and also clear cookies/block general paywall-scripts for non-listed sites). Install add-on by downloading xpi-file. On Android this add-on only works with Firefox 68 (Fennec); Firefox 79 (Fenix) only supports 9 add-ons (for now). @@ -365,9 +365,9 @@ For user with the limited permissions BPC-version this will only work for suppor If removing the cookies works you can also add the site as a custom site. ### New site requests -You can submit a request for a new website [here](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/issues?status=new&status=open). +You can submit a request for a new website [here](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/issues). Please read the following instructions and share your results for a quicker process. -Remember to check the [previous requests](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/issues) before asking for a new website. +Remember to check the [previous requests](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/issues) before asking for a new website. 1. Visit an article on the site you want to bypass the paywall for and copy the article title. 2. Open up a new incognito window (Ctrl+Shift+P) and paste the article title into Google. 3. Click on the same article from the Google search results page. Or you can: @@ -390,9 +390,9 @@ Also you can enable Googlebot user-agent or disable Javascript for (sub)domain(s * If you live in the EU, also consider installing the extension [I don't care about cookies](https://addons.mozilla.org/en-US/firefox/addon/i-dont-care-about-cookies) in order to remove cookie warnings (or add filter [Easylist Cookies](https://easylist-downloads.adblockplus.org/easylist-cookie.txt) | [I don't care about cookies custom filter](https://www.i-dont-care-about-cookies.eu/abp) to uBlock Origin). ### Changelog-releases -* Visit the [changelog page](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/src/master/changelog.txt). -* Or check the [commits](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/commits). -* [Download the latest version](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads) +* Visit the [changelog page](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/blob/master/changelog.txt). +* Or check the [commits](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/commits/master/). +* [Download the latest version](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases) ### License -Bypass Paywalls Clean is [MIT-licensed](https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/src/master/LICENSE). +Bypass Paywalls Clean is [MIT-licensed](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/blob/master/LICENSE). diff --git a/background.js b/background.js index 640332d..cf3c07f 100644 --- a/background.js +++ b/background.js @@ -308,29 +308,6 @@ function setDefaultOptions() { }); } -// copy storage.sync to storage.local (quota exceeded) -ext_api.storage.sync.get({ - sites: {}, - sites_custom: {}, - daily_users: {}, - optIn: {}, - optInShown: {}, - customShown: {} -}, function (items) { - if (Object.keys(items.sites).length > 0) { - ext_api.storage.local.set({ - sites: items.sites, - sites_custom: items.sites_custom, - daily_users: items.daily_users, - optIn: items.optIn, - optInShown: items.optInShown, - customShown: items.customShown - }, function () { - ext_api.storage.sync.remove(['sites', 'sites_custom']); - }); - } -}); - // add grouped sites to en/disabledSites & init rules (optional) function add_grouped_sites(init_rules) { if (enabledSites.includes('ad.nl')) @@ -621,6 +598,7 @@ 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) { @@ -628,6 +606,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { last_date_str = current_date_str; } } +**/ var requestHeaders = details.requestHeaders; diff --git a/changelog.txt b/changelog.txt index c51b31f..33fddca 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,10 +2,13 @@ Changelog Bypass Paywalls Clean - Firefox Post-release + +* v1.9.6.0 (2020-11-20) Add Helsingin Sanomat (hs.fi, not paivanlehti) Fix-update La Tercera (Chile) Fix-update LesEchos.fr (timing/banners) Fix-update Newsweek (Pelcro) +GitLab transfer * v1.9.5.0 (2020-11-15) Add AlternativesEconomiques.fr diff --git a/contentScript.js b/contentScript.js index e7f6297..092deed 100644 --- a/contentScript.js +++ b/contentScript.js @@ -816,7 +816,7 @@ else if (matchDomain('faz.net')) { str = str.replace(/(?:^|[\w\"\“])(\.|\?|!)(?=[A-ZÖÜ\„][A-Za-zÀ-ÿ\„]{1,})/gm, "$&\n\n"); str = str.replace(/([a-z\"\“])(?=[A-Z](?=[A-Za-zÀ-ÿ]+))/gm, "$&\n\n"); // exceptions: names with alternating lower/uppercase (no general fix) - let str_rep_arr = ["BaFin", "BerlHG", "BfArM", "BilMoG", "EuGH", "GlaxoSmithKline", "IfSG", "iMessage", "iOS", "iPad", "iPhone", "medRxiv", "mRNA", "StVO"]; + let str_rep_arr = ["BaFin", "BerlHG", "BfArM", "BilMoG", "DiGA", "EuGH", "GlaxoSmithKline", "IfSG", "iMessage", "iOS", "iPad", "iPhone", "medRxiv", "mRNA", "PlosOne", "StVO"]; let str_rep_split, str_rep_src; for (let str_rep of str_rep_arr) { str_rep_split = str_rep.split(/([a-z]+)(?=[A-Z](?=[A-Za-z]+))/); diff --git a/manifest.json b/manifest.json index a999457..c28c91b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,12 +1,12 @@ { "background": { - "scripts": ["sites.js", "bpc_count_daily_users.js", "background.js"] + "scripts": ["sites.js", "background.js"] }, "content_security_policy": "script-src 'self'; object-src 'self'", "applications": { "gecko": { "id": "magnolia@12.34", - "update_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/raw/master/updates.json" + "update_url": "https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/raw/master/updates.json" } }, "browser_action": { @@ -22,7 +22,7 @@ ] }, "description": "Bypass Paywalls of news sites", - "homepage_url": "https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean", + "homepage_url": "https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean", "icons": { "128": "bypass.png" }, @@ -348,5 +348,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.9.5.3" + "version": "1.9.6.0" } \ No newline at end of file diff --git a/options.html b/options.html index 6553a83..1c28138 100644 --- a/options.html +++ b/options.html @@ -18,7 +18,7 @@

Options |

-
Changelog +
Changelog
Selected sites will have their cookies cleared and referer set to Google. You should uncheck sites you have an account with or else you will be logged out at every visit.
diff --git a/popup.html b/popup.html index 2cf4e29..7468243 100644 --- a/popup.html +++ b/popup.html @@ -19,8 +19,8 @@
Bypass Paywalls Clean   
Options | Custom | -BitBucket
-
Changelog | +GitLab
+
Changelog |
diff --git a/updates.json b/updates.json index 8e1490f..c1b4893 100644 --- a/updates.json +++ b/updates.json @@ -2,8 +2,8 @@ "addons": { "magnolia@12.34": { "updates": [ - { "version": "1.9.5.0", - "update_link": "https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads/bypass_paywalls_clean-1.9.5.0.xpi" } + { "version": "1.9.6.0", + "update_link": "https://gitlab.com/magnolia1234/bpc-uploads/bypass_paywalls_clean-1.9.6.0.xpi" } ] } } diff --git a/version.js b/version.js index d6cd3d4..b907cea 100644 --- a/version.js +++ b/version.js @@ -4,8 +4,9 @@ var manifestData = ext_api.runtime.getManifest(); var versionString = 'v' + manifestData.version; document.getElementById('version').innerText = versionString; -const manifest_new = 'https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/raw/master/manifest.json'; -fetch(manifest_new) +const proxyurl = "https://cors-anywhere.herokuapp.com/"; +const manifest_new = 'https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/raw/master/manifest.json'; +fetch(proxyurl + manifest_new) .then(response => { if (response.ok) { response.json().then(json => { @@ -20,7 +21,7 @@ fetch(manifest_new) var anchorEl = document.createElement('a'); anchorEl.text = 'New release v' + version_new; if (manifestData.applications.gecko.id.includes('magnolia')) - anchorEl.href = 'https://bitbucket.org/magnolia1234/bypass-paywalls-firefox-clean/downloads'; + anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases'; else anchorEl.href = 'https://addons.mozilla.org/en-US/firefox/addon/bypass-paywalls-clean'; anchorEl.target = '_blank'; @@ -28,12 +29,12 @@ fetch(manifest_new) versionString_new.appendChild(document.createTextNode(' *')); if (manifestData.name.includes('(lp')) { let par = document.createElement('p'); - par.innerHTML = "Limited permissions version is no longer updated (check BitBucket)"; + par.innerHTML = "Limited permissions version is no longer updated (check GitLab)"; versionString_new.appendChild(par); } if (!manifestData.name.includes('Clean')) { let par = document.createElement('p'); - par.innerHTML = "You've installed a fake version of BPC (check BitBucket)"; + par.innerHTML = "You've installed a fake version of BPC (check GitLab)"; versionString_new.appendChild(par); } }