button for me tetr.js Enhanced

20-07-22

当前为 2020-07-23 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name button for me tetr.js Enhanced
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.6
  5. // @author ore100
  6. // @description 20-07-22
  7. // @match http://farter*/t*
  8. // @match http*://*/tetr.js*
  9. // @match https://doktorocelot.com/tetr.js/
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. window.addEventListener('load', function(){
  15.  
  16. if(typeof trim != "function"){var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}}
  17.  
  18. {p=document.getElementById("touchDrop").style;
  19. p.marginLeft="130px";
  20. p.marginTop="47px";
  21. p.maxWidth="63px";
  22. p.paddingBottom="22px";
  23. p.backgroundColor="#777";console.log(p)};
  24.  
  25.  
  26. {c=document.getElementById("touchRotRight").style;
  27. c.marginLeft="89px";
  28. c.marginTop="47px";
  29. c.maxWidth="63px";
  30. c.paddingBottom="22px";
  31. c.backgroundColor="#777";console.log(c)};
  32.  
  33. {w=document.getElementById("touchRotLeft").style;
  34. w.marginLeft="122px";
  35. w.marginTop="22px";
  36. w.maxWidth="63px";
  37. w.paddingBottom="22px";
  38. w.backgroundColor="#777";console.log(w)};
  39.  
  40.  
  41. {r=document.getElementById("touchRight").style;
  42. r.marginLeft="-155px";
  43. r.marginTop="-20px";
  44. r.maxWidth="63px";
  45. r.paddingBottom="22px";
  46. r.backgroundColor="#777";console.log(r)};
  47.  
  48. {l=document.getElementById("touchLeft").style;
  49. l.marginLeft="-43px";
  50. l.marginTop="-20px";
  51. l.maxWidth="80px";
  52. l.paddingBottom="22px";
  53. l.backgroundColor="#777";console.log(l)};
  54.  
  55.  
  56. {d=document.getElementById("touchDown").style;
  57. d.marginLeft="122px";
  58. d.marginTop="-111px";
  59. d.maxWidth="70px";
  60. d.paddingBottom="22px";
  61. d.backgroundColor="#777";console.log(d)};
  62.  
  63. {h=document.getElementById("touchHold").style;
  64. h.marginLeft="-170px";
  65. h.marginTop="-122px";
  66. h.maxWidth="70px";
  67. h.paddingBottom="22px";
  68. h.backgroundColor="#777";console.log(h)};
  69.  
  70. {o=document.getElementById("touchRot180").style;
  71. o.marginLeft="-70px";
  72. o.marginTop="-88px";
  73. o.maxWidth="70px";
  74. o.paddingBottom="22px";
  75. o.backgroundColor="red";console.log(o)};
  76.  
  77.  
  78. });
  79. })();
  80. //width360 on browser dev tool