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.9
  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. for(var v=0;v<document.getElementsByClassName('ep-item').length;v++){
  23. document.getElementsByClassName('ep-item')[v].addEventListener('click',windyfunction);
  24. }
  25. document.getElementsByClassName('bilibili-player-video-inputbar')[0].style.width="100%";
  26. document.getElementsByClassName('bilibili-player-video-inputbar')[0].style.maxWidth="100%";
  27. document.getElementsByClassName('bilibili-player-video-sendbar')[0].style.maxWidth="100%";
  28. },
  29. 5000);