User:Guest/monobook.js
From Wikipedia
Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror:: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences.
//<pre> // Based in button bar from [[:es:Usuario:Cookie/monobook.js|Cookie]] v0.3 // edited by [[:es:Usuario:Pilaf|Pilaf]] on 25/01/2005 // // ...who was trying to merge button bar with // Live Preview... succesfully! <code style="background:yellow">:D</code> // // And after I started to change stuff [[User:Nethac DIU|Nethac DIU]]. (from commons) //<nowiki> window.onload = loadButtons; /*********** Botonera ***********/ function loadButtons() { //Every button explains itself in its title parameter var buttons = '<div>'; buttons += '<a class="mybutton" title="Main Page" href="http://test.wikipedia.org/wiki/Sandbox">#</a>'; buttons += '<a class="mybutton" title="Sign up" href="javascript:firma()" style="background:#FF8800" >~</a>'; buttons += '<a class="mybutton" title="Info template in Commons" href="javascript:information()">i</a>'; buttons += '<br><input type=button name="tablaboton" value="Table creator" onclick="javascript:table()">' buttons += '</div>'; var toolbox = document.getElementById("p-navigation"); toolbox.innerHTML += '<h5><a href="/w/index.php?title=User:Guest/monobook.js&action=edit">my button bar</a></h5>'+buttons;} function firma() {insertTags('{{User:Guest/Sign|','}}','');} function information() {insertTags('{{Information\n|Description = \n|Source = \n|Date = \n|Author = \n|Permission = \n|other_versions = \n}}','','');} function table() {insertTags('\n{| border=1 style="float:right; margin:0 0 1em 1em"\n', '\n|}\n', '|+Caption\n!Header 1!!Header 2\n|-\n|cell1||cell2');} alert(history.current)//</nowiki></pre>