mirror of
https://github.com/fireinrain/JHS-enhance.git
synced 2026-10-14 13:26:37 +08:00
修复高亮演员
This commit is contained in:
@@ -917,6 +917,8 @@ const pluginManager = function() {
|
||||
pluginManager2.register(WangPan115TaskPlugin);
|
||||
pluginManager2.register(TranslatePlugin);
|
||||
pluginManager2.register(BlacklistPlugin);
|
||||
pluginManager2.register(FavoriteActressesPlugin);
|
||||
pluginManager2.register(FoldCategoryPlugin);
|
||||
pluginManager2.register(TaskPlugin);
|
||||
}
|
||||
hostname.includes("javtrailers") && pluginManager2.register(JavTrailersPlugin);
|
||||
|
||||
@@ -5,6 +5,13 @@ class FavoriteActressesPlugin extends BasePlugin {
|
||||
getName() {
|
||||
return "FavoriteActressesPlugin";
|
||||
}
|
||||
|
||||
async initCss() {
|
||||
const settingObj = await storageManager.getSetting();
|
||||
const tagNumber = settingObj.highlightedTagNumber || 1;
|
||||
const tagColor = settingObj.highlightedTagColor || "#ce2222";
|
||||
return `\n <style>\n .highlighted {\n border: ${tagNumber}px solid ${tagColor} !important;\n }\n </style>\n `;
|
||||
}
|
||||
async handle() {
|
||||
this.bindEvent();
|
||||
await this.highlightActress();
|
||||
|
||||
@@ -7,7 +7,10 @@ class FoldCategoryPlugin extends BasePlugin {
|
||||
}
|
||||
async initCss() {
|
||||
const settingObj = await storageManager.getSetting();
|
||||
return `\n <style>\n #tags a.tag, .tags a.tag {\n position:relative;\n }\n .highlight-btn {\n position: absolute;\n top: -10px;\n right: -10px;\n background-color: #4CAF50;\n color: white;\n border: none;\n border-radius: 50%;\n width: 24px;\n height: 24px;\n font-size: 14px;\n line-height: 24px;\n text-align: center;\n cursor: pointer;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n display: none;\n z-index: 999;\n }\n /* 当父元素被高亮时,按钮变为其他颜色 */\n .highlighted .highlight-btn {\n background-color: #FF5722;\n }\n /* 高亮状态下的标签样式 */\n .highlighted {\n /* 浅黄色 */\n border: ${settingObj.highlightedTagNumber || 1}px solid ${settingObj.highlightedTagColor || "#ce2222"};\n }\n </style>\n `;
|
||||
return `\n <style>\n #tags a.tag, .tags a.tag {\n position:relative;\n }\n .highlight-btn {\n position: absolute;\n top: -10px;\n right: -10px;\n background-color: #4CAF50;\n color: white;\n border: none;\n border-radius: 50%;\n width: 24px;\n height: 24px;\n font-size: 14px;\n line-height: 24px;\n text-align: center;\n cursor: pointer;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n display: none;\n z-index: 999;\n }\n /* 当父元素被高亮时,按钮变为其他颜色 */\n .highlighted .highlight-btn {\n background-color: #FF5722;\n }\n /* 高亮状态下的标签样式 */\n .highlighted {
|
||||
/* 浅黄色 */
|
||||
border: ${settingObj.highlightedTagNumber || 1}px solid ${settingObj.highlightedTagColor || "#ce2222"} !important;
|
||||
}\n </style>\n `;
|
||||
}
|
||||
async handle() {
|
||||
if (window.isListPage && !currentHref.includes("advanced_search")) {
|
||||
@@ -82,4 +85,4 @@ class FoldCategoryPlugin extends BasePlugin {
|
||||
}
|
||||
|
||||
|
||||
export { FoldCategoryPlugin };
|
||||
export { FoldCategoryPlugin };
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user