Skip to content

Commit fdb0441

Browse files
committed
HostNamePatterns: use a host as a matching target when UseRegex is true
1 parent 7344b14 commit fdb0441

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

webextensions/chrome/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ const Redirector = {
309309
}
310310

311311
for (const [browser, matcher] of Object.entries(config.HostNamePatternsMatchers)) {
312-
if (matcher.test(url)) {
312+
if (matcher.test(host)) {
313313
console.log(`* Match with '${matcher.source}' (browser=${browser})`);
314314
return browser;
315315
}

webextensions/edge/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ const Redirector = {
309309
}
310310

311311
for (const [browser, matcher] of Object.entries(config.HostNamePatternsMatchers)) {
312-
if (matcher.test(url)) {
312+
if (matcher.test(host)) {
313313
console.log(`* Match with '${matcher.source}' (browser=${browser})`);
314314
return browser;
315315
}

0 commit comments

Comments
 (0)