twitcasting_collapse_comment

ツイキャスのコメント欄を非表示にする。

Tính đến 23-01-2016. Xem phiên bản mới nhất.

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

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

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        twitcasting_collapse_comment
// @namespace   http://catherine.v0cyc1pp.com/twitcasting_collapse_comment.user.js
// @include     http://twitcasting.tv/*
// @version     1.1
// @require     http://code.jquery.com/jquery-2.1.4.min.js
// @grant       none
// @run-at      document-end
// @description ツイキャスのコメント欄を非表示にする。
// ==/UserScript==

this.$ = this.jQuery = jQuery.noConflict(true);


//console.log("twitcasting_collapse_comment start");

this.$ = this.jQuery = jQuery.noConflict(true);


function main() {
	var attr = $("div#navibox").attr("abcde");
	if( typeof attr !== 'undefined' && attr !== false ){
	} else {
		$("div#navibox").attr("abcde","twitcasting_collapse_comment");
		$("div#navibox").before('<div margin-top: 0px; margin-bottom: 0px;" width="320" frameborder="0" height="420" onclick="obj=document.getElementById(\'navibox\').style; obj.display=(obj.display==\'none\')?\'block\':\'none\';"><center><a style="cursor:pointer;">コメントエリア (クリックで展開)</a></center></div>');
		$("div#navibox").attr("style","display:none;clear:both;");
	}
};


var observer = new MutationObserver(function(mutations) {
    observer.disconnect();
    main();
    observer.observe( document, config);
});
 
var config = { attributes: false, childList: true, characterData: false, subtree:true }
 
observer.observe( document, config);