User:Manishearth/Scripts/Snippets

This page contains snippets which are not worthy to become scripts but are sometimes useful.

Usually these are scripts which I made in response to a request at WP:VPT or WP:US/R. They don't take much time to make but are sometimes useful. If you think that a snippet should be promoted to a script (with its own page, documentation, etc), please post an RfS (Request for ScriptShip :P) on my talk page.

Extra floating search bar
Adds an extra search bar to the page, and a portlet of links, which scroll with you. Links and Searchbox are minimizable. The third button next to the searchbox opens the page in a new tab. One bug (minor) If you have already scrolled down, the first letter typed into the box will cause the suggestion menu to pop up elsewhere, but this is fixed by typing another letter. Here is an add-on, to be put directly under above script. It allows you to add little notifications with an addNotification method. Its argiments are: The script adds a notification when you have new messages.
 * link-- What to link to (whole url, please)
 * image-- The url of the image to display. If this param is 'info', 'exclamation', or 'stophand', it will show the standard wikipedia notification images (The ones from the vandalism templates.)
 * title-- The alt-text to show

FlexiDiff
Add it to your monobook js page (go to vector.js if you use beta) and purge your cache. You'll get two new tabs (or links in your chosen portlet if you change the diffPortlet variable). In beta, the tabs will be hidden under a little down arrow next to the history tab and 'watch this page' star.

To get a diff, first open the page you want on the left of the diff, and click ID. Copy the ID, and open the page you want on the right. Click the FlexDiff button (It should be right next to/under the ID tab), and it will ask for the ID that you copied. Paste it and click OK. The diff will open in the same window (no need for a new window as the script doesn't work on edit pages).