Wrap Texts in a Comment List

Nico Live

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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.

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

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