User:Herrklara/common.js

function myPreview{ document.getElementById('wpPreview').click; } function mySave{ document.getElementById('wpSave').click; } $(function {  mw.log.warn(mw.config.get( 'wgAction' ));  //mw.config.get('debug') = true;//this does not correct  //$('#wpSave').attr('value',mw.config.get('debug')); /* add the "show preview" and "save" buttons to the head of page so you don't have to scroll all the way down */  if(mw.config.get( 'wgAction' ) == 'edit' || mw.config.get( 'wgAction' ) == 'submit'){  	$('#firstHeading').after('Show Preview ');  	$('#firstHeading').after('Save Page ');  	$('#firstHeading').after('To the text editing');  } });