OhYE!

Hide users in Tapuz

当前为 2015-01-02 提交的版本,查看 最新版本

// ==UserScript==
// @name        OhYE!
// @namespace   imdfl1
// @description Hide users in Tapuz
// @include     http://www.tapuz.co.il/forums2008/*forumid=200*
// @version     1
// @grant       none
// ==/UserScript==
 
(function() {
    function toggleIt(i, div) {
		var parent = jQuery(div).parents(".msg-title")[0];
		if (parent) {
            var $p = jQuery(parent),
				height = $p.attr("data-orig-height");
            if (height) {
            	$p.css("height", "");   
                $p.attr("data-orig-height", "");
            }
            else {
                $p.attr("data-orig-height", $p.height());
                $p.css("height", "1px");
            }
		}
	}
	var divs = jQuery("div#user_1615810");
    window.console.log("found ", divs.length," comments");
    document.body.addEventListener("keydown", function(event) {
        if (event.keyCode === 89 && event.altKey && event.ctrlKey) {
            divs.each(toggleIt);
        }
    });
	divs.each(toggleIt);

}());