您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
网页端视频显示评论区楼层
当前为
// ==UserScript== // @name b站显示楼层(lchzh ver.) // @namespace http://tampermonkey.net/ // @version 0.1 // @description 网页端视频显示评论区楼层 // @author lchzh3473 // @match *://*.bilibili.com/video/* // @icon https://app.bilibili.com/favicon.ico // @grant none // ==/UserScript== (function() { 'use strict'; const mname = ".list-item.reply-wrap:not(.lchzhrel)"; setInterval(() => { if (document.querySelector(mname)) { for (const i of document.querySelectorAll(mname)) { i.classList.add("lchzhrel"); const xhr = new XMLHttpRequest(); xhr.open("get", `//api.bilibili.com/x/v2/reply/detail?type=1&oid=${aid}&root=${i.attributes["data-id"].value}`); xhr.responseType = "json"; xhr.withCredentials = true; xhr.send(); xhr.onload = () => { const data = xhr.response.data; console.log(i); const qwq = i.querySelector(".info"); const qwqwq = document.createElement("span"); qwqwq.innerHTML = `#${data.root.floor} `; qwq.insertBefore(qwqwq, qwq.children[0]); console.log(data.root.floor); } } } }, 500); })();