User:DSP2092/NoPipeSpace.js

$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function {   pathoschild.TemplateScript.add([ {           name: 'NoPipeSpace', script: function(editor) { editor .replace(//gi, function(match) {                       return match.replace(/\s*\|\s*/g, '|');                    }) .options({ minor: true }) .appendEditSummary("Formatting using script") .clickDiff; }       },    ]); });