browser & client

This commit is contained in:
Gabe Yuan
2023-08-04 16:48:40 +08:00
parent 7d2fafcd0e
commit 7e47882d53
13 changed files with 34 additions and 21 deletions

View File

@@ -10,6 +10,12 @@ export const STOKEY_SETTING = `${APP_NAME}_setting`;
export const STOKEY_RULES = `${APP_NAME}_rules`;
export const STOKEY_SYNC = `${APP_NAME}_sync`;
export const CLIENT_WEB = "web";
export const CLIENT_CHROME = "chrome";
export const CLIENT_EDGE = "edge";
export const CLIENT_FIREFOX = "firefox";
export const CLIENT_USERSCRIPT = "userscript";
export const KV_HEADER_KEY = "X-KISS-PSK";
export const KV_RULES_KEY = "KT_RULES";
export const KV_SETTING_KEY = "KT_SETTING";

View File

@@ -1,7 +1,7 @@
const els = `li, p, h1, h2, h3, h4, h5, h6, dd`;
export const DEFAULT_SELECTOR =
process.env.REACT_APP_BROWSER === "firefox"
process.env.REACT_APP_CLIENT === "firefox"
? `:is(${els})`
: `:is(${els}):not(:has(:is(${els})))`;