User:WurmWoode/common.js

/*====================================== 20230425 TUE

20220920 https://en.wikipedia.org/wiki/Wikipedia:Teahouse/Questions/Archive_1165#When_writing_an_edit_summary,_is_there_a_way_to_stop_the_enter_key_generating_a_%22Publish%22?

edit-summary
 * 1) DISALLOW enter key
 * 2) ENFORCE button Publish

=
=========================*/ (function {	var submit_box = document.getElementById('wpSummary');	if (submit_box) {		submit_box.onkeypress = function(e) {			if (e.charCode === 13) {   			alert('Ah, ah, ah. "Publish" button ONLY.');   			e.preventDefault;			}		};	} }); /*====================================*/