User:Joshua Scott/Scripts/pendingchanges.js: Difference between revisions

Content deleted Content added
some changes - not done
working version
Line 26:
}
if (pendch_refresh == null) {
pendch_refresh = 510;
}
if (pendch_num_idle_req == null) {
Line 133:
 
// Then make the request
pendch_http.open("GET", "/w/api.php?action=query&format=xml&list=oldreviewedpages&ornamespace=0|4&orstart=" + now + "&orlimit=" + pendch_num_pages, true);
pendch_http.send(null);
}
Line 152:
}
 
// and do it again in 510 secs
setTimeout("pendch_ajax_request()", pendch_refresh * 1000);
}
Line 206:
/* Draw response (monobook) */
function pendch_ajax_response_monobook() {
 
var items = pendch_http.responseXML.getElementsByTagName('rcp');
 
// create the div that holds all the newpage links
var link_div = document.createElement('div');
Line 218:
for (var i = 0; i < items.length; i++) {
var item_name = items[i].getAttribute('title');
var rcidold_id = items[i].getAttribute('rcidstable_revid');
var patrolled = items[i].getAttribute('patrolled') != null;
item_name = item_name.replace(/&/, "%26");
var item_url = 'http://en.wikipedia.org/w/index.php?title=' + item_name + '&rciddiff=cur&oldid=' + rcidold_id + '&redirectdiffonly=no0';
a = document.createElement('a');
Line 321 ⟶ 320:
function pendch_ajax_response_vector() {
var items = pendch_http.responseXML.getElementsByTagName('rcp');
// create the div that holds all the newpage links
Line 333 ⟶ 332:
for (var i = 0; i < items.length; i++) {
var item_name = items[i].getAttribute('title');
var rcid = items[i].getAttribute('rcid');
var patrolled = items[i].getAttribute('patrolled') != null;
var old_id = items[i].getAttribute('stable_revid')