您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fix unreliable pagination behavior
// ==UserScript== // @name Pagination Keyboard Shortcut Fix // @namespace https://greasyfork.org/users/65414 // @description Fix unreliable pagination behavior // @version 0.1 // @match *.tumblr.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js // @run-at document-start // @grant none // ==/UserScript== (function() { (window.opera ? document.body : document).addEventListener('keydown', function(e) { let btns = { "Previous": 37, "Next": 39 } $(Object.keys(btns)).each(function() { let el = $(`button[aria-label="${this}"] > :first-child`).last(); if (e.keyCode == btns[this]) { e.cancelBubble = true; e.stopImmediatePropagation(); if (el.closest('._3uGiA._2t9LV').length || el.length && !$('._3uGiA._2t9LV').length) el.click(); } }) return false; }, !window.opera); })();