您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
bilibili哔哩哔哩网页端视频、番剧、动态显示评论区楼层
当前为
// ==UserScript== // @name bilibili哔哩哔哩(B站)评论区显示楼层(2022/04可用) // @namespace Original by lchzh3473 , Modify by Tinhone // @license GPL-3.0 // @version 0.3 // @description bilibili哔哩哔哩网页端视频、番剧、动态显示评论区楼层 // @author lchzh3473 , Modify by Tinhone // @match *://www.bilibili.com/video/* // @match *://www.bilibili.com/bangumi/play/* // @match *://t.bilibili.com/* // @exclude *://t.bilibili.com/ // @icon https://app.bilibili.com/favicon.ico // @grant none // ==/UserScript== (function() { 'use strict'; const mname = ".list-item.reply-wrap:not(.a)"; //寻找相应属性的div setInterval(() => { if (document.querySelector(mname)) { const qwqwqwq=document.querySelectorAll(".reply.btn-hover:not(.b)"); //排除已被 qw class包含的元素 for(var iii=0;iii<qwqwqwq.length;iii++){ //设置 回复 按钮样式 qwqwqwq[iii].setAttribute("style","height:16px;padding-top:2px !important;padding-bottom:2px !important"); qwqwqwq[iii].classList.add("b"); } for (const i of document.querySelectorAll(mname)) { i.classList.add("a"); const xhr = new XMLHttpRequest(); //xhr.open("get", `//api.bilibili.com/x/v2/reply/detail?type=12&oid=1&root=${i.attributes["data-id"].value}`); //另一个api接口,可用 xhr.open("get", `//api.bilibili.com/x/v2/reply/info?type=12&oid=1&rpid=${i.attributes["data-id"].value}`); xhr.responseType = "json"; xhr.withCredentials = true; xhr.send(); const qwq = i.querySelector(".info"); xhr.onload = () => { const data = xhr.response.data; const qwqwq = document.createElement("span"); qwqwq.setAttribute("style","height:16px;margin-right:14px"); qwqwq.innerHTML = `#${data.floor}`; qwq.appendChild(qwqwq); //加在div info最后 } } } }, 2000); })();