From 9a30ef5c0868d07667064ff256aa12c4f98c7902 Mon Sep 17 00:00:00 2001 From: 8ga Date: Mon, 27 Oct 2025 19:51:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20202510=5F=E6=B2=B9?= =?UTF-8?q?=E7=8C=B4=5FNPS=E8=87=AA=E5=8A=A8=E7=BE=8E=E5=8C=96=E8=84=9A?= =?UTF-8?q?=E6=9C=AC.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 202510_油猴_NPS自动美化脚本.md | 49 ---------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 202510_油猴_NPS自动美化脚本.md diff --git a/202510_油猴_NPS自动美化脚本.md b/202510_油猴_NPS自动美化脚本.md deleted file mode 100644 index 318ea5a..0000000 --- a/202510_油猴_NPS自动美化脚本.md +++ /dev/null @@ -1,49 +0,0 @@ -``` -// ==UserScript== -// @name NPS自动美化脚本 -// @namespace http://tampermonkey.net/ -// @version 1.0 -// @description 页面加载完成后自动点击指定按钮和分页链接 -// @author 8ga -// @match 115.29.241.23:38888/index/tcp -// @grant none -// @run-at document-idle -// ==/UserScript== - -(function () { - 'use strict'; - window.addEventListener('load', function () { - setTimeout(() => { - const dropdownButton = document.querySelector("#page-wrapper > div.wrapper.wrapper-content.animated.fadeInRight > div > div > div > div.ibox-content > div.bootstrap-table.bootstrap4 > div.fixed-table-pagination > div.float-left.pagination-detail > span.page-list > span > button"); - if (dropdownButton) { - dropdownButton.click(); - const fourthLink = document.querySelector("#page-wrapper > div.wrapper.wrapper-content.animated.fadeInRight > div > div > div > div.ibox-content > div.bootstrap-table.bootstrap4 > div.fixed-table-pagination > div.float-left.pagination-detail > span.page-list > span > div > a:nth-child(4)"); - if (fourthLink) { - fourthLink.click(); - } - } - if (!document.body.classList.contains('mini-navbar')) { - const collspace = document.querySelector("#page-wrapper > div.row.border-bottom > nav > div > a"); - if (collspace) { - collspace.click(); - } - } - const culumnBtn = document.querySelector("#page-wrapper > div.wrapper.wrapper-content.animated.fadeInRight > div > div > div > div.ibox-content > div.bootstrap-table.bootstrap4 > div.fixed-table-toolbar > div.columns.columns-right.btn-group.float-right > div > button"); - if (culumnBtn) { - culumnBtn.click(); - setTimeout(() => { - const columnDiv = document.querySelector("#page-wrapper > div.wrapper.wrapper-content.animated.fadeInRight > div > div > div > div.ibox-content > div.bootstrap-table.bootstrap4 > div.fixed-table-toolbar > div.columns.columns-right.btn-group.float-right > div > div"); - const inputList = Array.from(columnDiv.querySelectorAll('label')); - const updateIndex = [0, 1, 3, 4, 8]; - updateIndex.forEach(i => { - if (inputList[i]) { - inputList[i].click(); - } - }); - culumnBtn.click(); - }, 100) - } - }, 500); - }); -})(); -``` \ No newline at end of file