MyWiki:WikiProject User scripts/Scripts/Dashboard

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by imported>SD0001 at 14:41, 17 September 2025 (addPortletLink -> mw.util.addPortletLink). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
// <syntaxhighlight lang="javascript">
//Dashboard

function addDash() {
loLogoutNode = document.getElementById("pt-logout");
loDashNode = mw.util.addPortletLink( "p-personal"
        , mw.config.get('wgServer') + mw.config.get('wgScriptPath') + "/index.php?title=Template:Dashboard&action=purge"
        , "dashboard"
        , "pt-dashboard"
        , "Link to dashboard"
        , "d"
        , loLogoutNode );
}
$.when($.ready, mw.loader.using('mediawiki.util')).then(addDash);


//</syntaxhighlight>