注意:儲存之後,你可能要兜過你嘅瀏覽器快取至睇到更改。Internet Explorer: 撳住Ctrl掣再撳重新整理掣。 Firefox: 撳住Shift掣再撳重新載入(又或者撳Ctrl-Shift-R)。 Google Chrome同埋Safari用戶就噉撳個重載掣。
// <pre>

$(saltPageTab);

var saltTarget = "Wikipedia:Protected titles/Twinkle";

function saltPageTab() {
 if( wgCurRevisionId != false || wgNamespaceNumber < 0 || ! userIsInGroup( 'sysop' ) ) {
 return;
 }
 mw.util.addPortletLink('p-cactions', "javascript:saltPage()", "salt", "ca-salt", "Salt this page using cascading protection", "");
}

function saltPage() {
 Status.init( document.getElementById('bodyContent') );
 editXML = sajax_init_object();
 editXML.overrideMimeType('text/xml');
 var query = {
 'title': saltTarget,
 'action': 'submit'
 }
 Status.status( 'Finding page...' );
 editXML.open( 'GET' , mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?' + QueryString.create( query ) , false);

 editXML.send( null );

 var doc = editXML.responseXML;
 var form = doc.getElementById( 'editform' );
 var title = wgPageName.replace( /_/g, ' ' );

 var text = form.wpTextbox1.value;

 if( text.match( new RegExp( RegExp.escape(title) ) ) ) {
 Status.info( 'Already salted.' );
 return;
 }

 text += '*{{:' + title + '}} ([[Special:Undelete/' + title + '|history]]) ~~~~';

 var postData = {
 'wpSummary': 'Adding [[' + title + ']]',
 'wpWatchthis': form.wpWatchthis.checked,
 'wpStarttime': form.wpStarttime.value,
 'wpEdittime': form.wpEdittime.value,
 'wpEditToken': form.wpEditToken.value,
 'wpAutoSummary': form.wpAutoSummary.value,
 'wpTextbox1': text
 }

 Status.status( 'Adding ' + title + '...' );

 editXML = sajax_init_object();
 editXML.overrideMimeType('text/xml');
 editXML.open( 'POST' , mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?' + QueryString.create( query ) , false);
 editXML.setRequestHeader('Content-type','application/x-www-form-urlencoded');
 editXML.send( QueryString.create( postData ) );

 Status.info( 'Salted.' );

}

// </pre>