User:Zocky/moretools.js

From Wikipedia, the free encyclopedia

Note: After saving, you have to bypass your browser's cache to see the changes. Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.

function more_tools()
{
 var user_name=get_user_name();

 add_stuff
 (

    "column-one",
    el( "div","class","portlet",
      el("h5", tx("more tools")),
      el( "div","class","pBody",
        el("ul", "id", "more_tools_ul",
          el ("li",el("a","href","/wiki/User:" + user_name +  "/Sandbox",tx("my sandbox 1")),tx(" "),
                   el("a","href","/wiki/User:" + user_name +  "/Sandbox 2",tx("2")),tx(" "),
                   el("a","href","/wiki/User:" + user_name +  "/Sandbox 3",tx("3"))
             ),
          el ("li",el("a","href","/w/index.php?title=Special:Prefixindex&namespace=2&from=" + user_name,tx("my userspace")))
        )
      )
    )
  )

 if (more_tools_show_block) 
 {
   add_stuff( "more_tools_ul", el ("li",el("a","href","/wiki/Special:Blockip",tx("block ip"))));
   add_stuff( "more_tools_ul", el ("li",el("a","href","/wiki/Special:Ipblocklist",tx("ip blocklist"))));
   add_stuff( "more_tools_ul", el ("li",el("a","href","/wiki/Special:Log/Block",tx("block log"))));
 }  
}			

addLoadEvent(more_tools);
new_option('more_tools_show_block', true);