mirror of
https://gitlab.com/SukkaW/ruleset.skk.moe.git
synced 2026-01-02 02:20:24 +00:00
deploy: 3ff28ca32ff4aaa3ed9957ccfde252e5448c561b
This commit is contained in:
@@ -8,13 +8,30 @@ exports.dedupe = ({ chunk }) => {
|
||||
for (const domainFromFullSet of workerData) {
|
||||
if (domainFromFullSet === domainFromInput) continue;
|
||||
if (domainFromFullSet.charAt(0) !== '.') continue;
|
||||
// domainFromFullSet is now startsWith a "."
|
||||
|
||||
if (
|
||||
(domainFromInput.charAt(0) !== '.' && `.${domainFromInput}` === domainFromFullSet)
|
||||
|| domainFromInput.endsWith(domainFromFullSet)
|
||||
) {
|
||||
outputToBeRemoved.add(domainFromInput);
|
||||
break;
|
||||
if (domainFromInput.charAt(0) !== '.') {
|
||||
let shouldBeRemoved = true;
|
||||
|
||||
for (let j = 0, l2 = domainFromInput.length; j < l2; j++) {
|
||||
if (domainFromFullSet.charAt(j + 1) !== domainFromInput.charAt(j)) {
|
||||
shouldBeRemoved = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldBeRemoved) {
|
||||
outputToBeRemoved.add(domainFromInput);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// domainFromInput is now startsWith a "."
|
||||
|
||||
if (domainFromInput.length >= domainFromFullSet.length) {
|
||||
if (domainFromInput.endsWith(domainFromFullSet)) {
|
||||
outputToBeRemoved.add(domainFromInput);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,7 @@
|
||||
<main class="container">
|
||||
<h1>Sukka Surge Ruleset Server</h1>
|
||||
<p>Made by <a href="https://skk.moe">Sukka</a> | <a href="https://github.com/SukkaW/Surge/">Source @ GitHub</a> | Licensed under <a href="https://github.com/SukkaW/Surge/blob/master/LICENSE" target="_blank">AGPL-3.0</a></p>
|
||||
<p>Last Updated: 2022-08-21T12:43:06.958Z</p>
|
||||
<p>Last Updated: 2022-08-21T13:16:16.241Z</p>
|
||||
<hr>
|
||||
<br>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user