MediaWiki:ViewInContentLang/code.js

// ViewInContentLang // Version 1 by HM100 // Allows you to see a wiki page in Wiki's language (Useful when an article uses MediaWiki messages and has them translated in many languages including its main language) // TODO: // * Special Pages Support // * Support when you use ?useskin=monobook, ?action=history in where we use &uselang=en

$(function {   var config = mw.config.get([ 'skin', 'wgPageContentLanguage', 'wgPageName' ]);   if ($('#ViewInContentLang').length)        return;

var $link = 'View in wikis language'; if (config.skin === 'oasis') { $('.page-header__contribution-buttons .wds-list, .UserProfileActionButton .WikiaMenuElement').append($link); } else { $('#p-cactions > .pBody > ul').append( $link); }

});