ComicK - Hide Low Chapter Mangas

Removes manga entries with fewer chapters than the user-defined threshold.

当前为 2025-03-05 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        ComicK - Hide Low Chapter Mangas
// @namespace   https://github.com/BreezeSpark
// @match       https://comick.io/*
// @icon        https://comick.io/favicon.ico
// @version     3.4.2025.2
// @description Removes manga entries with fewer chapters than the user-defined threshold.
// @author      BreezeSpark
// @run-at      document-idle
// @grant       none
// @supportURL  https://github.com/BreezeSpark/Userscripts/issues
// @homepageURL https://github.com/BreezeSpark/Userscripts
// @license     GPL-3.0-or-later
// ==/UserScript==

(function() {
  //------------------------------- Settings -------------------------------\\
  const settings = {
    minChapterCount: 30 // Change this value to set the minimum chapter count.
  };
  //------------------------------------------------------------------------\\

  const observer = new MutationObserver(() => {
    document.querySelectorAll('div.flex-0').forEach((mangaDiv) => {
      const chapterLink = mangaDiv.querySelector('a[href*="-chapter-"]');
      if (chapterLink) {
        const href = chapterLink.getAttribute('href');
        const chapterMatch = href.match(/-chapter-([\d.]+)-/);
        if (chapterMatch && parseFloat(chapterMatch[1]) < settings.minChapterCount) {
          mangaDiv.remove();
        }
      }
    });
  });

  observer.observe(document.body, { childList: true, subtree: true });

  return () => {
    observer.disconnect();
  };
})();