User:Quarl/show diff since.js

From Wikipedia, the free encyclopedia

Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.

// [[User:Quarl/show_diff_since.js]] - add 'since' tab to show change since I
// last edited
 
// Left-click navigates asynchronously; new tab/window works as well.
 
// depends: wikipage.js, addlilink.js, diffsince.js
 
// originally based on http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/Changes_since_I_last_edited
// from http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510
 
// quarl 2006-01-16 rewritten to asynchronously download history page
 
// <pre><nowiki>
 
var showdiffsince = new Object();
 
showdiffsince.load = function() {
    if (wikiPage.nsSpecialP) return;
 
    var url = diffsince.makeUrl(wikiPage);
    var href = '<a onclick="javascript:return showdiffsince.run()" href="'+url+'">Since</a>';
 
    showdiffsince.tab = addlilinkX(getTabActions(), href, 'ca-since', "Show changes since I last edited");
}
 
showdiffsince.run = function() {
    return diffsince.diffThis(showdiffsince.tab);
}
 
addOnloadHook(showdiffsince.load);
 
// </nowiki></pre>