mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-31 01:00:47 +08:00
Prevents the browser/webview default context menu app-wide, while preserving it for text selections and editable fields where the native menu is still useful.
16 lines
432 B
TypeScript
16 lines
432 B
TypeScript
import "overlayscrollbars/overlayscrollbars.css";
|
|
import { hotkeyKeyUX, hotkeyMacCompat, startKeyUX } from "keyux";
|
|
import { mount } from "svelte";
|
|
|
|
import App from "./App.svelte";
|
|
import { disableNativeContextMenu } from "./lib/disableNativeContextMenu";
|
|
|
|
const app = mount(App, { target: document.body });
|
|
|
|
disableNativeContextMenu();
|
|
|
|
const mac = hotkeyMacCompat();
|
|
startKeyUX(window, [hotkeyKeyUX([mac])]);
|
|
|
|
export default app;
|