User:DanielRenfro/vector.js

$(document).ready(function {

if ( $.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1 ) { console.log( 'We are on an edit page.' ); mw.loader.using( 'user.options', function {    if ( mw.user.options.get('usebetatoolbar') ) {      console.log( 'We are using the beta toolbar' );      mw.loader.using( 'ext.wikiEditor', function { var $textarea = $('#wgTextbox1'); console.log( 'We are removing the newline from the toolbar', $textarea ); $textarea.wikiEditor( 'removeFromToolbar', {          'section': 'advanced',          'group': 'format',          'tool': 'newline'        }); });   }  }); }

});