您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Show titles according to BVs.
当前为
// ==UserScript== // @name 枝江反诈骗 // @namespace https://space.bilibili.com/2649561 // @version 0.4 // @description Show titles according to BVs. // @author Sela // @match *.bilibili.com/* // @icon https://tse1-mm.cn.bing.net/th/id/OIP-C.D0J8yk3gtsBUFSYLpv90YwHaHa?pid=ImgDet&rs=1 // @grant none // @require http://code.jquery.com/jquery-3.x-git.min.js /* globals jQuery, $, waitForKeyElements */ // ==/UserScript== (function() { var reg = /b23.tv\/[0-9a-zA-Z]{6}/; var mybutton,beasetag; mybutton = document.createElement("div"); beasetag = document.querySelector("body"); beasetag.appendChild(mybutton); mybutton.innerHTML = "反诈骗"; mybutton.style = "position:fixed;bottom:15px;right:15px;width:60px;height:60px;background:white;opacity:0.85;color:pink;text-align:center;line-height:60px;cursor:pointer;"; mybutton.onclick = function(){ //运行 $('a').each(function(){ var temp = $(this).text(); if(reg.test(temp)){ var href = reg.exec($(this).text()); var title = setTitle(href); if(title.length > 1){ $(this).text(title); } } }); } function setTitle(href){ var u = trueUrl(href); var title = ''; $.ajax({url:u, async:false, success:function(result){ title = getTitle(result); }}); return title; } function getTitle(t){ var reg = /data-vue-meta="true">(.+)_哔哩哔哩_bilibili<\/title>/; if (reg.test(t)){ var title = reg.exec(t); return title[1]; } } function trueUrl(href){ //短网址还原 //接口来自https://res.abeim.cn/api/dwz_longurl/doc.php var tool = 'https://res.abeim.cn/api-dwz_longurl?url=http://'; var reg = /long_url":"(.+)"\}/; var u = ''; $.ajax({url:tool+href, async:false, success:function(result){ var text = JSON.stringify(result); var temp = reg.exec(text)[1]; u = temp.replace('//m.','//www.'); }}) return u; } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址