Scroll To Video Top

0px on top

当前为 2020-11-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Scroll To Video Top
  3. // @namespace https://space.bilibili.com/6727237
  4. // @version 0.8
  5. // @description:zh-cn 0px on top
  6. // @author 尺子上的彩虹
  7. // @match https://www.bilibili.com/video/*
  8. // @match https://www.bilibili.com/bangumi/play/*
  9. // @grant none
  10. // @description 0px on top
  11. // ==/UserScript==
  12.  
  13. var windyfunction=function() {
  14. if (document.location.href.match('bangumi')){
  15. window.scrollTo(0,75)
  16. } else if (document.location.href.match('video')) {
  17. window.scrollTo(0,151)
  18. }};
  19. setInterval(
  20. function (){
  21. document.getElementsByClassName('bilibili-player-video-btn bilibili-player-video-btn-widescreen')[0].addEventListener('click',windyfunction);
  22. document.getElementsByClassName('ep-item')[0].addEventListener('click',windyfunction);
  23. document.getElementsByClassName('bilibili-player-video-inputbar')[0].style.width="100%";
  24. document.getElementsByClassName('bilibili-player-video-inputbar')[0].style.maxWidth="100%";
  25. document.getElementsByClassName('bilibili-player-video-sendbar')[0].style.maxWidth="100%";
  26. },
  27. 5000);