አባል:Hgetnet Bot/vector.js
Appearance
በዚህ ገጽ ላይ በርካታ ምርጫዎች አሉዎት። ለምሳሌ ጊዜዎች ሁሉ ለሰዓት ክልልዎ በቀላሉ ማስማማት እዚህ ይቻላል። ደግሞ በ«ማዘጋጀት ምርጫዎች» ውስጥ ያዘጋጁት ሁሉ በቀጥታ ወደ ከታተሉት ገጾች እንዲጨመር ማድረግ ይችላሉ። ምርጫዎን ካስተካከሉ በኋላ፣ «ይቆጠብ» ያለውን ይጫኑ።
// include the Luasóg framework
importScript('አባል:Hgetnet Bot/framework.js');
// wait for the page to load
window.onload = function(){
// instantiate an instance of Luasog pointing at the am.wiki API
var luasog = new Luasog("http://am.wikipedia.org/w/api.php");
// set up the callback function
var callback = function(data){
// add the number of edits for this user to the inner HTML of the contributions link
document.getElementById("pt-mycontris").innerHTML =
document.getElementById("pt-mycontris").innerHTML.replace
("</a>", " ("+data.query.userinfo.editcount+")</a>");
};
// request the edit count for this use and call callback when done
luasog.request({action:"query", meta:"userinfo", uiprop:"editcount"}, callback);
};