Zoom录像快进跳转10秒变5秒

添加跳转到前后5秒的按钮

  1. // ==UserScript==
  2. // @name Make Zoom skipping function skip 5s only
  3. // @name:zh-TW Zoom錄像快進跳轉10秒變5秒
  4. // @name:zh-CN Zoom录像快进跳转10秒变5秒
  5. // @namespace http://tampermonkey.net/
  6. // @version 2.3
  7. // @description Add buttons for skipping 5s or backing 5s while watching zoom recordings
  8. // @description:zh-tw 添加跳轉到前後5秒的按鈕
  9. // @description:zh-cn 添加跳转到前后5秒的按钮
  10. // @author You
  11. // @match *.zoom.us/rec/play/*
  12. // @icon https://www.google.com/s2/favicons?domain=zoom.us
  13. // @grant none
  14. // @license MIT
  15. // ==/UserScript==
  16.  
  17. (function() {
  18. 'use strict';
  19.  
  20. const step = 5
  21.  
  22. function tenSto5S(){
  23. document.getElementsByClassName("vjs-step-wrapper")[0].children[1].innerHTML = "5 second"
  24. }
  25.  
  26.  
  27. function addBtn(){
  28. const video = document.getElementsByTagName("video")[0];
  29. const bar = document.getElementsByClassName("vjs-extend-control")[0];
  30.  
  31. const back5s = document.createElement("div");
  32. const go5s = document.createElement("div");
  33.  
  34.  
  35. back5s.innerHTML = "<5s";
  36. go5s.innerHTML = ">5s";
  37.  
  38. back5s.style["margin-right"] = "10px";
  39. go5s.style["margin-right"] = "10px";
  40.  
  41. back5s.style["cursor"] = "pointer";
  42. go5s.style["cursor"] = "pointer";
  43.  
  44.  
  45.  
  46. bar.prepend(go5s);
  47. bar.prepend(back5s);
  48. go5s.onclick = () => {
  49. video.currentTime += 5;
  50. }
  51.  
  52. back5s.onclick = () => {
  53. video.currentTime -= 5;
  54. }
  55.  
  56. }
  57.  
  58. function delayabit(){ // pending... maybe using try catch
  59. setTimeout(()=>{
  60. addBtn();
  61. tenSto5S();
  62. }, 5000);
  63. }
  64.  
  65. window.addEventListener("load", delayabit, false);
  66. document.onkeydown = (event) => {
  67. var theVideo = document.getElementsByTagName('video')[0];
  68. event = event || window.event;
  69. if(event.keyCode == '37'){
  70. event.preventDefault();
  71. theVideo.currentTime += 5
  72. }
  73. else if(event.keyCode == '39'){
  74. event.preventDefault();
  75. theVideo.currentTime -= 5
  76. }
  77. /* else if(event.keyCode == '32'){
  78. console.log("space bar pressed")
  79. //event.preventDefault();
  80. if(theVideo.paused){
  81. theVideo.play()
  82. }
  83. else{
  84. theVideo.pause()
  85. }
  86. } */
  87. }
  88.  
  89.  
  90. })();

QingJ © 2025

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