删除 202510_油猴_NPS自动美化脚本.md
This commit is contained in:
parent
8b31619713
commit
9a30ef5c08
@ -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);
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
```
|
|
||||||
Loading…
Reference in New Issue
Block a user