User:Otokoume/common.js

$(function {   var title = mw.config.get('wgPageName');    var namespace = mw.config.get('wgNamespaceNumber');

if (namespace % 2 !== 0) return;

var html = genLinkHtml(title, 'JA');

// Rendering // For normal header $('.fandom-community-header') .find('.wds-tabs.extra-large-navigation') .append(html);

// For sticky header $('.fandom-sticky-header') .find('.wds-tabs.large-navigation') .find('.wds-dropdown') .not('.more-menu') .last .after(html); });

function genLinkHtml(pagename, label) { var link = ' ' + label + ' ';

return [ ' ',       '', link, ' ',       ' '    ].join(''); }