Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21ec03f78f13337

Jump to content

Wikipedia:WikiProject User scripts/Scripts/Re-order menus

From Wikipedia, the free encyclopedia

Add the following to monobook.js:

 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", // search box
       "p-tb", // toolbox
       "p-interaction", // interaction
       "p-navigation", // navigation
       ];
    while ( menu_name = menu_names.pop() ) {
       menu_move_to_top(menu_name);
    }
 });


The menu_names variable sets the order of the menu boxes. For example, moving the search box to the bottom can be done by setting the menu_names variable to:

    menu_names = [
       "p-navigation", // navigation
       "p-interaction", // interaction
       "p-tb", // toolbox
       "p-search", // search box
       ];


--h2g2bob (talk) 13:47, 6 July 2008 (UTC)[reply]


Tested with Works?
Internet Explorer 6.0 Unknown
Internet Explorer 7.0 Unknown
Firefox 2.0 Yes
Firefox 3.0 Yes
Safari Unknown
Opera Unknown
Konqueror 3.5 Yes