Scroll To Video Top

0px on top

  1. // ==UserScript==
  2. // @name Scroll To Video Top
  3. // @namespace https://space.bilibili.com/6727237
  4. // @version 1.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. document.getElementById("app").style.marginTop="20px";
  16. window.scrollTo(0,76);
  17. } else if (document.location.href.match('video')) {
  18. document.getElementById('viewbox_report').style.maxHeight="108px";
  19. window.scrollTo(0,106);
  20. } else if (document.location.href.match('play')) {
  21. window.scrollTo(0,76);
  22. }};
  23. setInterval(
  24. function (){
  25. if (document.location.href.match('bangumi')){
  26. document.getElementsByClassName('squirtle-widescreen-wrap squirtle-block-wrap')[0].addEventListener('click',windyfunction);
  27. document.getElementsByClassName('bpx-player-video-inputbar')[0].style.minWidth="100%";
  28. document.getElementsByClassName('bpx-player-video-inputbar')[0].style.width="100%";
  29. document.getElementsByClassName('squirtle-sendbar-wrap squirtle-block-wrap')[0].style.minWidth="900px";
  30. } else if (document.location.href.match('video')) {
  31. document.getElementsByClassName('bilibili-player-video-inputbar')[0].style.maxWidth="100%";
  32. document.getElementsByClassName('bilibili-player-video-inputbar')[0].style.width="100%";
  33. document.getElementsByClassName('bilibili-player-video-btn bilibili-player-video-btn-widescreen')[0].addEventListener('click',windyfunction);
  34. };
  35. document.getElementsByClassName('video-sections-content-list')[0].style.height='500px';
  36. document.getElementsByClassName('video-sections-content-list')[0].style.maxHeight='none';
  37. },
  38. 500);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址