Wikipedia:Monobook.js/LiveRC.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m editToken
Riga 339:
wpajax.http({ url: wgServer + wgScriptPath + '/index.php?title='+encodeURIComponent(page)+'&diffonly=1&diff='+id+'&oldid='+oldid,
onSuccess: getDiff, mpage: page, mid: id, moldid:oldid, mrcid:rcid});
}
 
function getRevisions( title, rvstartid ) {
var jsondata;
$.ajax( {
url: mw.util.wikiScript( 'api' ),
data: {
action: 'query',
prop: 'revisions',
rvprop: 'user',
titles: title,
rvstartid: rvstartid,
rvlimit: 2,
continue: '',
format: 'json',
},
async: false,
dataType: 'json'
} ) .done( function ( data ) {
jsondata = data;
} );
return jsondata.query.pages[Object.keys( jsondata.query.pages )[0]].revisions;
}
 
Riga 401 ⟶ 423:
}
 
// commentata e sostituita con nuova funzione getRevisions,
// tutta la parte seguente da "Get username of submitter" fino user2=... per:
// [[Speciale:PermaLink/81300049#Problema_LiveRC_0.3.6]]
var revisions = getRevisions(page, id);
var user1 = revisions[1].user;
var user2 = revisions[0].user;
/*
// Get username of submitter
var user1 = getElementWithId( 'mw-diff-otitle2' , "*" , bC );
Riga 446 ⟶ 475:
user1=user1.replace(new RegExp(/\'/g), "\\'");
user2=user2.replace(new RegExp(/\'/g), "\\'");
*/
 
entete.innerHTML = '<table width="100%" class="creator"><tr><td>' + entete.innerHTML +