User:Quarl/nav afd.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.

// toolbox_afd.js - add AFD/Today and AFD/Yesterday links to Toolbox
 
// requires: wikipageAfd.js, datetime.js, addlilink.js
 
// quarl 2006-01-03 initial version
// quarl 2006-01-24 show three direct links (avoid WP:AFD/Today, etc)
 
// <pre><nowiki>
 
function addToolboxAFD() {
    //addToolboxLink('/wiki/WP:AFD/Today', "AFD/Today", "pt-afd-today", "Show today's AFD log");
    //addToolboxLink('/wiki/WP:AFD/Yesterday', "AFD/Yesterday", "pt-afd-yesterday", "Show yesterday's AFD log");
 
    for (var i=0; i < 3; ++i) {
        var d = previousDay(i);
        var date = datestampUTCISO(d);
        addNavigationLink(afdLogPage(d).url, "AFD/"+date, "pt-afd-"+i, "Show AFD log for "+date);
    }
}
 
addOnloadHook(addToolboxAFD);
 
// </nowiki></pre>