Greasy Fork is available in English.

哔哩哔哩默认网页全屏

Bilibili默认全屏(帮助点击全屏按钮)

// ==UserScript==
// @name         哔哩哔哩默认网页全屏
// @namespace    https://greasyfork.org/zh-CN/users/135090
// @version      2020.11.03
// @icon         https://www.bilibili.com/favicon.ico
// @description  Bilibili默认全屏(帮助点击全屏按钮)
// @author       Fork From 404862;zwb83925462修改自用
// @match        *://www.bilibili.com/video/*
// @match        *://www.bilibili.com/*/play/*
// @match        *://www.bilibili.com/watchlater/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==
(function() {
    'use strict';
    var counter=0;
    let iscensor = true;
    let url = geturl();//获取刚加载脚本时的Url
    setTimeout(censor,1000);
    go();
    function go(){
        counter++;
        if(document.querySelector(".bilibili-player-video-btn.bilibili-player-video-web-fullscreen")&&document.querySelector(".bilibili-player-video-btn.bilibili-player-video-web-fullscreen").offsetHeight>0){
            if(document.querySelector("#bangumi_player")){
                scrollTo(0,document.querySelector("#bangumi_player").offsetTop);
                if(document.querySelector(".bilibili-player-video-btn.bilibili-player-video-btn-widescreen").innerHTML.indexOf("退出宽屏")!=-1 ||
                   document.querySelector(".bilibili-player-video-btn.bilibili-player-video-web-fullscreen").innerHTML.indexOf("退出网页全屏")!=-1 ||
                   document.querySelector(".bilibili-player-video-btn.bilibili-player-video-btn-fullscreen").innerHTML.indexOf("退出全屏")!=-1
                  ){iscensor = true; return;}
                setTimeout(function(){document.querySelector(".bilibili-player-video-btn.bilibili-player-video-web-fullscreen").click();iscensor = false;},500);
            }
            else{
                if(document.querySelector(".bilibili-player-video-btn.bilibili-player-video-web-fullscreen:not(.closed)")!=null)
                    setTimeout(function(){document.querySelector(".bilibili-player-video-btn.bilibili-player-video-web-fullscreen:not(.closed)").click();iscensor = false;},500);
            }
        }
        else{
            if(counter>30){
                iscensor = false;
                return;
            }
            setTimeout(go,500);
        }
    }

    function censor(){
        if(!iscensor&&url!=geturl()){
            counter=0;
            go();
            url = geturl();
        }
        setTimeout(censor,2000);
    }

    function geturl(){
        return window.location.href;
    }

})();