diff --git a/dist/jhs-enhance.user.js b/dist/jhs-enhance.user.js index b76b3fe..f46dd5a 100644 --- a/dist/jhs-enhance.user.js +++ b/dist/jhs-enhance.user.js @@ -8977,7 +8977,7 @@ ${err.stack}` : ""); title="点击查看匹配详情">匹配${matchList.length}个`); const $deleteBtn = $box2.find(".delete115Svg"); const $markBtn = $box2.find(".markDeleteSvg"); - if ($deleteBtn.length > 0 && matchList[0].dirId) { + if ($deleteBtn.length > 0 && matchList.some((m) => m.dirId != null)) { $deleteBtn.attr("data-match", JSON.stringify(matchList)); $deleteBtn.show(); } @@ -9194,7 +9194,7 @@ ${err.stack}` : ""); title="${title}">匹配${matchList.length}个`); const $deleteBtn = $box2.find(".delete115Svg"); const $markBtn = $box2.find(".markDeleteSvg"); - if ($deleteBtn.length > 0 && matchList[0].dirId) { + if ($deleteBtn.length > 0 && matchList.some((m) => m.dirId != null)) { $deleteBtn.attr("data-match", JSON.stringify(matchList)); $deleteBtn.show(); } @@ -12164,9 +12164,9 @@ ${err.stack}` : ""); this.replaceHdImg(); this.addJumpPageControl(); this.fixBusTitleBox(); + this.getBean("CoverButtonPlugin").addSvgBtn().then(); await this.doFilter(); await this.getBean("ListPageButtonPlugin").sortItems(); - this.getBean("CoverButtonPlugin").addSvgBtn().then(); $(this.getSelector().itemSelector + " a").attr("target", "_blank"); this.getBean("AutoPagePlugin").checkLoad(); } finally { diff --git a/src/plugins/list-page.js b/src/plugins/list-page.js index 994f00e..cc3cc25 100644 --- a/src/plugins/list-page.js +++ b/src/plugins/list-page.js @@ -56,9 +56,9 @@ class ListPagePlugin extends BasePlugin { this.replaceHdImg(); this.addJumpPageControl(); this.fixBusTitleBox(); + this.getBean("CoverButtonPlugin").addSvgBtn().then(); await this.doFilter(); await this.getBean("ListPageButtonPlugin").sortItems(); - this.getBean("CoverButtonPlugin").addSvgBtn().then(); $(this.getSelector().itemSelector + " a").attr("target", "_blank"); this.getBean("AutoPagePlugin").checkLoad(); } finally { diff --git a/src/plugins/wangpan-115.js b/src/plugins/wangpan-115.js index 301d321..3b0b53d 100644 --- a/src/plugins/wangpan-115.js +++ b/src/plugins/wangpan-115.js @@ -360,7 +360,7 @@ const _WangPan115MatchPlugin = class _WangPan115MatchPlugin extends BasePlugin { $box2.find(".jhs-match-btn").replaceWith(`匹配${matchList.length}个`); const $deleteBtn = $box2.find(".delete115Svg"); const $markBtn = $box2.find(".markDeleteSvg"); - if ($deleteBtn.length > 0 && matchList[0].dirId) { + if ($deleteBtn.length > 0 && matchList.some(m => m.dirId != null)) { $deleteBtn.attr("data-match", JSON.stringify(matchList)); $deleteBtn.show(); } @@ -569,7 +569,7 @@ const _WangPan115MatchPlugin = class _WangPan115MatchPlugin extends BasePlugin { $box2.find(".video-title").prepend(`匹配${matchList.length}个`); const $deleteBtn = $box2.find(".delete115Svg"); const $markBtn = $box2.find(".markDeleteSvg"); - if ($deleteBtn.length > 0 && matchList[0].dirId) { + if ($deleteBtn.length > 0 && matchList.some(m => m.dirId != null)) { $deleteBtn.attr("data-match", JSON.stringify(matchList)); $deleteBtn.show(); }