button for me jstris short

2020/7/27

As of 2020-07-29. See the latest version.

// ==UserScript==
// @name         button for me jstris short
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  2020/7/27
// @author       ore100
// @match        https://*.jstris.jezevec10.com/*
// @grant        none
// ==/UserScript==

(function() {
    window.addEventListener('load', function(){

//skin and bg
        //document.body.style.backgroundImage="url('https://i.imgur.com/4cgoabE.png')";
        //document.body.style.backgroundSize="100% 100%";
        //document.getElementById("app").style["background-color"]="#222";
        //loadSkin("https://i.imgur.com/8BwH4ih.png",18);
//center
        //myCanvas.style.marginLeft = "20px"
        //bgLayer.style.marginLeft = "20px"
//Center Ready GO
        //var customStyle2=document.createElement("style");
        //customStyle2.innerHTML='.gCapt {margin-left: 20px}';
        //document.body.appendChild(customStyle2);
//buttons position x,y,width,length
settings = `
⤓    "0"   97"   1"   1.2
↷  "-96"  10"   1"   1.2
↶  "-96" -10"   1"   1.2
→    "0"  10"   1"   1.2
←    "0"  10"   1"   1.2
↓  "190"-106"   1"   1
田   "0"-122"   1"   1
⇄"-285"   0"   1"   1
⟳"-190"-106"   1"   1
`
lines = settings.split("\n")
ids = ["", "tc-hd", "tc-c", "tc-cc", "tc-r", "tc-l", "tc-d", "tc-vs", "tc-h", "tc-dr"]

for (var i = 0; i < lines.length; i++) {
    if(lines[i]){
        pos = lines[i].split("\"")
        style = "scale(" + pos[3] + "," + pos[4] + ") translate(" + pos[1] + "px," + pos[2] + "px)"
        document.getElementById(ids[i]).style.transform=style

    }
}
});
})();