ac21542826跳转脚本

try to take over the world!

目前为 2021-01-07 提交的版本。查看 最新版本

// ==UserScript==
// @name         ac21542826跳转脚本
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.acfun.cn/v/ac21542826
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function init() {
        const nodes = document.querySelectorAll('u')
        for(let item of nodes) {
            let html = item.innerHTML
            if (html.indexOf(':') !== -1) {
                let time = parseInt(html.split(':')[0])*60 + parseInt(html.split(':')[1])
                console.log(time)
                item.addEventListener('click', ()=> {
                    document.querySelector('video').currentTime = time
                })
            }
        }
    }
    let interval = setInterval(()=>{
        if (document.querySelector('.ac-comment-list')) {
            clearInterval(interval)
            init()
        }
    }, 1000)
    // Your code here...
    })();

QingJ © 2025

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