您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在页面标题或者标签栏显示比赛的实时比分
当前为
// ==UserScript== // @name 直播吧NBA直播标题栏比分 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 在页面标题或者标签栏显示比赛的实时比分 // @author You // @match https://www.zhibo8.cc/zhibo/nba/*.htm // @grant none // ==/UserScript== (function() { 'use strict'; var ttlIntrvl = setInterval(function() { showScoreTitle(); }, 3000); showScoreTitle(); })(); function showScoreTitle() { const vtm = document.querySelectorAll('.bf_table .visit_team_name a'); if (vtm.length < 1) { console.warn("no visit team"); return; } const vsc = document.querySelectorAll('.bf_top .bf_box.tmtop .time_score .visit_score'); if (vtm.length < 1) { console.warn("no visit score"); return; } const htm = document.querySelectorAll('.bf_table .home_team_name a'); if (vtm.length < 1) { console.warn("no host team"); return; } const hsc = document.querySelectorAll('.bf_top .bf_box.tmtop .time_score .host_score'); if (vtm.length < 1) { console.warn("no host score"); return; } document.title = `${vtm[0].innerText} ${vsc[0].innerText} ➲ ${htm[0].innerText} ${hsc[0].innerText}`; }