feat: inject user js/css
This commit is contained in:
@@ -407,6 +407,22 @@ export const I18N = {
|
||||
zh: `0、支持正则表达式匹配。1、多条术语用换行或分号“;”隔开。2、术语和译文用英文逗号“,”隔开。3、没有译文视为不翻译术语。4、留空表示采用全局设置。`,
|
||||
en: `0. Supports regular expression matching. 1. Separate multiple terms with newlines or semicolons ";". 2. Terms and translations are separated by English commas ",". 3. If there is no translation, the term will be deemed not to be translated. 4. Leave blank to adopt the global setting.`,
|
||||
},
|
||||
selector_style: {
|
||||
zh: `选择器样式`,
|
||||
en: `Selector Style`,
|
||||
},
|
||||
selector_parent_style: {
|
||||
zh: `选择器父样式`,
|
||||
en: `Selector Parent Style`,
|
||||
},
|
||||
inject_js: {
|
||||
zh: `注入JS`,
|
||||
en: `Inject JS`,
|
||||
},
|
||||
inject_css: {
|
||||
zh: `注入CSS`,
|
||||
en: `Inject CSS`,
|
||||
},
|
||||
root_selector: {
|
||||
zh: `根选择器`,
|
||||
en: `Root Selector`,
|
||||
@@ -759,4 +775,8 @@ export const I18N = {
|
||||
zh: `是否同时翻译页面标题`,
|
||||
en: `Translate Page Title`,
|
||||
},
|
||||
more: {
|
||||
zh: `更多`,
|
||||
en: `More`,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -66,6 +66,8 @@ export const MSG_TRANS_PUTRULE = "trans_putrule";
|
||||
export const MSG_TRANS_CURRULE = "trans_currule";
|
||||
export const MSG_CONTEXT_MENUS = "context_menus";
|
||||
export const MSG_COMMAND_SHORTCUTS = "command_shortcuts";
|
||||
export const MSG_INJECT_JS = "inject_js";
|
||||
export const MSG_INJECT_CSS = "inject_css";
|
||||
|
||||
export const THEME_LIGHT = "light";
|
||||
export const THEME_DARK = "dark";
|
||||
@@ -335,6 +337,10 @@ export const GLOBLA_RULE = {
|
||||
transOpen: "false",
|
||||
bgColor: "",
|
||||
textDiyStyle: "",
|
||||
selectStyle: "-webkit-line-clamp: unset; max-height: none; height: auto;",
|
||||
parentStyle: "-webkit-line-clamp: unset; max-height: none; height: auto;",
|
||||
injectJs: "",
|
||||
injectCss: "",
|
||||
};
|
||||
|
||||
// 输入框翻译
|
||||
|
||||
@@ -18,6 +18,10 @@ export const DEFAULT_RULE = {
|
||||
transOpen: GLOBAL_KEY,
|
||||
bgColor: "",
|
||||
textDiyStyle: "",
|
||||
selectStyle: "",
|
||||
parentStyle: "",
|
||||
injectJs: "",
|
||||
injectCss: "",
|
||||
};
|
||||
|
||||
const DEFAULT_DIY_STYLE = `color: #666;
|
||||
|
||||
Reference in New Issue
Block a user