mirror of
https://gitlab.com/SukkaW/ruleset.skk.moe.git
synced 2026-04-19 18:34:27 +00:00
deploy: 39f3dacf6e0a1459f4f46ccbd1677148a85ab07c
This commit is contained in:
@@ -43,39 +43,3 @@ exports.dedupe = ({ chunk }) => {
|
||||
|
||||
return outputToBeRemoved;
|
||||
};
|
||||
|
||||
exports.whitelisted = ({ whiteList }) => {
|
||||
const outputToBeRemoved = new Set();
|
||||
|
||||
for (const domain of workerData) {
|
||||
for (const white of whiteList) {
|
||||
if (domain.includes(white) || white.includes(domain)) {
|
||||
outputToBeRemoved.add(domain);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return outputToBeRemoved;
|
||||
};
|
||||
|
||||
exports.dedupeKeywords = ({ keywords, suffixes }) => {
|
||||
const outputToBeRemoved = new Set();
|
||||
|
||||
for (const domain of workerData) {
|
||||
for (const keyword of keywords) {
|
||||
if (domain.includes(keyword) || keyword.includes(domain)) {
|
||||
outputToBeRemoved.add(domain);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (const suffix of suffixes) {
|
||||
if (domain.endsWith(suffix)) {
|
||||
outputToBeRemoved.add(domain);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return outputToBeRemoved;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user