Greasy Fork

B站 UP主 弹幕管理

跳转到指定时间轴位置

// ==UserScript==
// @name         B站 UP主 弹幕管理
// @namespace    https://space.bilibili.com/15516023
// @version      1.0
// @description  跳转到指定时间轴位置
// @author       You
// @match        https://member.bilibili.com/platform/inter-active/danmu
// @icon         https://www.google.com/s2/favicons?domain=bilibili.com
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    setTimeout(() => {
        let links = document.querySelectorAll('a.danmu-content')
        let times = document.querySelectorAll('td:nth-child(3) .colum-content')
        links.forEach((link, index) => {
            let [s=0, m=0, h=0] = times[index].textContent.split(':').reverse()
            link.href = link.href + `?t=${h}h${m}m${s}s`
        })
    }, 2000)
    // Your code here...
})();