您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
搜索栏鼠标悬停提示
当前为
// ==UserScript== // @name B站搜索栏 - 鼠标悬停提示 // @namespace mscststs // @version 0.5 // @license ISC // @description 搜索栏鼠标悬停提示 // @author mscststs // @match https://*.bilibili.com/* // @icon https://www.bilibili.com/favicon.ico // @require https://gf.qytechs.cn/scripts/38220-mscststs-tools/code/MSCSTSTS-TOOLS.js?version=713767 // @run-at document-body // @grant none // ==/UserScript== (function() { 'use strict'; StartObserveTitle(); async function StartObserveTitle(){ function trendingTitle(trendingElements) { for (var i = 0; i < trendingElements.length; i++) { var trendingContent = trendingElements[i]; trendingContent.setAttribute("title", trendingContent.innerHTML); } } // 设置悬停信息 function titleText(itemElements, itemText) { if(itemElements[0].title == "") { for (var i = 0; i < itemElements.length; i++) { var titleContent = itemElements[i]; var text = itemText[i]; titleContent.setAttribute("title", text.innerHTML); } } } // 设置搜索框点击事件 function onfocusTitle(searchContent) { searchContent.onfocus = async function() { await mscststs.wait(".histories .history-item"); var historyElements = document.querySelectorAll(".histories .history-item"); var historyText = document.querySelectorAll(".histories .history-item .history-text"); titleText(historyElements, historyText); await mscststs.wait(".trending-item .trending-text"); var trendingElements = document.querySelectorAll(".trending-item"); var trendingText = document.querySelectorAll(".trending-item .trending-text"); titleText(trendingElements, trendingText); } } var url = document.URL; if(url.startsWith("https://search.bilibili.com/")) { await mscststs.wait(".search-wrap .search-block .input-wrap input"); var searchContent = document.querySelector(".search-wrap .search-block .input-wrap input"); onfocusTitle(searchContent); } else if(url.startsWith("https://space.bilibili.com/") || url.startsWith("https://www.bilibili.com/v/") || url.startsWith("https://www.bilibili.com/video/")) { await mscststs.wait(".bili-header .center-search-container .center-search__bar .nav-search-content .nav-search-input"); var searchContent = document.querySelector(".bili-header .center-search-container .center-search__bar .nav-search-content .nav-search-input"); onfocusTitle(searchContent); } else { await mscststs.wait(".international-header .nav-search .nav-search-keyword"); var searchContent = document.querySelector(".international-header .nav-search .nav-search-keyword"); onfocusTitle(searchContent); } /*await mscststs.wait(".bili-header .center-search-container .center-search__bar .nav-search-content .nav-search-input"); var searchContent = document.querySelector(".bili-header .center-search-container .center-search__bar .nav-search-content .nav-search-input"); searchContent.onfocus = async function() { await mscststs.wait(".histories .history-item"); var historyElements = document.querySelectorAll(".histories .history-item"); var historyText = document.querySelectorAll(".histories .history-item .history-text"); titleText(historyElements, historyText); await mscststs.wait(".trending-item .trending-text"); var trendingElements = document.querySelectorAll(".trending-item"); var trendingText = document.querySelectorAll(".trending-item .trending-text"); titleText(trendingElements, trendingText); }*/ } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址