Fix AdGuardHome: remove hostname anchor

This commit is contained in:
SukkaW 2024-10-25 10:02:40 +08:00
parent 35014e36d9
commit f01cad25b7

View File

@ -99,18 +99,18 @@ export class DomainsetOutput extends RuleOutput<Preprocessed> {
for (let i = 0, len = whitelistArray.length; i < len; i++) {
const domain = whitelistArray[i];
if (domain[0] === '.') {
results.push(`@@||${domain.slice(1)}^`);
results.push(`@@||${domain.slice(1)}`);
} else {
results.push(`@@|${domain}^`);
results.push(`@@|${domain}`);
}
}
for (let i = 0, len = this.$preprocessed.length; i < len; i++) {
const domain = this.$preprocessed[i];
if (domain[0] === '.') {
results.push(`||${domain.slice(1)}^`);
results.push(`||${domain.slice(1)}`);
} else {
results.push(`|${domain}^`);
results.push(`|${domain}`);
}
}