Wrap Texts in a Comment List

Nico Live

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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

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

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

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name            Wrap Texts in a Comment List
// @name:ja         一覧の長文コメントを折り返す
// @namespace       https://greasyfork.org/users/19523
// @version         0.3
// @description     Nico Live
// @description:ja  ニコニコ生放送でコメント一覧のコメントをコメント番号にまで折り返して表示する
// @match           https://live2.nicovideo.jp/watch/*
// @grant           none
// ==/UserScript==

(function () {
  var style = document.createElement('style');
  style.type = 'text/css';
  style.appendChild(document.createTextNode('' +
    '.___comment-text___2cPL0 {' +
      'white-space: initial;' +
      'display: initial;' +
    '}' +
    '.___table-row-base___S4V65, .___table-row___27ghe {' +
      'display: table;' +
      'width: 99%;' +
    '}' +
    '.___table-cell___3E0rV {' +
      'width: 99% !important;' +
      'display: inherit;' +
    '}' +
    '.___comment-number___2Qws3 {' +
      'display: initial;' +
    '}' +
    ''));
  document.getElementsByTagName('head')[0].appendChild(style);
})();