Bilibili selectable danmu comments

Learning Chinese blazing fastly.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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";
        })
    }
})();