diff --git a/docz/static/electron/main.js b/docz/static/electron/main.js index ccf9d65..d4df7a6 100644 --- a/docz/static/electron/main.js +++ b/docz/static/electron/main.js @@ -26,7 +26,7 @@ function firstSpreadsheetFromArgv() { return args.find(a => EXT_REGEX.test(a)); // undefined if none } -/* ---- 1️⃣ single-instance guard (needed for Windows / Linux) ---- */ +/* ---- single-instance guard (needed for Windows / Linux) ---- */ // on windows and linux, opening a file opens a new instance of the app, this prevents that. const gotLock = app.requestSingleInstanceLock(); if (!gotLock) app.quit(); @@ -38,7 +38,7 @@ else { }); } -/* ---- 2️⃣ platform-specific “open file” hooks ---- */ +/* ---- platform-specific “open file” hooks ---- */ app.on('open-file', (event, fp) => { // macOS Dock / Finder event.preventDefault(); sendToRenderer(fp); @@ -49,14 +49,14 @@ app.on('open-url', (event, url) => { // you can add a cu sendToRenderer(url.replace('file://', '')); // crude, adjust if you keep deep-links }); -/* ---- 3️⃣ normal start-up, harvest argv ---- */ +/* ---- normal start-up, harvest argv ---- */ app.whenReady().then(() => { const fp = firstSpreadsheetFromArgv(); // Windows & Linux first launch if (fp) pendingPaths.push(fp); createWindow(); }); -/* ---- 4️⃣ create the window ---- */ +/* ---- create the window ---- */ function createWindow() { if (win) return; win = new electron.BrowserWindow({