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