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

Content deleted Content added
Reverted to revision 369848247 by MBisanz; rv. (TW)
enable diffonly = 1; etc.
Line 5:
var pendch_num_idle_req;
var pendch_curr_idle_req;
var pendch_diffonly;
 
var pendch_str_no_ajax = "There seems to be a problem using the PendingChanges script. Your browser is not supported. God Bless!";
Line 30 ⟶ 31:
if (pendch_num_idle_req == null) {
pendch_num_idle_req = 60;
}
if(pendch_diffonly == null) {
pendch_diffonly = 1;
}
 
Line 80 ⟶ 84:
try {
pendch_http = new XMLHttpRequest();
} catch (e) {
try {
Line 93 ⟶ 96:
}
 
if (window.___location.toString().search(/diffonly=1/) != -1) {
var currURL = window.___location.toString();
var newURL=currURL.replace(/diffonly=1/,diffonly=0);
document.getElementById("difference").innerHTML += '&nbsp;(<a href="' + newURL + '">Show page below diff</a>)';
}
 
pendch_http.onreadystatechange = function() {
if(pendch_http.readyState == 4) pendch_ajax_response();
Line 116 ⟶ 126:
cur_box.firstChild.firstChild.data = pendch_str_box_title_updating;
}
 
if (pendch_create_request () == false) {
if (cur_box != null) {
Line 221 ⟶ 231:
item_name = item_name.replace(/&/, "%26");
var item_url = 'http://en.wikipedia.org/w/index.php?title=' + item_name + '&diff=cur&oldid=' + old_id + '&diffonly=0' + pendch_diffonly;
a = document.createElement('a');
Line 332 ⟶ 342:
 
item_name = item_name.replace(/&/, "%26");
var item_url = 'http://en.wikipedia.org/w/index.php?title=' + item_name + '&diff=cur&oldid=' + old_id + '&diffonly=0' + pendch_diffonly;
a = document.createElement('a');