Greasy Fork is available in English.
try to take over the world!
当前为
// ==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...
})();