button for me tetr.JS short

20-07-25

As of 31.08.2020. See ბოლო ვერსია.

// ==UserScript==
// @name         button for me tetr.JS short
// @namespace    http://tampermonkey.net/
// @version      1.28
// @author       ore100
// @description  20-07-25
// @match        http://farter*/t*
// @match        http*://*/tetr.js*
// @match        https://doktorocelot.com/tetr.js/
// @grant        none
// ==/UserScript==


(function() {
    window.addEventListener('load', function(){
time.style.position = "absolute";time.style.left="1.4in";time.style.bottom="3in";time.style.transform="scale(2,2)";a.style.bottom="-90px";
b.style.bottom="-1.2in";c.style.bottom="-1.0in";
key = `
⤓"119"48"76"22
↷"209"229"68"22
↶"141"309"68"22
→"-181"-20"68"22
←"-65"-19"76"22
↓"108"-91"80"1
⇄"0"74"80"1
⟳"0"248"80"1
`
lines = key.split("\n")
ids = ["", "touchDrop", "touchRotRight", "touchRotLeft", "touchRight", "touchLeft", "touchDown", "touchHold", "touchRot180"]

for (var i = 0; i < lines.length; i++) {
    if(lines[i]){
        pos = lines[i].split("\"")
        x = document.getElementById(ids[i]).style
        x.marginLeft= pos[1] + "px";
        x.marginTop= pos[2] +"px";
        x.maxWidth= pos[3] + "px";
        x.paddingBottom= pos[4] + "px";
        x.backgroundColor="#777";
        console.log(x)
}
}
});
})();
//width360 on pc chrome dev tool