Jump to content

User:Quarl/show diff last.js

From Wikipedia, the free encyclopedia
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_last.js]] - add "diff" tab to do most recent diff

// depends: wikipage.js, addlilink.js

// originally based on http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/Show_last_diff
// based on raylu's abbreviation of http://en.wikipedia.org/w/index.php?title=User:JesseW/monobook.js&oldid=20755510

// <pre><nowiki>

function addTab_DiffLast() {
    if (wikiPage.nsSpecialP) return;

    var nurl = wikiPage.qurl + "&diff=0";
    addTab(nurl, 'Diff', 'ca-last', "Show most recent diff");
}

$(addTab_DiffLast);

// </nowiki></pre>