MediaWiki:SandboxLink/code.js

//SandboxLink /* Add a menu item to profile menu with link to user contributions in modernized UI */ $(function {    var $userContribs = $('')        .attr('id', 'MySandbox')        .append( $('') .attr('href', '/wiki/User:' + wgUserName + '/Sandbox') .addClass('wds-global-navigation__dropdown-link') .text('My Sandbox') );               //Add menu item, after Message Wall link, if it exists    $('.wds-global-navigation__user-menu li').has('a[data-tracking-label="account.message-wall"]')        .after($userContribs);    //Add menu item, after My Talk link, if it exists    $('.wds-global-navigation__user-menu li').has('a[data-tracking-label="account.talk"]')        .after($userContribs); });