User:Jeblad/popup references

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

Pack references is a gadget to pack references into a short form until they are actually used, and then show them in a popup window. They are still in the content, but are hidden until one of the anchored links in the reference section is clicked. The packed reference mark is then highlighted, and if it is clicked then all the references will be shown.

The purpose of this gadget is to demo a possible alternate way to hide/show references in the text, and it is somewhat bogus. It lacks a solution on how to show the references while the reader is in the normal text content.

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/hide references]]
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jeblad/popup_references/script.js&action=raw&ctype=text/javascript' );
// mw.loader.load( '//meta.wikimedia.org/w/index.php?title=User:Jeblad/popup_references/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.