Add NK News (free articles only)
parent
1da7658c3d
commit
4bf69a83e6
|
@ -287,6 +287,7 @@ Visit the [Firefox repository](https://bitbucket.org/magnolia1234/bypass-paywall
|
|||
[CommonWealth Magazine Taiwan](https://www.cw.com.tw) -
|
||||
[Harvard Business Review Taiwan](https://www.hbrtaiwan.com) -
|
||||
[Nikkei Asian Review](https://asia.nikkei.com) -
|
||||
[NK News](https://www.nknews.org)* -
|
||||
[South China Morning Post](https://www.scmp.com) -
|
||||
[Tech in Asia](https://www.techinasia.com) -
|
||||
[The Diplomat](https://www.thediplomat.com) -
|
||||
|
|
|
@ -12,6 +12,7 @@ const restrictions = {
|
|||
'elcomercio.pe': /.+\/elcomercio.pe\/.+((\w)+(\-)+){3,}.+/,
|
||||
'ft.com': /.+\.ft\.com\/content\/.+/,
|
||||
'gestion.pe': /.+\/gestion.pe\/.+((\w)+(\-)+){3,}.+/,
|
||||
'nknews.org': /^((?!\.nknews\.org\/pro\/).)*$/,
|
||||
'quora.com': /^((?!quora\.com\/search\?q=).)*$/,
|
||||
'seekingalpha.com': /.+seekingalpha\.com\/article\/.+/,
|
||||
'wsj.com': /^((?!\/cn\.wsj\.com\/).)*$/
|
||||
|
@ -55,6 +56,7 @@ var allow_cookies = [
|
|||
'nationalgeographic.com',
|
||||
'nationalreview.com',
|
||||
'newrepublic.com',
|
||||
'nknews.org',
|
||||
'noordhollandsdagblad.nl',
|
||||
'nytimes.com',
|
||||
'nzz.ch',
|
||||
|
@ -197,6 +199,7 @@ var blockedRegexes = {
|
|||
'newrepublic.com': /.+\.onecount\.net\/js\/.+/,
|
||||
'newsweek.com': /.+\.googletagmanager\.com\/gtm\.js/,
|
||||
'newyorker.com': /.+\.newyorker\.com\/verso\/static\/presenter-articles.+\.js/,
|
||||
'nknews.org': /.+\.nknews\.org\/wp-content\/plugins\/leaky-paywall-ajax\/js\/leaky-paywall-ajax\.js/,
|
||||
'nytimes.com': /(.+meter-svc\.nytimes\.com\/meter\.js.+|.+mwcm\.nyt\.com\/.+\.js)/,
|
||||
'nzherald.co.nz': /nzherald\.co\.nz\/.+\/headjs\/.+\.js/,
|
||||
'repubblica.it': /scripts\.repubblica\.it\/pw\/pw\.js.+/,
|
||||
|
|
|
@ -3,7 +3,7 @@ var ext_api = (typeof browser === 'object') ? browser : chrome;
|
|||
var domain;
|
||||
|
||||
// clean local storage of sites (with an exemption for hold-list)
|
||||
var arr_localstorage_hold = ['seekingalpha.com', 'sfchronicle.com'];
|
||||
var arr_localstorage_hold = ['nknews.org', 'seekingalpha.com', 'sfchronicle.com'];
|
||||
if (!matchDomain(arr_localstorage_hold)){
|
||||
window.localStorage.clear();
|
||||
}
|
||||
|
@ -1056,6 +1056,15 @@ else if (domain = matchDomain(["fresnobee.com", "sacbee.com"])) {
|
|||
}
|
||||
}
|
||||
|
||||
else if (matchDomain("nknews.org")) {
|
||||
let full_content = document.querySelector('div#fullContent');
|
||||
if (full_content)
|
||||
full_content.removeAttribute('style');
|
||||
let excerpt = document.querySelector('div#excerptContent');
|
||||
let mobile_widget = document.querySelector('div.mobile-widget');
|
||||
removeDOMElement(excerpt, mobile_widget);
|
||||
}
|
||||
|
||||
// General Functions
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
|
@ -1092,13 +1101,14 @@ function setCookie(name, value, domain, path, days) {
|
|||
document.cookie = name + "=" + (value || "") + "; domain=" + domain + "; path=" + path + "; max-age=" + max_age;
|
||||
}
|
||||
|
||||
function insert_script(func) {
|
||||
function insert_script(func, insertAfterDom) {
|
||||
let bpc_script = document.querySelector('script#bpc_script');
|
||||
if (!bpc_script) {
|
||||
let script = document.createElement('script');
|
||||
script.setAttribute('id', 'bpc_script');
|
||||
script.appendChild(document.createTextNode('(' + func + ')();'));
|
||||
(document.body || document.head || document.documentElement).appendChild(script);
|
||||
let insertAfter = insertAfterDom ? insertAfterDom : (document.body || document.head || document.documentElement);
|
||||
insertAfter.appendChild(script);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -167,6 +167,7 @@
|
|||
"*://*.newstatesman.com/*",
|
||||
"*://*.newsweek.com/*",
|
||||
"*://*.newyorker.com/*",
|
||||
"*://*.nknews.org/*",
|
||||
"*://*.noordhollandsdagblad.nl/*",
|
||||
"*://*.northerndailyleader.com.au/*",
|
||||
"*://*.northernstar.com.au/*",
|
||||
|
@ -291,5 +292,5 @@
|
|||
"webRequest",
|
||||
"webRequestBlocking"
|
||||
],
|
||||
"version": "1.8.4.3"
|
||||
"version": "1.8.4.4"
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@
|
|||
"page": "options.html"
|
||||
},
|
||||
"permissions": [ "cookies", "<all_urls>", "storage", "webRequest", "webRequestBlocking"],
|
||||
"version": "1.8.4.3"
|
||||
"version": "1.8.4.4"
|
||||
}
|
||||
|
|
1
sites.js
1
sites.js
|
@ -114,6 +114,7 @@ var defaultSites =
|
|||
"New Zealand Herald": "nzherald.co.nz",
|
||||
"Newsweek": "newsweek.com",
|
||||
"Nikkei Asian Review": "asia.nikkei.com",
|
||||
"NK News (free articles only)": "nknews.org",
|
||||
"Noordhollands Dagblad": "noordhollandsdagblad.nl",
|
||||
"NRC Handelsblad": "nrc.nl",
|
||||
"O Estado de S. Paulo": "estadao.com.br",
|
||||
|
|
Loading…
Reference in New Issue