Content deleted Content added
Joshua Scott (talk | contribs) m Reverted edits by Joshua Scott (talk) to last version by He7d3r |
Joshua Scott (talk | contribs) Move beta to prod. Uses JSON, some other fixes to make it work again. |
||
Line 7:
var pendch_diffonly;
var pendch_str_no_ajax = "There seems to be a problem using the
var pendch_str_box_title = "Pending changes";
var pendch_str_box_title_updating = "Pending
var pendch_str_box_title_failed = "Pending changes (update failed)";
var pendch_str_enable = "Enable this box";
var pendch_str_disable = "Disable this box";
$(document).ready( pendch_init );
/* initalise */
Line 27:
}
}
// allow user settings through
if (pendch_enabled == null) {
Line 43 ⟶ 44:
pendch_diffonly = 1;
}
// A few limits to be nice to the servers
if (pendch_num_pages > 50) {
Line 135:
}
}
// Get the current time
var dateobj = new Date();
var now = Math.floor(dateobj.getTime() / 1000.0);
// Then make the request
pendch_http.open("GET", "/w/api.php?action=query&format=
pendch_http.send(null);
}
Line 217 ⟶ 214:
/* Draw response (monobook) */
function pendch_ajax_response_monobook() {
var resp = JSON.parse(pendch_http.responseText);
var items = resp.query.oldreviewedpages;
// create the div that holds all the
var link_div = document.createElement('div');
link_div.className = 'pBody';
Line 228 ⟶ 226:
// populate the list with 10 links.
for (var i = 0; i < items.length; i++) {
var
var
item_name = item_name.replace(/&/, "%26");
a = document.createElement('a');
Line 241 ⟶ 239:
var li = document.createElement('li');
li.appendChild(a);
list.appendChild(li);
}
Line 313 ⟶ 308:
}
if( typeof $
$('#p-pendingchanges > h5').keydown( function( event ) {
if ( event.which == 13 /* Enter */ || event.which == 32 /* Space */ ) {
Line 332 ⟶ 327:
function pendch_ajax_response_vector() {
var resp = JSON.parse(pendch_http.responseText);
var items = resp.query.oldreviewedpages;
// create the div that holds all the
var link_div = document.createElement('div');
link_div.className = 'body';
Line 343 ⟶ 339:
// populate the list with 10 links.
for (var i = 0; i < items.length; i++) {
var
var
item_name = item_name.replace(/&/, "%26");
a = document.createElement('a');
Line 357 ⟶ 353:
var li = document.createElement('li');
li.appendChild(a);
list.appendChild(li);
}
Line 393 ⟶ 386:
}
if( typeof $
$('#p-pendingchanges > h5').keydown( function( event ) {
if ( event.which == 13 /* Enter */ || event.which == 32 /* Space */ ) {
|