Zoom錄像快進跳轉

Add buttons for skipping 5s or backing 5s while watching zoom recordings

目前為 2021-10-02 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Zoom Recording skipping function
// @name:zh-TW   Zoom錄像快進跳轉
// @name:zh-CN   Zoom录像快进跳转
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  Add buttons for skipping 5s or backing 5s while watching zoom recordings
// @description:zh-tw 添加跳轉到前後5秒的按鈕
// @description:zh-cn 添加跳转到前后5秒的按钮
// @author       You
// @match        *.zoom.us/rec/play/*
// @icon         https://www.google.com/s2/favicons?domain=zoom.us
// @grant        none
// ==/UserScript==

(function() {
    'use strict';



    function addBtn(){
        const video = document.getElementsByTagName("video")[0];
        const bar = document.getElementsByClassName("vjs-extend-control")[0];

        const back5s = document.createElement("div");
        const go5s = document.createElement("div");


        back5s.innerHTML = "<5s";
        go5s.innerHTML = ">5s";

        back5s.style["margin-right"] = "10px";
        go5s.style["margin-right"] = "10px";

        back5s.style["cursor"] = "pointer";
        go5s.style["cursor"] = "pointer";



        bar.prepend(go5s);
        bar.prepend(back5s);
        
        go5s.onclick = () => {
            video.currentTime += 5;
        }

        back5s.onclick = () => {
            video.currentTime -= 5;
        }

    }

    function delayabit(){
        setTimeout(()=>{
            addBtn();
        }, 1000);
    }

    window.addEventListener("load", delayabit, false);

})();