您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
swarmsim cheatsheet left menu! god!
// ==UserScript== // @name swarmsim cheatsheet left menu // @namespace http://tampermonkey.net/ // @version 2024-12-24 // @description swarmsim cheatsheet left menu! god! // @author imzhi <[email protected]> // @match https://static.oschina.net/trytry/swarmsim/ // @icon https://www.google.com/s2/favicons?sz=64&domain=oschina.net // @grant none // ==/UserScript== (function() { 'use strict'; document.addEventListener('keydown', function(event) { if (event.key === 'p') { event.preventDefault(); // 如果需要的话,可以在这里实现你的逻辑 document.querySelectorAll(`.tab-pane.active .table > tbody > tr`)[curr_act()+1].click() } }); function curr_act() { const tr_multi = document.querySelectorAll(`.tab-pane.active .table > tbody > tr`) const index_act = 0 for (const [tr_key, tr_item] of Object.entries(tr_multi)) { console.log('tr_multi', tr_key, tr_item, tr_item.className) if (tr_multi.className && tr_multi.className.includes('active')) { index_act = tr_key break } } return index_act } })();