您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
定制
当前为
// ==UserScript== // @name 子非鱼 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 定制 // @author xiaolin // @match https://www.bilibili.com/video/* // @icon https://static.hdslb.com/images/favicon.ico // @grant GM_xmlhttpRequest // @license MIT // @run-at document-end // ==/UserScript== (function() { 'use strict'; /*自定义成分: 格式: 名称_字体颜色代码_快乐判定词_愤怒判定词 举例: 名称 原神 字体颜色代码 01ada0 (6位颜色代码) 乐子人判定词 猴吧&猴猴&吧友(可加入数个判定词,判定词用&分隔) 魔怔人判定词 原批&原U(可加入数个判定词,判定词用&分隔) 范例: 原神_01ada0_猴吧&猴猴&吧友_原批&原U 同时检索多个成分: 也很简单,只需要用|号分隔再在后面按照同样格式填写即可 范例:原神_01ada0_猴吧&猴猴&吧友_原批&原U|明日方舟_ada101_原批&原U_粥粥&舟畜 */ //↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓此处填写成分↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ const zidingyichengfen = "原神_01ada0_猴吧&猴猴&吧友_原批&原U|明日方舟_ada101_原批&原U_粥粥&舟畜" //↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ //自定义字体颜色,与上方tag一一对应,无颜色时默认黑色(用|隔开每个tag,注意检查颜色代码是否正确,否则会出现无法显示状况) let jiance = setInterval(()=>{ let blog = "https://api.bilibili.com/x/polymer/web-dynamic/v1/feed/space?&host_mid=" const xinbanben = document.getElementsByClassName('item goback').length != 0 // 判断是不是新版 let commentlist = ""; if(xinbanben) commentlist = document.getElementsByClassName("user-name") else commentlist = document.getElementsByClassName("user") if (commentlist.length != 0){ clearInterval(jiance) commentlist.forEach(c => { let pid = "" if(xinbanben) pid = c.dataset["userId"] else pid = c.children[0]["href"].replace(/[^\d]/g, "") let blogurl = blog + pid GM_xmlhttpRequest({ method: "get", url: blogurl, data: "", headers: { "user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" }, onload: function(res){ if(res.status === 200){ let st = JSON.stringify(JSON.parse(res.response).data) let zongjie = "" let zidingyichengfen_ = zidingyichengfen.split("|") for(let i = 0; i < zidingyichengfen_.length; i++) { let chengfen = zidingyichengfen_[i].split("_") let mingcheng = chengfen[0] if(chengfen.length==4){ let mingcheng = chengfen[0] let zitiyanse = chengfen[1] let lezi = chengfen[2].split("&") let mozheng = chengfen[3].split("&") if(st.includes(mingcheng)){ let leziLV = 0 let mozhengLV = 0 for(let l = 0; l < lezi.length; l++) { if(st.includes(lezi[l])){ leziLV++; } } for(let m = 0; m < mozheng.length; m++) { if(st.includes(mozheng[m])){ mozhengLV++; } } if(zitiyanse.length == 6) zongjie += "(<b style='color: #"+ zitiyanse +"'>" + mingcheng else zongjie += "(" + mingcheng; if(leziLV>0) zongjie+="-快乐LV"+leziLV; if(mozhengLV>0) zongjie+="-愤怒LV"+mozhengLV; if(st.includes("互动抽奖 #"+ mingcheng +"# ")){ zongjie +="*抽奖*" } zongjie +="</b>)" } } } c.innerHTML += zongjie; } }, }); }); } },2000) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址