您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
vimium 翻页
当前为
// ==UserScript== // @name south+vimium // @namespace https://greasyfork.org/zh-CN/scripts/382722-page // @version 0.11 // @description vimium 翻页 // @author ayase // @match https://*.summer-plus.net/* // @match https://*.level-plus.net/* // @match https://*.white-plus.net/* // @match https://*.south-plus.net/* // @match https://*.imoutolove.me/* // @match https://summer-plus.net/* // @match https://level-plus.net/* // @match https://white-plus.net/* // @match https://south-plus.net/* // @match https://imoutolove.me/* // @grant none // ==/UserScript== (() => { const main = () => { const currPage = parseInt(document.querySelector('.pages b').textContent, 10) const prePage = (currPage === 1) ? 1 : (currPage - 1) const nextPage = currPage + 1 for (const node of queryTextAll('.pages a', '»')) { const href = node.getAttribute('href') node.setAttribute('href', href.replace(/page-\d+/i, `page-${nextPage}`)) } for (const node of queryTextAll('.pages a', '«')) { const href = node.getAttribute('href') node.setAttribute('href', href.replace(/page-\d+/i, `page-${prePage}`)) } } /** * 选择所有包含指定字符串的节点 * @param {string} selector * @param {string} text */ const queryTextAll = (selector, text) => { const r = [] for (const node of Array.from(document.querySelectorAll(selector))) { if (node.textContent.includes(text)){ r.push(node) } } return r } main() })()