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

Content deleted Content added
add option to hide diff
Reverted to revision 369848247 by MBisanz; rv. (TW)
Line 5:
var pendch_num_idle_req;
var pendch_curr_idle_req;
var pendch_show_full_page;
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 32 ⟶ 30:
if (pendch_num_idle_req == null) {
pendch_num_idle_req = 60;
}
if (pendch_show_full_page == null) {
pendch_show_full_page = true;
}
 
//Show the diff?
if (pendch_show_full_page == true) {
pendch_diffonly = '1';
} else {
pendch_diffonly = '0';
}
 
Line 128 ⟶ 116:
cur_box.firstChild.firstChild.data = pendch_str_box_title_updating;
}
 
if (window.___location.pathname.match(/diffonly=1/) == -1) {
var currURL = window.___location.protocol + "//" + window.___location.host + "/" + window.___location.pathname;
var newURL=currURL.replace(/diffonly=1/,diffonly=0);
document.getElementById("difference").innerHTML += '&nbsp;(<a href="' + newURL + '">Show page below diff</a>)';
}
 
if (pendch_create_request () == false) {
Line 240 ⟶ 221:
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 351 ⟶ 332:
 
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');