Jump to content

User:Quarl/show diff since.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Quarl (talk | contribs) at 10:14, 3 February 2006 («227 words changed»). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// [[User:Quarl/show_diff_since.js]] - add 'since' tab to show change since I last edited
//    Compared to JesseW's, this is an asynchronous version that doesn't first open the history page

// requires: wikipage.js, addlilink.js, diffsince.js

// 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

// TODO: use a non-async version for href, and async for onClick

// <pre><nowiki>

var showdiffsince = new Object();

showdiffsince.load = function() {
    if (wikiPage.nsSpecialP) return;

    addTab('javascript:showdiffsince.run()', 'since', 'ca-since', "Show changes since I last edited");
}

showdiffsince.run = function() {
    diffsince.diffThis(document.getElementById('ca-since'), ' <b>since...</b> ');
}

addOnloadHook(showdiffsince.load);

// </nowiki></pre>