哔哩哔哩(bilibili.com)跳过片头2

片头开始播放时,按 J 键跳过片头,键码74

  1. // ==UserScript==
  2. // @name 哔哩哔哩(bilibili.com)跳过片头2
  3. // @namespace http://tampermonkey.net/
  4. // @version 2.0
  5. // @description 片头开始播放时,按 J 键跳过片头,键码74
  6. // @author 原作者:zhpjy,已被修改过
  7. // @modified flaribbit
  8. // @match *://www.bilibili.com/*
  9. // @icon https://www.bilibili.com/favicon.ico
  10. // @grant none
  11. // @license WTFPL
  12. // ==/UserScript==
  13.  
  14. var keyCode = 74; // J 键的键码
  15. var JumpTime = 85; //跳跃长度(秒)
  16.  
  17. var allowed = true;
  18. document.onkeydown=function(event) {
  19. if (event.repeat != undefined) {
  20. allowed = !event.repeat;
  21. }
  22. if(!allowed)return;
  23. allowed=false;
  24. if(event.keyCode == keyCode) {
  25. player.seek(player.getCurrentTime()+JumpTime);
  26. }
  27. };
  28.  
  29. document.onkeyup(function(e) { allowed = true; });
  30. document.onfocus(function(e) { allowed = true; });

QingJ © 2025

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