Jump to content

User:Kurr/vector.js

From Wikipedia, the free encyclopedia
(Redirected from User:Kurr/monobook.js)
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.
// This script changes the "Your signature with timestamp" edit button to use a real em dash instead of two hyphens.
 
(function () {
    var oldAddButton = window.addButton;
    if (typeof(oldAddButton) != 'function') return;
    window.addButton = function () {
        if (arguments.length > 2)
            arguments[2] = arguments[2].replace(/^--(~+)$/, '— $1');
        oldAddButton.apply(this, arguments);
    };
})();