diff --git a/forge.config.js b/forge.config.js index ca8d8bf..a9511c8 100644 --- a/forge.config.js +++ b/forge.config.js @@ -39,7 +39,7 @@ module.exports = { productName: 'BingGPT', description: 'AI-powered copilot', productDescription: 'AI-powered copilot', - version: '0.3.4', + version: '0.3.5', categories: ['Utility'], maintainer: 'dice2o', homepage: 'https://github.com/dice2o/BingGPT', @@ -56,7 +56,7 @@ module.exports = { productName: 'BingGPT', description: 'AI-powered copilot', productDescription: 'AI-powered copilot', - version: '0.3.4', + version: '0.3.5', categories: ['Utility'], maintainer: 'dice2o', homepage: 'https://github.com/dice2o/BingGPT', diff --git a/main.js b/main.js index c0592e5..5bfdcc2 100644 --- a/main.js +++ b/main.js @@ -214,7 +214,7 @@ const createWindow = () => { }, }, { - label: 'BingGPT v0.3.4', + label: 'BingGPT v0.3.5', visible: parameters.selectionText.trim().length === 0, click: () => { shell.openExternal('https://github.com/dice2o/BingGPT/releases') @@ -227,7 +227,7 @@ const createWindow = () => { isDarkMode ? 'dark' : 'light' }schemeovr=1&FORM=SHORUN&udscs=1&udsnav=1&setlang=${locale}&features=udssydinternal&clientscopes=windowheader,coauthor,chat,&udsframed=1` const userAgent = - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.0.0' + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' mainWindow.loadURL(bingUrl) // Open links in default browser mainWindow.webContents.setWindowOpenHandler(({ url }) => { @@ -268,14 +268,6 @@ const createWindow = () => { } } ) - // Modify headers - mainWindow.webContents.session.webRequest.onBeforeSendHeaders( - (details, callback) => { - details.requestHeaders['User-Agent'] = userAgent - details.requestHeaders['X-Forwarded-For'] = '1.1.1.1' - callback({ requestHeaders: details.requestHeaders, cancel: false }) - } - ) // Always on top const alwaysOnTopHandler = () => { config.set('alwaysOnTop', !mainWindow.isAlwaysOnTop()) diff --git a/package-lock.json b/package-lock.json index 6cc6382..c26bb51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "binggpt", - "version": "0.3.4", + "version": "0.3.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "binggpt", - "version": "0.3.4", + "version": "0.3.5", "license": "Apache-2.0", "dependencies": { "electron-context-menu": "^3.6.1", diff --git a/package.json b/package.json index f5e3198..5a2e69c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "binggpt", "productName": "BingGPT", - "version": "0.3.4", + "version": "0.3.5", "description": "AI-powered copilot", "author": "dice2o", "license": "Apache-2.0", diff --git a/preload.js b/preload.js index 73c9784..ecfe364 100644 --- a/preload.js +++ b/preload.js @@ -34,6 +34,10 @@ window.addEventListener('DOMContentLoaded', () => { } if (joinLink) { joinLink.setAttribute('target', '_self') + joinLink.setAttribute( + 'href', + 'https://www.bing.com/rewards/authcheck?ru=%2Fmsrewards%2Fapi%2Fv1%2Fenroll%3Fpubl%3DBINGIP%26crea%3DMY00IA%26pn%3Dbingcopilotwaitlist%26partnerId%3DBingRewards%26pred%3Dtrue%26wtc%3Dshoreline/discover%26ru%3Dhttps%253a%252f%252fedgeservices.bing.com%252fedgesvc%252furlredirect%253fscenario%253dwaitlist' + ) } if (previewBanner) { previewBanner.style.cssText = 'margin-top: 44px' @@ -354,15 +358,8 @@ const markdownHandler = (element) => { }, }) const mdDataURL = Buffer.from( - turndownService.turndown(element) + '\n', + turndownService.turndown(element), 'utf-8' ).toString('base64') ipcRenderer.send('export-data', 'md', mdDataURL) } - -// Fix copy issue -window.addEventListener('copy', (event) => { - const selection = document.getSelection() - event.clipboardData.setData('text/plain', selection.toString()) - event.preventDefault() -})