From cfc7e96ad095ae2e54b8a86ebc4e6ed47f50928e Mon Sep 17 00:00:00 2001 From: LMFuture <161135837+first-storm@users.noreply.github.com> Date: Sat, 24 Feb 2024 21:52:06 +0800 Subject: [PATCH] Support wildcard --- v2/firefox/common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v2/firefox/common.js b/v2/firefox/common.js index d7655e3d..584ae171 100644 --- a/v2/firefox/common.js +++ b/v2/firefox/common.js @@ -465,6 +465,11 @@ function match({url, tabId, cookieStoreId = DCSI}) { else if (prefs.exactMatch === false) { return s.endsWith('.' + h) || h.endsWith('.' + s) || s.endsWith('.' + hh) || hh.endsWith('.' + s); } + // Support "*" + else if (s.startsWith('*.')) { + const domain = s.substring(2); + return h.endsWith(domain); + } }).shift(); let s; // try to use an already resolved sibling hostname