ComicK - Hide Low Chapter Mangas

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

目前為 2025-03-03 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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.2.2025.1
// @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();
  };
})();