WoWI Addon Tabs

tab control for author addons

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

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

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name       WoWI Addon Tabs
// @namespace  digital-utopia.org
// @version    0.2
// @description  tab control for author addons
// @match      http://www.wowinterface.com/downloads/author*
// @copyright  2014, Digital_Utopia
// @grant unsafeWindow
// ==/UserScript==
var $ = unsafeWindow.jQuery;

var addons = $(".box-title:eq(0)").parent();
var comments = $(".box-title:eq(1)").parent();
$(comments).css("visibility","hidden");
handleClick=function(tar)
{
    if($(tar).parent().attr("class")!="current")
    {
     	$(".current").attr("class","nocurr");

        $(tar).parent().attr("class","current");
		if($(tar).attr("id")=="Addons_tab")
        {
            $(comments).css("visibility","hidden");
            $(addons).css("display","block");
        }else{
            $(comments).css("visibility","visible");
            $(addons).css("display","none");
        }
        
        
    }
}
var parent = $("table:eq(1)",".clearfix").parent();
$(".vbmenu_popup",parent).after("<div class='tabwrapper' id='tabwrapper'><div class='boxtablist' style='background-color:#181818;'></div></div>");
$(".boxtablist").append("<li class='current' onclick='handleClick(this.childNodes[0])'><a id='Addons_tab' href='javascript:;' onclick='handleClick(this)'>Addons</a></li>");
$(".boxtablist").append("<li class='nocurr' onclick='handleClick(this.childNodes[0])'><a id='Comments_tab' href='javascript:;' onclick='handleClick(this)'>Comments</a></li>");
$(".tabwrapper").append("<div id='lvert-effect'></div>");
$(".tabwrapper").append("<div id='lhorz-effect'></div>");
$(".tabwrapper").append("<div style='clear:both;'></div>");