User:Aaronism/myskin.js

// change order of sidebar items function menu_move_to_top(menu_name) { menu = document.getElementById(menu_name); if (menu) { p = menu.parentNode; p.removeChild(menu); p.insertBefore( menu, p.firstChild ); } } addOnloadHook(function {   /*     * Edit the order of this menu_names array to change the order of the toolbox.     * The names are the ids of the boxes.     */    menu_names = [       "p-search",       "p-cactions",       "p-personal",       "p-navigation",       "p-tb",       "p-interaction",       "p-coll-print_export",       "p-lang"       ];    while ( menu_name = menu_names.pop ) {       menu_move_to_top(menu_name);    } }); // add onclick attributes /*var menu_items = [ "p-search", "p-cactions", "p-personal", "p-navigation", "p-tb", "p-interaction", "p-coll-print_export", "p-lang" ]; function set_onclick { if (this.childNodes[1].display == "none") { this.childNodes[1].display = "block"; }  else { this.childNodes[1].display = "none"; } } var inc = 1; for (inc=1;inc<=menu_items.length;inc++) { document.getElementById("p-search").firstChild.setAttribute("onclick", "set_onclick;"); document.getElementById("p-search").setAttribute("onclick", "set_onclick;"); }