User:PAC2/GenderDiversity.js

mw.loader.using('mediawiki.util', function {

if (mw.config.get('wgNamespaceNumber') == 0) {

var curServer = mwConfigV.wgServerName;

var gendercount = "https://observablehq.com/@pac02/explore-gender-diversity-in-a-single-wikipedia-article?wikipedia=" +  curServer +"&article=" + encodeURIComponent(mw.config.get( 'wgPageName' )) ;

var bodyElm = document.getElementsByClassName("mw-body-header");

if(bodyElm.length != 0) { $(bodyElm[0]).append(gendercount); }

}

});