您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Changes "Next chapter" button to the next full chapter if present
当前为
// ==UserScript== // @name Skip half-chapters // @namespace http://tampermonkey.net/ // @version 2025-01-28 // @description Changes "Next chapter" button to the next full chapter if present // @author You // @match https://chapmanganato.to/* // @icon https://www.google.com/s2/favicons?sz=64&domain=chapmanganato.to // @grant none // ==/UserScript== (function() { 'use strict'; const buttons = document.querySelectorAll(".navi-change-chapter-btn-next"); console.log(buttons); const currentChapter = parseInt(location.href.match(/.+?\/chapter-(\d+)/)[1]); const chapters = [...document.querySelectorAll(".navi-change-chapter option")]; let nextChapterExists = false; for (const option of chapters) { if (option.getAttribute('data-c') === (currentChapter + 1).toString()) { console.log(option); nextChapterExists = true; break; } } if (!nextChapterExists) { console.warn("No next chapter, exiting"); return; } const nextUrl = location.href.replace(/\/chapter-(.+)/, `/chapter-${currentChapter + 1}`); console.log('Next chapter url', nextUrl); for (const button of buttons) { button.href = nextUrl; button.innerHTML = 'NEXT CHAPTER (FULL) <i></i>'; } // Your code here... })();