您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fjord Bootcampで左右のキーで移動できるようになります
// ==UserScript== // @name Fjord Bootcamp Keyboard Pagination // @name:ja フィヨルドブートキャンプ・キーページネーション // @namespace https://greasyfork.org/ja/users/570127 // @version 0.2.1 // @description Fjord Bootcampで左右のキーで移動できるようになります // @description:ja Fjord Bootcampで左右のキーで移動できるようになります // @author universato // @license CC0 // @match https://bootcamp.fjord.jp/* // @supportURL https://twitter.com/universato // ==/UserScript== (function() { document.addEventListener('keydown', function (event) { const activeTagName = document.activeElement.tagName; if (activeTagName.match(/^(INPUT|TEXTAREA)$/)) { return; } let element; const pathnames = location.pathname.split('/'); const flag0 = (pathnames[1] === 'reports') && pathnames[2]; const flag1 = (pathnames[1] === 'current_user') && pathnames[2].match(/^(questions|reports|watches)$/); const flag2 = pathnames[1].match(/^(announcements|events|notifications|pages|questions|reports|searchables|users)$/); if (flag0){ if (event.key === 'ArrowLeft'){ element = document.querySelector('a.page-content-prev-next__item-link.is-prev'); }else if(event.key === 'ArrowRight'){ element = document.querySelector('a.page-content-prev-next__item-link.is-next'); } } else if (flag1 || flag2){ if (event.key === 'ArrowLeft'){ element = document.querySelector('a.pagination__item-link.is-prev'); }else if(event.key === 'ArrowRight'){ element = document.querySelector('a.pagination__item-link.is-next'); } } element?.click(); }, false); })();