User:Ilmari Karonen/signcheck.js

// CHECK THAT I'VE REMEMBERED TO SIGN TALK PAGES:

if (mw.config.get('wgNamespaceNumber') % 2 === 1 && (mw.config.get('wgAction') === "edit" || mw.config.get('wgAction') === "submit")) { // editing a talk page? $(function {        if (!document.editform || !document.editform.wpSave || !document.editform.wpTextbox1) return;        var oldOnclick = document.editform.wpSave.onclick;        document.editform.wpSave.onclick = function  {            if (oldOnclick && !oldOnclick.apply(this, arguments)) return false;            if (document.editform.wpTextbox1.value.match(/~{3}/)) return true;            return confirm("You have not signed your name. Save anyway?");        };    }); }

//