Wikipedia:WikiProject User scripts/Guide/Ajax: Difference between revisions

Content deleted Content added
Line 68:
// fetch token
var api = sajax_init_object();
api.open('GET', wgServer + '/w/api.php?format=json&action=query&prop=info&indexpageids=1&intoken=' + token_type + 'edit&titles=Whatever', true);
api.onreadystatechange = extract_token;
api.send();