Avoid re-declare vars (#612)

* Avoid re-declare vars

* minor change
This commit is contained in:
Nguyễn Kim Kha 2020-05-06 15:51:32 +10:00 committed by Adam
parent de0a2ca7c9
commit a593b34a5a
2 changed files with 3 additions and 8 deletions

View File

@ -15,7 +15,7 @@
1. Drag the `bypass-paywalls-chrome-master` folder anywhere on the page to import it (do not delete the folder afterwards).
**Mozilla Firefox**
1. [Download and install the latest version](https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.7.1/bypass_paywalls-1.7.1-an+fx.xpi)
* [Download and install the latest version](https://github.com/iamadamdev/bypass-paywalls-firefox/releases/download/v1.7.1/bypass_paywalls-1.7.1-an+fx.xpi)
**Notes**
* Every time you open Chrome it may warn you about running extensions in developer mode, just click 🗙 to keep the extension enabled.

View File

@ -1,9 +1,4 @@
var localStorageHoldArray = ['sfchronicle.com', 'cen.acs.org'];
var localStorageHold = localStorageHoldArray.some(function (url) {
return window.location.href.includes(url);
});
if (!localStorageHold) {
if (!matchDomain(['sfchronicle.com', 'cen.acs.org'])) {
window.localStorage.clear();
}
@ -101,7 +96,7 @@ if (matchDomain('rep.repubblica.it')) {
if (acceptBtn) {
acceptBtn.click();
}
} else if (matchDomain('theathletic.com') || matchDomain('theathletic.co.uk')) {
} else if (matchDomain(['theathletic.com','theathletic.co.uk'])) {
const landingBanner = document.querySelector('.logged-out-landing-banner');
const sampleBanner = document.querySelector('.main-sample-banner');
const bottomBanner = document.querySelector('.border-bottom-cc');