Jump to content

User:Minesweeper.007/no dash.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Minesweeper.007 (talk | contribs) at 00:27, 24 April 2007 (Revert to revision 120781145 dated 2007-04-06 17:53:04 by Razorclaw using popups). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
// put whatever before the $1
// This script changes the "Your signature with timestamp" edit button to use a real em dash instead of two hyphens.  <pre><nowiki>

(function () {
    var oldAddButton = addButton;
    if (typeof(oldAddButton) != 'function') return;
    addButton = function () {
        if (arguments.length > 2)
            arguments[2] = arguments[2].replace(/^--(~+)$/, '$1');
        oldAddButton.apply(this, arguments);
    };
})();

// </nowiki></pre>