MediaWiki:FixChatWhitespace.js

//Fixes posting of whitespace in chat. //@author: Sophiedp  //@note: Edited from CapsFirst. if (mw.config.get('wgCanonicalSpecialPageName') === 'Chat') { document.querySelector('textarea').addEventListener('keydown', function (e) {       if (e.key === 'Enter') {            this.value = this.value.trim;        }    }); }