User:Tnsmanyu/common langscount.js

$(document).ready(function{ $("a").hover(function{ var api = new mw.Api; var req = api.get({action:'parse',page:$(this).attr('title'),prop:'langlinks'}); var curA = $(this); req.done(function(data){   if(curA.data("done")!=true){      var val = data.parse.langlinks.length;      curA.append("("+val+")");      curA.data("done",true);}    }); }); });