您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自動的にしおりを差し込む(おせっかい)システム。
// ==UserScript== // @name 自動しおり for 小説を読もう // @version 0.20 // @description 自動的にしおりを差し込む(おせっかい)システム。 // @author Velgail // @include http*://ncode.syosetu.com/* // @include http*://novel*.syosetu.com/* // @grant none // @namespace https://greasyfork.org/users/135617 // ==/UserScript== (function() { 'use strict'; // Function to check and trigger the bookmark link function checkAndTriggerBookmark() { // すべての「しおりを挿む」リンクを検索し、2番目(インデックスは1)のものを選択 const bookmarkLink = $("a[href='javascript:void(0)']").filter(function() { return $(this).text() === "しおりを挿む"; }).eq(1); // eq(1) は2番目の要素を選択します。インデックスは0から始まります。 // リンクが存在する場合のみ以下の処理を実行 if (bookmarkLink.length) { const scrollPosition = $(window).height() + $(window).scrollTop(); if (scrollPosition > bookmarkLink.offset().top + 100) { bookmarkLink.trigger("click"); } } } // Attach scroll and touchmove events $(window).on("scroll touchmove", checkAndTriggerBookmark); })();