修复高亮演员

This commit is contained in:
lzyme.dev@gmail.com
2026-10-11 23:45:45 +08:00
parent b81922103a
commit fde1eadac9
5 changed files with 38 additions and 7 deletions
+2
View File
@@ -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);
+7
View File
@@ -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();
+5 -2
View File
@@ -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