(function () { function toggleDevtoolsHotkey() { const osName = __TEMPLATE_os_name__; const isHotkey = osName === "macos" ? (event) => event.metaKey && event.altKey && event.code === "KeyM" : (event) => event.ctrlKey && event.shiftKey && event.code === "KeyM"; document.addEventListener("keydown", (event) => { if (isHotkey(event)) { window.__TAURI_INTERNALS__.invoke("plugin:devtools-app|toggle"); } }); } if ( document.readyState === "complete" || document.readyState === "interactive" ) { toggleDevtoolsHotkey(); } else { window.addEventListener("DOMContentLoaded", toggleDevtoolsHotkey, true); } // do not hijack the context menu on the devtools webview if (!window.__DEVTOOLS_DISPLAY_MODE__) { document.addEventListener( "contextmenu", (e) => { e.preventDefault(); window.__TAURI_INTERNALS__.invoke( "plugin:devtools-app|show_context_menu" ); }, false ); } })();