效果:

代码:
// ==UserScript==
// @name New script - baidu.com
// @namespace Violentmonkey Scripts
// @match https://www.baidu.com/ping
// @grant none
// @version 1.0
// @author -
// @description 2021/8/10 上午11:39:09
// ==/UserScript==
var streamName='1000shibusdt';
var dy='{"method":"SUBSCRIBE","params":["'+streamName+'@aggTrade"],"id":1}';
var wss=new WebSocket("wss://fstream.binance.com/ws/"+streamName);
wss.onmessage=function(data){
var b=JSON.parse(data.data);
window.document.title='ping: '+b.p+' 秒';
}
// setTimeout("wss.send(dy)",1000)
wss.onopen=function(){
wss.send(dy)
}
setTimeout("location.reload()",600000);