Skip to content

Commit

Permalink
Update main.js - Version 1.1 changes
Browse files Browse the repository at this point in the history
Added ability to switch from Copilot to ChatGPT.
  • Loading branch information
JesusC0der authored Sep 23, 2024
1 parent 7c21433 commit 029b9cc
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -47,4 +63,4 @@ app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
});

0 comments on commit 029b9cc

Please sign in to comment.