title
От
// ==UserScript==
// @name Moving touch buttons in tetr.js
// @namespace http://tampermonkey.net/
// @version 0.6.5
// @author Oki
// @description title
// @match http://farter.cn/tetr.js/
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.addEventListener('load', function(){
if(typeof trim != "function"){var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}}
function onTouchPressed() {
//execute stuff after placing block
setInterval(x=>{touchLeft.style.height = "1.5in";touchLeft.style.backgroundColor="red"},3000)
}
var placeBlockFunc = window.touchButtonsLayout.toString()
placeBlockFunc = trim(onTouchPressed.toString()) + trim(placeBlockFunc)
window.touchButtonsLayout = new Function(placeBlockFunc);
/*
var customStyle2=document.createElement("style");
customStyle2.innerHTML='#touchLeft {height: 1.5in;margin-top: -200px}';
document.body.appendChild(customStyle2);
*/
x=(d=document).createElement("style");x.innerHTML="Hold0RotLeft0Down0Left0Right0RotRight0Drop".split(0).map(x=>"#touch"+x).join("{height:1.5in};");d.body.appendChild(x);
});
})();