User:Galian prist/wikia.js

// create talk page button in page header (function {

var config = mw.config.get([       'wgTitle',        'wgNamespaceNumber',        'wgFormattedNamespaces'    ]);

// make sure it's not in the talk or special namespace if (config.wgNamespaceNumber % 2 !== 0) { return; }

var $talkButton = $('').attr({       class: 'wds-button wds-is-squished wds-is-secondary',        href: mw.util.wikiGetlink(config.wgFormattedNamespaces[config.wgNamespaceNumber + 1] + ':' + config.wgTitle),        id: 'custom-talk-button'    }); $talkButtonIcon = $(' '); $talkButtonText = $(' Talk ');

$talkButton.append($talkButtonIcon, $talkButtonText).appendTo('.page-header__contribution-buttons'); $('#ca-talk').remove;

});