User:MZMcBride/nulledit.js

/* Null edit script, version [0.0.1] */

jQuery( document ).ready( function( $ ) {	function nullEditButton {		if (mw.config.get('wgNamespaceNumber') !== -1 && mw.config.get('wgArticleId') !== 0) {			mw.util.addPortletLink( 'p-tb', mw.config.get('wgScript') + '?title=' + encodeURIComponent(mw.config.get('wgPageName')) + '&action=edit&nulledit=true', 'Null edit', 't-null', 'Null edit this page' );		}	} } );

jQuery( document ).ready( function( $ ) {	if(queryString('nulledit') == 'true')		nullEdit } );

function nullEdit { document.getElementById('wpSave').click; } function queryString(p) { var re = RegExp('[&?]' + p + '=([^&]*)'); var matches; if (matches = re.exec(document.location)) { try { return decodeURI(matches[1]); } catch (e) { } }  return null; }