Jump to content

User:Minesweeper.007/no dash.js

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Deskana (talk | contribs) at 18:17, 1 August 2007 (moved User:Razorclaw/no dash.js to User:Minesweeper.007/no dash.js: Automatically moved page while renaming the user "Razorclaw" to "Minesweeper.007"). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
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>