twitcasting_collapse_comment

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

Από την 23/01/2016. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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