fix: add devtools support and enhance development experience

This commit is contained in:
Bohdan Triapitsyn
2025-12-07 22:08:50 +02:00
parent f5a190eaac
commit 3503eff4bb
5 changed files with 28 additions and 3 deletions
+15
View File
@@ -22,6 +22,21 @@ if (!(window as typeof globalThis & { process?: unknown }).process) {
};
}
if (import.meta.env.PROD) {
document.addEventListener('keydown', (e) => {
if ((e.metaKey || e.ctrlKey) && e.key === 'r') {
e.preventDefault();
}
if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.key === 'r') {
e.preventDefault();
}
});
document.addEventListener('contextmenu', (e) => {
e.preventDefault();
});
}
declare global {
interface Window {
__OPENCHAMBER_RUNTIME_APIS__?: RuntimeAPIs;