RPGEN - Hide Own Avatar

TL;DR

  1. // ==UserScript==
  2. // @name RPGEN - Hide Own Avatar
  3. // @namespace https://tampermonkey.net/
  4. // @version 0.1
  5. // @description TL;DR
  6. // @author https://greasyfork.org/ja/users/705684
  7. // @match https://rpgen.site/dq/?map=*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=rpgen.site
  9. // @license MIT
  10. // @grant GM.registerMenuCommand
  11. // ==/UserScript==
  12.  
  13. (() => {
  14. let graphicId = null;
  15. let isSAnim = null;
  16. GM.registerMenuCommand('hide/show', () => {
  17. const me = unsafeWindow.humans[0];
  18. if (graphicId === null) {
  19. graphicId = me.graphicId;
  20. isSAnim = me.isSAnim;
  21. me.graphicId = -45;
  22. me.isSAnim = false;
  23. } else {
  24. me.graphicId = graphicId;
  25. me.isSAnim = isSAnim;
  26. graphicId = null;
  27. }
  28. });
  29. })();