WoWI Addon Tabs

tab control for author addons

Verze ze dne 01. 11. 2014. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

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