MediaWiki:Gadget-MoveUtil.js: Difference between revisions

From Elwiki
mNo edit summary
mNo edit summary
 
(45 intermediate revisions by the same user not shown)
Line 1: Line 1:
if(wgNamespaceNumber == -1 && /MovePage\/.+/.test(wgTitle)){
     console.log('__MOVEUTIL_LOG__');
    $('#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){
        if(data.query.pages['-1']){
            wiki = '';
        }
        else{
            data = data.query.pages;
            wiki = data[Object.keys(data)[0]].revisions[0]['*'];
        }
    }, 'json');
    edittoken = $('input[name=wpEditToken]').first().val();
//});

Latest revision as of 03:07, 2 December 2015

    console.log('__MOVEUTIL_LOG__');