您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Change page on furaffinity using arrow keys, modified from original by kittywithclaws: https://sleazyfork.org/en/scripts/38725-e621-page-arrows
// ==UserScript== // @name furaffinity Page Arrows 2 // @version 0.1.0 // @description Change page on furaffinity using arrow keys, modified from original by kittywithclaws: https://sleazyfork.org/en/scripts/38725-e621-page-arrows // @author justrunmyscripts // @include https://www.furaffinity.net/* // @license MIT // @namespace NA // ==/UserScript== const NEXT = ['Next', 'Cont', 'Continue', '>']; const BACK = ['Back', 'Prev', 'Previous', '<']; //If it detects a Next or Previous button, add a keydown listener. console.log(`next count = ${getElementsByText(NEXT).length}`) console.log(`back count = ${getElementsByText(BACK).length}`) if(getElementsByText(NEXT).length !== 0 || getElementsByText(BACK).length !== 0){ document.addEventListener('keydown', (e) => checkKeycode(e)); } //This skims the page for elements by text. Used to find Next/Prev buttons. function getElementsByText(strs = [], tags = ['button', 'a']) { let found = [] let _strs = strs.map(s => s.trim().toLowerCase()) for (let t of tags) { found = found.concat([...document.getElementsByTagName(t)].filter( el => _strs.includes(el.textContent.trim().toLowerCase()) )) } return found; } function checkKeycode(event) { let keycode = (event.which) ? event.which : event.keyCode; if(keycode==39 || keycode==37){ changePage(keycode); } return false; } //Check if Left or Right arrow are pressed, and change page accordingly. function changePage(keycode){ const inputTypes = ["TEXTAREA", "INPUT"]; const activeElementType = document.activeElement.tagName; if (inputTypes.includes(activeElementType)) { return; } if(keycode==39){ // RIGHT getElementsByText(NEXT)[0].click(); } else if (keycode==37){ // LEFT getElementsByText(BACK)[0].click(); } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址