Jump to content

User:Q288/vector.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
importScript('User:Wugapodes/Capricorn.js');
(function(ele, txt, time, condition){
    var s = " (" + mw.config.values.wgUserEditCount + ")";
    var hook = document.getElementById("pt-mycontris");
    if(!hook)
        return "unexpected dom abort mission";
    hook.childNodes[0].innerHTML += s;
    if(!condition) return;
    ele.innerHTML = "";
    (function(ele, txt, time){
        txt = txt.split("");
        var len = txt.length, rate = time/len;
        for(var i=0; i<len; i++) setTimeout(function(){ele.innerHTML += txt.shift();}, i*rate);
    })(ele, txt, time);
})(document.getElementById("edit_count"), '2.0', 300, document.getElementById("8c23b4144bd58c689e192c6ab912a3b75c76f6849977518b8bedefd5e347d67f"));