RPGEN - Hide Own Avatar

TL;DR

// ==UserScript==
// @name         RPGEN - Hide Own Avatar
// @namespace    https://tampermonkey.net/
// @version      0.1
// @description  TL;DR
// @author       https://greasyfork.org/ja/users/705684
// @match        https://rpgen.site/dq/?map=*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=rpgen.site
// @license      MIT
// @grant        GM.registerMenuCommand
// ==/UserScript==

(() => {
    let graphicId = null;
    let isSAnim = null;
    GM.registerMenuCommand('hide/show', () => {
        const me = unsafeWindow.humans[0];
        if (graphicId === null) {
            graphicId = me.graphicId;
            isSAnim = me.isSAnim;
            me.graphicId = -45;
            me.isSAnim = false;
        } else {
            me.graphicId = graphicId;
            me.isSAnim = isSAnim;
            graphicId = null;
        }
    });
})();