Jump to content

User:Cj005257/scripts/useronline.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.
//
// *** THIS SCRIPT IS NOW DEPRECIATED ***
// *** THIS SCRIPT IS NOW DEPRECIATED ***
// *** THIS SCRIPT IS NOW DEPRECIATED ***
// *** THIS SCRIPT IS NOW DEPRECIATED ***
// SEE THE DOCUMENTATION FOR ITS USE
//

function CustomizeLinkModifications() {
	var un = mw.config.get('wgUserName')
    var pagetoedit = "http://en.wikipedia.org/w/index.php?title=User:" + un + "&action=edit";
    var hovertext = "" //put hover text here for link at top

    //Sidebar
    mw.util.addPortletLink("p-navigation", pagetoedit, "Edit your online status", "pt-statusnav", hovertext, "", "");

    //Topbar
    mw.util.addPortletLink("p-personal", pagetoedit, "Edit your online status", "pt-statuspers", hovertext, "", document.getElementById("pt-userpage"));
}
 
$(CustomizeLinkModifications);