Корбар:Aidan Kehoe/monobook.js: Тафовут байни таҳрирҳо
Content deleted Content added
Aidan Kehoe (баҳс | ҳисса) Add a couple more userscripts. |
Aidan Kehoe (баҳс | ҳисса) I'd prefer the languages at the top, and visible, most of the time. |
||
Сатри 14:
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 (){
menu_names = [
"p-lang",
"p-search", // search box
"p-tb", // toolbox
];
while ( menu_name = menu_names.pop() ) {
menu_move_to_top(menu_name);
}
});
|