עליך להתחבר או להרשם על-מנת להמשיך.

Update Animations Panel

update animation

질문, 리뷰하거나, 이 스크립트를 신고하세요.
  1. // ==UserScript==
  2. // @name Update Animations Panel
  3. // @version 0.1
  4. // @match *://agma.io/**
  5. // @icon https://www.google.com/s2/favicons?sz=64&domain=agma.io
  6. // @grant unsafeWindow
  7. // @run-at document-start
  8. // @namespace brrr
  9. // @description update animation
  10. // ==/UserScript==
  11.  
  12. let send;
  13. let status = false;
  14. const osend = WebSocket.prototype.send
  15. WebSocket.prototype.send = function () {
  16. send = (...args) => osend.call(this, ...args)
  17. return osend.apply(this, arguments)
  18. }
  19. unsafeWindow.anim = (id) => send(new Uint8Array([0xb3, id]));
  20. window.addEventListener('load', (event) => {
  21. $('body').append(`
  22. <div id="fushykng" style="
  23. background-color: #2b2929a6;
  24. position: fixed;
  25. right: 10px;
  26. top: 54%;
  27. border-radius: 5px;
  28. transform: translateY(-50%);
  29. display: grid;
  30. gap: 10px 10px;
  31. margin-top: 20px;
  32. grid-template-columns: repeat(5, 1fr);
  33. ">
  34. <style >#fushykng>div{
  35. padding: 5px;
  36. background-color: #ffffff26;
  37. border-radius: 5px;
  38. border: 1px #ffffff40 solid;
  39. }</style>
  40. `);
  41. for(let i = 1; i < 52; i++) $('#fushykng').append(`<div onclick="anim(${i})">${i}</div>`);
  42. document.addEventListener("keydown", event => {
  43. if (event.code == 'Numpad1') {
  44. if(status == false){
  45. status = true;
  46. document.getElementById("fushykng").style.visibility = "hidden";
  47. } else {
  48. status = false;
  49. document.getElementById("fushykng").style.visibility = "visible";
  50. }
  51. }
  52. });
  53. });