Fix dedupe

This commit is contained in:
SukkaW
2023-07-04 14:05:56 +08:00
parent 6746a0acec
commit e9cabbb49e
2 changed files with 17 additions and 2 deletions

View File

@@ -40,7 +40,6 @@ const ADGUARD_FILTERS = /** @type {const} */([
'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_ads.txt', 'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_ads.txt',
'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_trackers.txt', 'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_trackers.txt',
'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_clickthroughs.txt', 'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_clickthroughs.txt',
'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_trackers.txt',
'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_microsites.txt', 'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_microsites.txt',
// uBlock Origin Filter List // uBlock Origin Filter List
[ [
@@ -229,7 +228,23 @@ const PREDEFINED_ENFORCED_BACKLIST = [
'telemetry.mozilla.org' 'telemetry.mozilla.org'
]; ];
const PREDEFINED_ENFORCED_WHITELIST = [
'godaddysites.com',
'web.app',
'firebaseapp.com',
'ipfs.nftstorage.link',
'ipfs.4everland.io',
'ipfs.cf-ipfs.com',
'ipfs.dweb.link',
'ipfs.infura-ipfs.io',
'ipfs.fleek.cool',
'repl.co',
'w3s.link',
'translate.goog'
]
module.exports.HOSTS = HOSTS; module.exports.HOSTS = HOSTS;
module.exports.ADGUARD_FILTERS = ADGUARD_FILTERS; module.exports.ADGUARD_FILTERS = ADGUARD_FILTERS;
module.exports.PREDEFINED_WHITELIST = PREDEFINED_WHITELIST; module.exports.PREDEFINED_WHITELIST = PREDEFINED_WHITELIST;
module.exports.PREDEFINED_ENFORCED_BACKLIST = PREDEFINED_ENFORCED_BACKLIST; module.exports.PREDEFINED_ENFORCED_BACKLIST = PREDEFINED_ENFORCED_BACKLIST;
module.exports.PREDEFINED_ENFORCED_WHITELIST = PREDEFINED_ENFORCED_WHITELIST;

View File

@@ -28,7 +28,7 @@ module.exports = ({ chunk }) => {
if (domainFromInputLen < domainFromFullSetLen) { if (domainFromInputLen < domainFromFullSetLen) {
if (domainFromInputLen + 1 !== domainFromFullSetLen) { if (domainFromInputLen + 1 !== domainFromFullSetLen) {
break; continue;
} }
// !domainFromInput.starsWith('.') && `.${domainFromInput}` === domainFromFullSet // !domainFromInput.starsWith('.') && `.${domainFromInput}` === domainFromFullSet