-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBiliLiveClean.js
29 lines (28 loc) · 1.01 KB
/
BiliLiveClean.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name 去除B站直播底部礼物栏
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 去除B站直播网页全屏后的底部礼物栏
// @author HideRua
// @match https://live.bilibili.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
// 等待页面加载完成
window.onload = function() {
var timer = setInterval(function() {
var bottomBar = document.getElementById("web-player__bottom-bar__container");
if (bottomBar) {
clearInterval(timer);
bottomBar.remove();
var videos = document.getElementsByTagName("video");
for (var i = 0; i < videos.length; i++) {
videos[i].style.height = "100%";
}
}
}, 500); // 定时器间隔为0.5s,单位是毫秒
}
// Your code here...
})();