User:Vacation9/userlinks.js

$(function {    var title = mw.config.get('wgTitle');    title = title.replace(/\/.*/, "");  // subpage name only    if (mw.config.get('wgCanonicalNamespace') == "Special")        return;  // no links for special    mw.util.addPortletLink('p-tb', '//en.wikipedia.org/w/index.php?title=Special%3ALog&type=delete&page='+mw.config.get('wgTitle'), 'Deletion log', 't-dellog', 'Deletion log for "'+mw.config.get('wgTitle')+'"', 'Y');    if (mw.config.get('wgCanonicalNamespace') != "User" && mw.config.get('wgCanonicalNamespace') != "User_talk")        return;  // links only for User+User talk namespaces    mw.util.addPortletLink('p-tb', '//en.wikipedia.org/w/index.php?title=Special%3ALog&type=block&page=User:'+title, 'Block log', 't-blocklog', 'Block log for "'+title+'"', 'Y');    mw.util.addPortletLink('p-tb', '//en.wikipedia.org/w/index.php?title=Special%3ALog&type=rights&page=User:'+title, 'Rights log', 't-rightlog', 'User rights log for "'+title+'"', 'Y'); });