From 842af1af6fda0ecc45e34b283bbe8e5c76d7cbd0 Mon Sep 17 00:00:00 2001 From: Fabrice Date: Fri, 6 Oct 2023 14:39:59 +0200 Subject: [PATCH] fix path package.json --- assets/js/app.js | 6 ------ index.html | 2 +- main.js | 7 +++---- package.json | 2 +- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 7e8ed67..ce087fc 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -6,11 +6,6 @@ * */ -/*const minimizeBtn = document.getElementById("btn-minimize"); -minimizeBtn.addEventListener("click", () => { - app.minimizeApp(); -});*/ - const hideBtn = document.getElementById("btn-hide"); hideBtn.addEventListener("click", () => { app.hideApp(); @@ -30,4 +25,3 @@ const onTopBtn = document.getElementById("btn-on-top"); onTopBtn.addEventListener("click", () => { app.onTop(); }); - diff --git a/index.html b/index.html index 750e7c5..9b80b24 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@
- OnTop / Minimize / Reload / Quit v: + OnTop / Minimize / Reload / Quit v: 1.3.5
diff --git a/main.js b/main.js index df4eeb9..6d89843 100644 --- a/main.js +++ b/main.js @@ -2,7 +2,7 @@ const { BrowserWindow, screen, Menu, MenuItem, app, Tray, nativeImage, ipcMain } = require('electron') if(require('electron-squirrel-startup')) return app.quit() const path = require('path') -const fs = require('fs') +const fs = require('fs'); try { require('electron-reloader')(module) @@ -29,8 +29,7 @@ menu.append(new MenuItem({ role: 'undo' })); menu.append(new MenuItem({ role: 'redo' })); function createWindow() { - - const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8')); + const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8')); const size = screen.getPrimaryDisplay().workAreaSize; width = size.width; @@ -77,7 +76,7 @@ function createWindow() { }, 2000); // Ouvrir les DevTools. - mainWindow.webContents.openDevTools() + //mainWindow.webContents.openDevTools() // Register a global shortcut to toggle the window visibility const { globalShortcut } = require('electron') diff --git a/package.json b/package.json index f8a1645..e337b40 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chatgpt-quake-mode", - "version": "1.3.3", + "version": "1.3.6", "description": "Open chatGPT in Quake mode", "main": "main.js", "scripts": {