mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 07:27:48 +01:00
ET Prime restrictions (only articles)
Fixes empty homepage. Restrictions now defined with regular expressions.
This commit is contained in:
parent
dfb4dd0c8a
commit
d61311d48b
1 changed files with 4 additions and 3 deletions
|
@ -100,8 +100,9 @@ var defaultSites = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const restrictions = {
|
const restrictions = {
|
||||||
'barrons.com': 'barrons.com/articles',
|
'barrons.com': /.+barrons\.com\/articles\/.+/,
|
||||||
'wsj.com': 'wsj.com/articles'
|
'prime.economictimes.indiatimes.com': /.+prime\.economictimes\.indiatimes\.com\/news\/[0-9]{8}\/.+/,
|
||||||
|
'wsj.com': /.+wsj\.com\/articles\/.+/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't remove cookies before page load
|
// Don't remove cookies before page load
|
||||||
|
@ -450,7 +451,7 @@ function isSiteEnabled(details) {
|
||||||
var isEnabled = enabledSites.some(function(enabledSite) {
|
var isEnabled = enabledSites.some(function(enabledSite) {
|
||||||
var useSite = (details.url.indexOf("." + enabledSite) !== -1 || details.url.indexOf("/" + enabledSite) !== -1);
|
var useSite = (details.url.indexOf("." + enabledSite) !== -1 || details.url.indexOf("/" + enabledSite) !== -1);
|
||||||
if (enabledSite in restrictions) {
|
if (enabledSite in restrictions) {
|
||||||
return useSite && details.url.indexOf(restrictions[enabledSite]) !== -1;
|
return useSite && details.url.match(restrictions[enabledSite]);
|
||||||
}
|
}
|
||||||
return useSite;
|
return useSite;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue