User:Ilmari Karonen/editbutton user.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// add a user link button to the edit page toolbar <pre><nowiki>

if (mwCustomEditButtons) {
  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/2/29/Button_user.png",
    "speedTip": "User link",
    "tagOpen": "{{subst:user|",
    "tagClose": "}}",
    "sampleText": "Example"};
};

// </nowiki></pre>