diff --git a/main.js b/main.js index 05f83d3..5c2684a 100644 --- a/main.js +++ b/main.js @@ -28,13 +28,29 @@ function createWindow() { } app.whenReady().then(() => { + globalShortcut.register('Alt+Shift+C', () => { + if (win.isVisible()) { win.hide(); } else { win.show(); } + }) + + globalShortcut.register('Alt+Shift+D', () => { + + const currentURL = win.webContents.getURL(); + + if (currentURL.includes('edgeservices')) { + win.loadURL('https://chatgpt.com'); + } else { + win.loadURL('https://edgeservices.bing.com/edgesvc/chat?udsframed=1&form=SHORUN&clientscopes=chat,noheader,udsedgeshop,channelbeta,ntpquery,devtoolsapi,udsinwin11,udsdlpconsent,udscstart,cspgrd,&shellsig=b975e0cc5a474706873839a00fcbbcdabcd6c864&setlang=en-US&darkschemeovr=1&udsps=0&udspp=0') + } + + }) + }).then(createWindow) app.on('window-all-closed', () => { @@ -47,4 +63,4 @@ app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) { createWindow(); } -}); \ No newline at end of file +});