自动开启网页全屏

网页加载完4秒后,启动网页全屏

< Feedback on 自动开启网页全屏

Question/comment

§
Posted: 2018-03-27

关于如何修复B站视频自动网页全屏的建议

// @require https://cdn.jsdelivr.net/jquery/1.7.2/jquery.min.js
删除jQuery的require即可。测试0.3版本可用。

§
Posted: 2018-03-27

以下是我魔改的代码。。随便玩玩嘿嘿

var videoSite = window.location.href;
var bilibili = /www\.bilibili/i;
var bililive = /live\.bilibili\.com/i;
(function() {
recheck();
})();
function recheck(){ doEvents();
var player=document.getElementsByTagName('video');
if(bilibili.test(videoSite) && player[0]){
player[0].playbackRate=1.3;
start();
return;
}
setTimeout(recheck,1000);
}
function start(){
window.setTimeout(function(){
document.getElementsByName('web_fullscreen')[1].click();
}, 1000);
}
function doEvents(){tip('doEvents');}
function tip(e){console.log(e);}

Post reply

Sign in to post a reply.