Add mobile UI support

This commit is contained in:
Nystik
2026-05-09 13:26:41 +02:00
parent ff88ab288c
commit e89f8d76fb

View File

@@ -7,6 +7,14 @@ import { fsShim } from "./fs/index.js";
installGlobals(); // process, Buffer, window overrides (before require so Buffer is available)
installRequire(); // shim registry, window.require
installCssOverrides(); // browser-specific CSS fixes
// Set EmulateMobile flag for small viewports so Obsidian activates its mobile UI
if (window.innerWidth < 600) {
localStorage.setItem("EmulateMobile", "true");
} else {
localStorage.removeItem("EmulateMobile");
}
initialize(); // vault config, metadata cache, plugin prompt
// Connect file watcher WebSocket after everything is initialized