User:Js/ajaxPreview

The script adds new and  Ajax update buttons:
 * they are faster than standard buttons,
 * they retain the text cursor position and undo (Ctrl-Z) history,
 * and preview button uses less traffic.

Note that the standard «» is still required:
 * to update the preview of interwikis, categories, edit summary, and the list of used templates;
 * after you insert &lt;source lang="xxx"&gt; or &lt;categorytree&gt; for the first time.

Configuration
By default the new buttons: B I Ab  ... ... ... ... ... ... ... ...
 * are placed on the right from the toolbar:
 * capture p and v accesskeys from the standart buttons.
 * get names from the standard buttons (using last word).

This can be changed with the following parameters in your monobook.js.

Position:

Then standard buttons are then moved to the right and marked with ">":

Accesskeys: Use empty string  to disable accesskey.

Button text:

Scrolling:

Compatibility with scripts
The script automatically calls sortable and collapsible JavaScript code after every preview update.

You can make it call any custom userscripts by defining  function. For example, if you use NavPopups and want popups to appear in the Ajax-updated preview, use the following code: