Bilibili selectable danmu comments

Learning Chinese blazing fastly.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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";
        })
    }
})();