Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wkAjaxFastDelete.ajaxProtectAPage = function ( protectReason ) {
- var url = wgServer + wgScriptPath + '/api.php?action=query&prop=info&intoken=protect&titles=' + encodeURIComponent( wgPageName ) + '&format=json';
- $.getJSON( url, function( data ) {
- var editToken = data.query.pages[wgArticleId].protecttoken,
- url = wgServer + wgScriptPath + '/api.php?action=protect&title=' + encodeURIComponent( wgPageName ) + '&reason=' + encodeURIComponent( protectReason ) + '&format=json&token=' + encodeURIComponent( editToken );
- $.post( url, function() {
- document.location.reload();
- } );
- } );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement