From 6397ced695edda9ca58aa28b3b282d43cdfb5b19 Mon Sep 17 00:00:00 2001 From: 8ga Date: Sun, 1 Feb 2026 15:39:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E9=A1=B5=E5=88=87=E6=8D=A2=E5=88=86=E7=B1=BB.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 导航页切换分类.js | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 导航页切换分类.js diff --git a/导航页切换分类.js b/导航页切换分类.js deleted file mode 100644 index 8f40eed..0000000 --- a/导航页切换分类.js +++ /dev/null @@ -1,44 +0,0 @@ -// ==UserScript== -// @name 导航页切换分类 -// @namespace http://tampermonkey.net/ -// @version 1.0 -// @description 导航页切换分类 -// @author 8ga -// @match https://nav.jkwlstv.cn/* -// @grant none -// @run-at document-idle -// ==/UserScript== - -(function () { - 'use strict'; - - window.addEventListener('load', function () { - setTimeout(init, 1000); - function init() { - const search_bar = document.querySelector("#search-bar"); - if (search_bar) { - search_bar.style.display = 'none'; - } - const spans = Array.from(document.querySelectorAll(".select-tag")); - if (spans.length === 0) { - console.warn("未找到匹配的 span 元素"); - return; - } - let currentIndex = 0; - document.addEventListener('keydown', function (e) { - if (e.key === 'Tab' || e.keyCode === 9) { - e.preventDefault(); // 阻止默认 Tab 行为 - - // 更新索引 - currentIndex = (currentIndex + 1) % spans.length; - - // 触发点击 - const targetSpan = spans[currentIndex]; - if (targetSpan) { - targetSpan.click(); - } - } - }); - } - }); -})(); \ No newline at end of file