Scroll To Video Top

0px on top

目前為 2021-07-21 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Scroll To Video Top
// @namespace    https://space.bilibili.com/6727237
// @version      1.5
// @description:zh-cn 0px on top
// @author       尺子上的彩虹
// @match        https://www.bilibili.com/video/*
// @match        https://www.bilibili.com/bangumi/play/*
// @grant        none
// @description 0px on top
// ==/UserScript==

var windyfunction=function() {
    if (document.location.href.match('bangumi')){
        document.getElementById("app").style.marginTop="20px";
        window.scrollTo(0,76)
    } else if (document.location.href.match('video')) {
        window.scrollTo(0,152);
    } else if (document.location.href.match('play')) {
        window.scrollTo(0,76)
    }};
setInterval(
    function (){
        if (document.location.href.match('bangumi')){
            document.getElementsByClassName('squirtle-widescreen-wrap squirtle-block-wrap')[0].addEventListener('click',windyfunction);
            document.getElementsByClassName('bpx-player-video-inputbar')[0].style.minWidth="100%";
            document.getElementsByClassName('bpx-player-video-inputbar')[0].style.width="100%";
            document.getElementsByClassName('squirtle-sendbar-wrap squirtle-block-wrap')[0].style.minWidth="900px";
        } else if (document.location.href.match('video')) {
            document.getElementsByClassName('bilibili-player-video-inputbar')[0].style.maxWidth="100%";
            document.getElementsByClassName('bilibili-player-video-inputbar')[0].style.width="100%";
            document.getElementsByClassName('bilibili-player-video-btn bilibili-player-video-btn-widescreen')[0].addEventListener('click',windyfunction);
        }
    },
    500);