Bilibili selectable danmu comments

Learning Chinese blazing fastly.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Bilibili selectable danmu comments
// @name:ja      Bilibili選択可能弾幕コメント
// @license      BSD 3-Clause License 

// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Learning Chinese blazing fastly.
// @description:ja  Learning Chinese blazing fastly.
// @author       You
// @match        https://www.bilibili.com/video/*

// @require      https://unpkg.com/[email protected]/dist/url-parse.js

// @run-at       document-idle
// @noframes
// ==/UserScript==

(async function()
{
    const sleep = m => new Promise(r => setTimeout(r, m));
    await sleep(200);
    while (true) {
        await sleep(200); // mseconds
        document.querySelector('div[class="bilibili-player-video-danmaku"]').style.zIndex = 69;
        document.querySelectorAll('div[class="b-danmaku"]').forEach(a => {
            a.style.userSelect = "text";
            a.style.pointerEvents = "all";
            a.style.cursor = "text";
        })
    }
})();