Wikipedia:WikiProject User scripts/Scripts/Logs link

From Wikipedia, the free encyclopedia
Jump to: navigation, search

// from User:Thebainer/monobook.js


// adds a 'logs for this page' link to the toolbox bar
// if the page is a special page, then no link is displayed

addOnloadHook(function () {
    if ( wgCanonicalNamespace == "Special" )
        return;  // don't display link for special pages

    url = wgServer + "/w/index.php?title=Special:Log&page=" + encodeURIComponent(wgPageName);

    addPortletLink("p-tb", url, "Page logs", "pt-logs");
});

//