// ==UserScript== // @name bilibili强制使用网宿CDN // @version 0.1 // @description bilibili强制使用网宿CDN,北邮校园网可节省流量 // @author xiaomingtx // @include *://*bilibili.com* // @exlucde *://live.bilibili.com* // @require https://unpkg.com/xhook@1.4.7/dist/xhook.min.js // @require http://code.jquery.com/jquery-3.3.1.slim.min.js // @grant none // @run-at document-start // ==/UserScript== var timeOutInfo; var timerSetupInfo; var wscndError = false; //修改提示框信息 function changeInfo(info){ var wscdnswitch_info_p = $("#wscdnswitch_info_p"); wscdnswitch_info_p.text(info); return wscdnswitch_info_p.length>0; } //初始化提示框 function setupInfo(){ clearInterval(timerSetupInfo); if($("#wscdnswitch_info").length>0){ return ; } timerSetupInfo = setInterval(function(){ if($("#wscdnswitch_info").length>0){ return; } var player = $("video"); //找到video标签 if(player.length>0){ //在video标签前面加入提示框 player.before("
网宿CDN切换已开启