User:Hgetnet/vector.js

// include the Luasóg framework importScript('User:Luasóg bot/framework.js'); // wait for the page to load window.onload = function{        // instantiate an instance of Luasog pointing at the en.wiki API        var luasog = new Luasog("http://en.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                ("", " ("+data.query.userinfo.editcount+")");        };         // request the edit count for this use and call callback when done        luasog.request({action:"query", meta:"userinfo", uiprop:"editcount"}, callback); };

function start_mtc { if(wgCanonicalNamespace == 'Image' || wgCanonicalNamespace == 'File') {   mw.util.addPortletLink('p-tb','http://toolserver.org/~magnus/commonshelper.php?interface=en&image=' +     encodeURIComponent(wgTitle) + '&lang=en&username=' + encodeURIComponent(wgUserName) + '&tusc_user=' +     encodeURIComponent(wgUserName),'move to commons','','move file to commons using commonshelper v1'); } } addOnloadHook(start_mtc);