Difference between revisions of "User:Nathan/monobook.js"
MyWikiBiz, Author Your Legacy — Wednesday November 13, 2024
Jump to navigationJump to searchLine 1: | Line 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> | ||
+ | |||
importScript('User:Nathan/Scripts/Time'); | importScript('User:Nathan/Scripts/Time'); | ||
importScript('User:Nathan/Scripts/usertabs.js'); | importScript('User:Nathan/Scripts/usertabs.js'); |
Revision as of 08:19, 20 April 2007
// 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> importScript('User:Nathan/Scripts/Time'); importScript('User:Nathan/Scripts/usertabs.js');