Greasy Fork is available in English.
整体调整css样式,直播播放器调整为720p,页面布局,我的环境:win10小任务栏,Chrome带书签栏,电脑分辨率:1920*1080
当前为
// ==UserScript==
// @name b站直播播放器优化
// @namespace http://tampermonkey.net/
// @version 1.1.1
// @description 整体调整css样式,直播播放器调整为720p,页面布局,我的环境:win10小任务栏,Chrome带书签栏,电脑分辨率:1920*1080
// @author aotmd
// @match https://live.bilibili.com/*
// @grant none
// ==/UserScript==
(function() {
//1.1更新内容,当发现有活动主题时,跳转到原始页面
var Removeactivetopics=function Removeactivetopics(){
var dot=document.getElementsByTagName("iframe");
var regex=/live\.bilibili\.com\/blanc\/.+?liteVersion=true/;
for(var i=0;i<dot.length;i++){
if(regex.test(dot[i].src)){
window.location.href=dot[i].src;
}
}
}
setTimeout(Removeactivetopics,0);
//------------
window.onload=function (){//自动下拉的定位
setTimeout(function(){
window.scrollTo(0,62);
},5000);
}
function addStyle(rules) {
var styleElement = document.createElement('style');
styleElement.type = 'text/css';
document.getElementsByTagName('head')[0].appendChild(styleElement);
styleElement.appendChild(document.createTextNode(rules));
}
addStyle('element.style {transform: translate(78px, 53px);}');
addStyle('.live-player-ctnr.minimal {width: 1280px; height: 720px;}');
addStyle('#activity-welcome-area-vm{display:none;}');
addStyle('.side-bar-cntr.eye-protector-processed {display: none!important;');
addStyle(`
.live-room-app .app-content .app-body .player-and-aside-area .aside-area{
right: -150px!important;
}
#aside-area-vm {width: 400px!important;
}
.live-room-app .app-content .app-body .player-and-aside-area .left-container{
width: calc(100% - 212px - 12px);
position: relative!important;
right: 50px!important;
}
/*下拉框调整*/
.guard-rank-cntr .rank-cntr .btn-box .guard-daily-record .board-icon+.daily-text[data-v-5bf2f9f0]{
margin-top: -63px!important;
}
button.bl-button.live-skin-highlight-text.live-skin-separate-area-hover.bl-button--primary.bl-button--size{
left: -35px!important;
top: -34px!important;
}
.guard-daily-record.live-skin-main-text{
margin-left:52px;
}
span.daily-record-title.dp-i-block.t-center.m-auto.p-absolute.live-skin-main-text.live-skin-separate-area{
margin-left:141px;
}
.guard-rank-cntr .rank-cntr .btn-box .l-line[data-v-5bf2f9f0], .guard-rank-cntr .rank-cntr .btn-box .r-line[data-v-5bf2f9f0]{
width:200px!important;}
.guard-rank-cntr .rank-cntr .btn-box .guard-daily-record .board-icon[data-v-5bf2f9f0]{
top: -18px!important;
left: -277px!important;
}
.tabs .tab-list[data-v-ccea3596]{
text-align: center;
}
#rank-list-ctnr-box{width: 400px;
}
.chat-history-panel .chat-history-list .chat-item.danmaku-item{
line-height: unset!important;
}
/*调整完毕*/
/*2233按钮调整*/
.avatar-btn.pointer.a-scale-in-ease.model-22{
left: 150px;
position: relative;
}
.avatar-btn.pointer.a-scale-in-ease.model-33{
left: 150px;
position: relative;
}
.live-player-ctnr.minimal{
border-radius: 0px!important;
}
.live-player-ctnr.minimal:before{
width: auto!important;
}
.room-bg.p-fixed{
max-height: 1080px!important;
}
`);
//优化辣条提示,不导致聊天区域上升
addStyle(`
div#penury-gift-msg{
max-height: 26px;
bottom: 18px;
}
div#chat-history-list{
height:100%
}
`);
})();