User:Tygrrr/monobook.js

/***********************************************************************                        EXTRA EDIT BUTTONS // Extra edit page buttons Tools/Editing_tools // This is based on the original code on Wikipedia:Tools/Editing tools // // The original code was on the project page and needed to be cut and paste to the user's // monobook.js page. However, this caused problems with the quote marks. So I have moved // it to its own page. // // I have taken this from simple:user:Huji/monobook.js and modified it. I do not know how to do this from scratch so if you want it for yourself, you're better off using another source. // // See the User:MarkS/Extra edit buttons for changes log function InsertButtonsToToolBar { d = new Date; todayISO = d.getFullYear+"-"; if (d.getMonth > 8) { todayISO += (d.getMonth+1)+"-"; } else { todayISO += "0"+(d.getMonth+1)+"-"; } if (d.getDay > 9) { todayISO += d.getDate; } else { todayISO += "0"+d.getDate; }

//Pound button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3e/Sharp_button.png", "speedTip": "Definition", "tagOpen": "#", "tagClose": ".", "sampleText": "Full sentence definition"} //Example button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/1/11/Btn_toolbar_liste.png", "speedTip": "Example", "tagOpen": "#:''", "tagClose": "''.", "sampleText": "Example sentence"} //Template button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3b/Button_template_alt.png", "speedTip": "Template", "tagOpen": "", "sampleText": "Template:"} //Simple English interwiki button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/c/cb/Button_wikipedia.png", "speedTip": "Simple interwiki", "tagOpen": "simple:",   "tagClose": "", "sampleText": "Simple article"} //My signature button mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/commons/d/d1/Button_mysignature.png", "speedTip": "My sig", "tagOpen": "", "sampleText": ""} } $( InsertButtonsToToolBar );