MediaWiki:Gadget-MoveUtil.js

From Elwiki
Revision as of 19:40, 6 May 2015 by Boxsnake (talk | contribs)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
if(wgNamespaceNumber == -1 && /MovePage\/.+/.test(wgTitle)){
    $('#wpMovetalk').attr('checked', 'checked');
    $('#wpLeaveRedirect').removeAttr('checked');
    $('#wpMovesubpages').attr('checked', 'checked');
}
//$('#movepage').submit(function(){
    var wiki, edittoken;
    $.get('/wiki/api.php?action=query&titles=User:Boxsnake/MoveList&prop=revisions&rvprop=content&format=json', function(data){
        wiki = data;
    }, 'json');
    if(wiki.query.page['-1']){
        wiki = '';
    }
    else{
        wiki = wiki.query.pages;
        wiki = wiki[Object.keys(a)[0]].revisions[0]['*'];
    }
    
//});