mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
26 lines
919 B
JavaScript
26 lines
919 B
JavaScript
import { installRequire } from "./require.js";
|
|
import { installGlobals } from "./globals.js";
|
|
import { installCssOverrides } from "./css-overrides.js";
|
|
import { initialize } from "./init.js";
|
|
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
|
|
if (window.__currentVaultId) {
|
|
fsShim._watcherClient.connect(window.__currentVaultId);
|
|
}
|
|
|
|
console.log("[ignis] Shim loader initialized");
|