button for me Jstris short

2021/07/20

  1. // ==UserScript==
  2. // @name button for me Jstris short
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.34
  5. // @description 2021/07/20
  6. // @author ore100
  7. // @match https://*.jstris.jezevec10.com/*
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. window.addEventListener('load', function(){
  12.  
  13. /*
  14. myCanvas.style.marginTop="1.3in";//場地下移
  15. bgLayer.style.marginTop="1.3in";//場地方塊下移
  16. holdCanvas.style.marginTop="1.3in";//保存下移
  17. rstage.style.marginTop="1.3in";//預覽下移
  18. rstage.style.position="absolute";
  19. rstage.style.left="3.6in";
  20.  
  21.  
  22. //The following is bigger
  23. //bgLayer.style.transform="scale(1.1,1.1) translate(5px,1in)";myCanvas.style.transform="scale(1.1,1.1) translate(5px,1in)";bgLayer.style.maxHeight="5in";myCanvas.style.maxHeight="5in";
  24.  
  25.  
  26. gstats.style.marginTop="-5in";//秒數上移
  27. gstats.style.left="40px";//秒數置中
  28. gstats.style.maxWidth="1.8in";//限制大小
  29. gstats.style.maxHeight="1.4in";//限制大小
  30. gstats.style.position="absolute";
  31. buttonsBox.style.bottom="4.9in";//設置按鈕上移
  32. buttonsBox.style.left="190px";//設置按鈕偏右
  33. buttonsBox.style.maxWidth="1.8in";//限制大小
  34. buttonsBox.style.maxHeight="1.4in";//限制大小
  35. buttonsBox.style.position="absolute";
  36.  
  37.  
  38. rInfoBox.style.bottom="5in";//剩餘行數上移
  39. rInfoBox.style.left="-6px";
  40. //rInfoBox.style.transform="translate(-6px,-5in)";
  41. */
  42.  
  43. lrem.style.filter =
  44. "sepia(1) brightness(0.5) hue-rotate(24deg) saturate(5550) brightness(206%)";
  45. //剩餘行數亮色
  46. //秒數亮色
  47. glstats.style.filter =
  48. "sepia(1) brightness(0.5) hue-rotate(24deg) saturate(5550) brightness(206%)";
  49. loadSkin("https://i.imgur.com/8BwH4ih.png",18);
  50. myCanvas.style.left="15px";//場地下移
  51. bgLayer.style.left="15px";//場地方塊下移
  52. rstage.style.marginTop="15px";//預覽下移
  53. holdCanvas.style.marginTop="15px";//保存下移
  54. //Ready Go下移
  55. var customStyle2=document.createElement("style");
  56. customStyle2.innerHTML='.gCapt {margin-Left:15px;margin-Top:-2.5in}';
  57. document.body.appendChild(customStyle2);
  58. // The following are custom buttons
  59. //buttons | x:position| y:position| width| length
  60. keys = `
  61. "0"80"1"1.3
  62. "-96"0"1"1.3
  63. "-96"0"1"1.3
  64. "0"0"1"1.3
  65. "0"0"1"1.3
  66. "190"-113"1"1
  67. "0"-145"1"1
  68. "-285"0"1"1
  69. "-145"-90"1.3"1.3
  70. `
  71. lines = keys.split("\n")
  72. ids = ["", "tc-hd", "tc-c", "tc-cc", "tc-r", "tc-l", "tc-d", "tc-vs", "tc-h", "tc-dr"]
  73.  
  74. for (var i = 0; i < lines.length; i++) {
  75. if(lines[i]){
  76. pos = lines[i].split("\"")
  77. style = "scale(" + pos[3] + "," + pos[4] + ") translate(" + pos[1] + "px," + pos[2] + "px)"
  78. document.getElementById(ids[i]).style.transform=style
  79. }
  80. }
  81. });
  82. })();
  83. /*
  84. //document.getElementById("app").style["background-color"]="#222";
  85. pure bg
  86. */