User:JayJasper/monobook.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.
<source lang="javascript">
function addStrikeoutButton() {

    editingTools = document.getElementById('toolbar');

    if (editingTools != null)  {

        StrikeTextButton = "  <a href=\"javascript:insertTags('<s>','</s>','Insert text here');\"><img 
src=\"http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png\" alt=\"Strike\" title=\"Strike-through text\"></a>";
 
        editingTools.innerHTML = editingTools.innerHTML + StrikeTextButton;
    }
}

window.onload = addStrikeoutButton;
</source>