Re: [瓦特] 有關holodex

作者: crimsonmoon9 (緋月)   2023-06-28 00:32:36
※ 引述 《jones17188 (命言)》 之銘言:
: 當然我是拿來看vspodex
: 總之是那個網站
: 就是說,他能不能預設是"most viewer"?
: 我每次都要手動改,因為他預設一定是最新
: 是要用什麼F12,程式碼去改嗎?
: 請教一下邊版v豚大哥
找個腳本管理器貼上應該就可以了 我是用violentmonkey
是說為什麼要用人數來排啊?
// ==UserScript==
// @name New script - holodex.net
// @namespace Violentmonkey Scripts
// @match https://holodex.net/
// @grant none
// @version 1.0
// @author -
// @description 6/28/2023, 12:11:11 AM
// ==/UserScript==
document.onreadystatechange = function () {
if (document.readyState === "complete") {
const t = setInterval(() => {
document.querySelector('.v-tab .v-btn[role="button"]')?.click();
}, 10);
new MutationObserver(function (r) {
const x = r.find((el) =>
Array.from(el.addedNodes).some((e) =>
e.querySelector('.v-input__control [role="button"]')
)
);
const y = r.find((el) =>
Array.from(el.addedNodes).some((e) =>
e.querySelector(
'[role="listbox"] [role="option"]:nth-child(2)'
)
)
);
if (x) {
clearInterval(t);
document
.querySelector('.v-input__control [role="button"]')
.click();
}
else if (y) {
document
.querySelector(
'[role="listbox"] [role="option"]:nth-child(2)'
)
.click();
document.querySelector('.v-tab .v-btn[role="button"]').click();
this.disconnect();
}
}).observe(document.getElementById("app"), {
childList: true,
});
}
};
作者: jones17188 (命言)   2023-06-28 00:35:00
有時候切去看虹的時候,想用人數排序,謝謝喔
作者: reader2714 (無毀的湖光)   2023-06-28 02:12:00
深入骨髓的鬥蟲精神?!

Links booklink

Contact Us: admin [ a t ] ucptt.com