Skip to content

Commit

Permalink
fix path package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
emulsion-io committed Oct 6, 2023
1 parent 96bb1e2 commit 842af1a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
6 changes: 0 additions & 6 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -30,4 +25,3 @@ const onTopBtn = document.getElementById("btn-on-top");
onTopBtn.addEventListener("click", () => {
app.onTop();
});

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<webview id="webview" src="https://chat.openai.com"></webview>
<div class="fix-bottom">
<div class="center">
<span class="btn cursor" id="btn-on-top">OnTop</span> / <span class="btn cursor" id="btn-hide">Minimize</span> / <span class="btn cursor" id="btn-reload">Reload</span> / <span class="cursor btn" id="btn-close">Quit</span> <span class="version">v: <span id="version"></span></span>
<span class="btn cursor" id="btn-on-top">OnTop</span> / <span class="btn cursor" id="btn-hide">Minimize</span> / <span class="btn cursor" id="btn-reload">Reload</span> / <span class="cursor btn" id="btn-close">Quit</span> <span class="version">v: <span id="version">1.3.5</span></span>
</div>
</div>
<script src="./assets/js/app.js"></script>
Expand Down
7 changes: 3 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 842af1a

Please sign in to comment.