mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 03:11:56 +01:00
Add Atavist Magazine & Nautilus
This commit is contained in:
parent
9f9d2c8e8b
commit
7e6bb84c05
5 changed files with 26 additions and 8 deletions
|
@ -57,6 +57,7 @@ Install add-on by downloading xpi-file.
|
|||
[Discover Magazine](https://www.discovermagazine.com) -
|
||||
[MIT Technology Review](https://www.technologyreview.com) -
|
||||
[National Geographic USA](https://www.nationalgeographic.com) -
|
||||
[Nautilus](https://nautil.us) -
|
||||
[Towards Data Science](https://www.towardsdatascience.com) -
|
||||
[Wired](https://www.wired.com) -
|
||||
[Scientific American](https://www.scientificamerican.com)*
|
||||
|
@ -71,6 +72,7 @@ Install add-on by downloading xpi-file.
|
|||
[Slader](https://www.slader.com) -
|
||||
[Statista](https://www.statista.com)
|
||||
##### Blogs
|
||||
[Atavist Magazine](https://magazine.atavist.com) -
|
||||
[Medium](https://www.medium.com) (all sites) -
|
||||
[SofRep](https://sofrep.com) -
|
||||
[The Daily Beast](https://www.thedailybeast.com)*
|
||||
|
|
|
@ -779,6 +779,15 @@ else if (matchDomain('qz.com')) {
|
|||
}, 500); // Delay (in milliseconds)
|
||||
}
|
||||
|
||||
else if (matchDomain("magazine.atavist.com")) {
|
||||
let bottom_notification = document.querySelector('div.bottom-notification');
|
||||
let overlay = document.querySelector('div.notification-overlay');
|
||||
removeDOMElement(bottom_notification, overlay);
|
||||
let paywall = document.querySelector('body.paywall-notification-visible');
|
||||
if (paywall)
|
||||
paywall.classList.remove('paywall-notification-visible');
|
||||
}
|
||||
|
||||
// General Functions
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
"*://*.americanaffairsjournal.org/*",
|
||||
"*://*.americanbanker.com/*",
|
||||
"*://*.asia.nikkei.com/*",
|
||||
"*://*.atavist.com/*",
|
||||
"*://*.baltimoresun.com/*",
|
||||
"*://*.barrons.com/*",
|
||||
"*://*.bendigoadvertiser.com.au/*",
|
||||
|
@ -152,6 +153,7 @@
|
|||
"*://*.nationalgeographic.com/*",
|
||||
"*://*.nationalpost.com/*",
|
||||
"*://*.nationalreview.com/*",
|
||||
"*://*.nautil.us/*",
|
||||
"*://*.newcastleherald.com.au/*",
|
||||
"*://*.newrepublic.com/*",
|
||||
"*://*.news-gazette.com/*",
|
||||
|
|
19
options.js
19
options.js
|
@ -46,6 +46,7 @@ function renderOptions() {
|
|||
}, function(items) {
|
||||
var sites = items.sites;
|
||||
var sitesEl = document.getElementById('bypass_sites');
|
||||
var clean_key;
|
||||
for (var key in defaultSites) {
|
||||
if (!defaultSites.hasOwnProperty(key)) {
|
||||
continue;
|
||||
|
@ -57,19 +58,20 @@ function renderOptions() {
|
|||
inputEl.type = 'checkbox';
|
||||
inputEl.dataset.key = key;
|
||||
inputEl.dataset.value = value;
|
||||
inputEl.checked = (key in sites) || (key.replace(/\s\(.*\)/, '') in sites);
|
||||
clean_key = key.replace(/\s\(.*\)/, '');
|
||||
inputEl.checked = Object.keys(sites).some(title => (title.replace(/\s\(.*\)/, '') === clean_key));
|
||||
if (value !== '###') {
|
||||
labelEl.appendChild(inputEl);
|
||||
labelEl.appendChild(inputEl);
|
||||
}
|
||||
labelEl.appendChild(document.createTextNode(' '+key));
|
||||
labelEl.appendChild(document.createTextNode(' ' + key));
|
||||
sitesEl.appendChild(labelEl);
|
||||
}
|
||||
// custom
|
||||
// custom
|
||||
var labelEl = document.createElement('label');
|
||||
labelEl.appendChild(document.createTextNode(' ——— Custom Sites ———'));
|
||||
sitesEl.appendChild(labelEl);
|
||||
var sites_custom = items.sites_custom;
|
||||
for (var key in sites_custom) {
|
||||
for (var key in sites_custom) {
|
||||
if (defaultSites.hasOwnProperty(key)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -80,13 +82,14 @@ function renderOptions() {
|
|||
inputEl.type = 'checkbox';
|
||||
inputEl.dataset.key = key;
|
||||
inputEl.dataset.value = value;
|
||||
inputEl.checked = (key in sites) || (key.replace(/\s\(.*\)/, '') in sites);
|
||||
if (value !== '' && value !== '###') {
|
||||
clean_key = key.replace(/\s\(.*\)/, '');
|
||||
inputEl.checked = Object.keys(sites).some(title => (title.replace(/\s\(.*\)/, '') === clean_key));
|
||||
if (value !== '' && value !== '###') {
|
||||
labelEl.appendChild(inputEl);
|
||||
}
|
||||
labelEl.appendChild(document.createTextNode(' '+key));
|
||||
sitesEl.appendChild(labelEl);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
2
sites.js
2
sites.js
|
@ -6,6 +6,7 @@ var defaultSites =
|
|||
"Algemeen Dagblad": "ad.nl",
|
||||
"American Affairs": "americanaffairsjournal.org",
|
||||
"American Banker": "americanbanker.com",
|
||||
"Atavist Magazine": "atavist.com",
|
||||
"Baltimore Sun": "baltimoresun.com",
|
||||
"Barron's": "barrons.com",
|
||||
"BBC History Extra": "historyextra.com",
|
||||
|
@ -101,6 +102,7 @@ var defaultSites =
|
|||
"Mountain View Voice": "mv-voice.com",
|
||||
"National Post": "nationalpost.com",
|
||||
"National Review": "nationalreview.com",
|
||||
"Nautilus": "nautil.us",
|
||||
"Neue Zürcher Zeitung": "nzz.ch",
|
||||
"New York Magazine": "nymag.com",
|
||||
"New Zealand Herald": "nzherald.co.nz",
|
||||
|
|
Loading…
Reference in a new issue