User:Jeblad/ref toolbar

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Status of this gadget is alpha.

Ref toolbar is a gadget to build a reference toolbar to get a more compact text that is easier to read. All the references are kept as they are, except they are wrapped up so they can be hidden. All of the links are still there, but will only be shown when the handle is activated.

The purpose of this gadget is to demo a possible alternate way to show references in the text, and it is somewhat bogus. It does not handle large reference toolbars at the right edge properly, it does not respect ltr/rtl, and backlinks from the reference section is broken for all references but the first one in each toolbar.

There are two pages

Enabling the gadget from a remote site is by adding the following script to your common (local wiki) or global (on meta) js-page.

Please keep the tracking line, it makes it possible to check if this gadget should be made globally available.

// Tracking [[User:Jeblad/ref toolbar]]
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jeblad/ref_toolbar/script.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jeblad/ref_toolbar/style.css&action=raw&ctype=text/css', 'text/css' );

It can be a good idea to add the loader script to a local gadget, thereby making it easy for all users on the project to enable the functionality.