Greasy Fork is available in English.

button for me Jstris short

2020/8/11

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

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


myCanvas.style.marginTop="1.3in";
bgLayer.style.marginTop="1.3in";
rInfoBox.style.transform="translate(-6px,-5in)";
document.getElementById("gstats").style.position = "absolute";
document.getElementById("gstats").style.left="40px";
document.getElementById("gstats").style.bottom="396px";
document.getElementById("gstats").style.maxWidth="1.8in";
document.getElementById("gstats").style.maxHeight="1.4in";
document.getElementById("rstage").style.position = "absolute";
document.getElementById("rstage").style.left="3.6in";
document.getElementById("rstage").style.bottom="-0.9in";
document.getElementById("buttonsBox").style.transform="translate(0px, -5.4in)";
loadSkin("https://i.imgur.com/8BwH4ih.png",18);
//pure bg
        //document.getElementById("app").style["background-color"]="#222";
//Center Ready GO
        //var customStyle2=document.createElement("style");
        //customStyle2.innerHTML='.gCapt {margin-left: 20px}';
        //document.body.appendChild(customStyle2);
//buttons | x:position| y:position| width| length
keys = `
⤓"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"-96"1"1
田"0"-122"1"1
⇄"-286"5"1"1
⟳"-190"-86"1"1
`
lines = keys.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
    }
}
});
})();