mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Housekeeping
This commit is contained in:
@@ -23,24 +23,21 @@ module.exports.dedupe = ({ chunk }) => {
|
||||
const domainFromFullSetLen = domainFromFullSet.length;
|
||||
|
||||
// !domainFromInput.starsWith('.') && `.${domainFromInput}` === domainFromFullSet
|
||||
if (domainFromInput.charCodeAt(0) !== 46) {
|
||||
if (domainFromInputLen + 1 === domainFromFullSetLen) {
|
||||
if (domainFromInput[0] !== '.' && domainFromInputLen + 1 === domainFromFullSetLen) {
|
||||
let shouldBeRemoved = true;
|
||||
|
||||
let shouldBeRemoved = true;
|
||||
|
||||
for (let k = 0; k < domainFromInputLen; k++) {
|
||||
if (domainFromFullSet[k + 1] !== domainFromInput[k]) {
|
||||
shouldBeRemoved = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldBeRemoved) {
|
||||
outputToBeRemoved[i] = 1;
|
||||
log(domainFromInput, domainFromFullSet)
|
||||
for (let k = 0; k < domainFromInputLen; k++) {
|
||||
if (domainFromFullSet[k + 1] !== domainFromInput[k]) {
|
||||
shouldBeRemoved = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldBeRemoved) {
|
||||
outputToBeRemoved[i] = 1;
|
||||
log(domainFromInput, domainFromFullSet)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (domainFromInputLen > domainFromFullSetLen) {
|
||||
// domainFromInput is now startsWith a "."
|
||||
|
||||
Reference in New Issue
Block a user