|
1 | | -import { app, Event as ElectronEvent, ipcMain, ipcRenderer, shell } from "electron"; |
| 1 | +import { |
| 2 | + app, |
| 3 | + Event as ElectronEvent, |
| 4 | + ipcMain, |
| 5 | + ipcRenderer, |
| 6 | + shell, |
| 7 | +} from "electron"; |
2 | 8 | import { BrowserWindow } from "electron/main"; |
3 | 9 | import path from "path"; |
4 | 10 | import process from "process"; |
@@ -100,10 +106,12 @@ if (gotTheLock) { |
100 | 106 | // Specifically, we are ONLY removing the Electron portion of the agent |
101 | 107 | // Found via https://old.reddit.com/r/electronjs/comments/eiy2sf/google_blocking_log_in_from_electron_apps/fcvuwd9/ |
102 | 108 | // Referenced at this link https://github.com/firebase/firebase-js-sdk/issues/2478#issuecomment-571773318 |
103 | | - "User-Agent": mainWindow.webContents.userAgent.replace( |
104 | | - "Electron/" + process.versions.electron, |
105 | | - "" |
106 | | - ), |
| 109 | + // "User-Agent": mainWindow.webContents.userAgent.replace( |
| 110 | + // "Electron/" + process.versions.electron, |
| 111 | + // "" |
| 112 | + // ), |
| 113 | + "User-Agent": |
| 114 | + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/2000.36 (KHTML, like Gecko) Chrome/2000.0.0.0 Safari/2000.36", |
107 | 115 | }, |
108 | 116 | }) |
109 | 117 | ); |
@@ -198,7 +206,9 @@ if (gotTheLock) { |
198 | 206 | }); |
199 | 207 |
|
200 | 208 | ipcMain.handle("get-icon", () => { |
201 | | - var bitmap = fs.readFileSync(path.resolve(RESOURCES_PATH, "icons", "64x64.png")); |
202 | | - return Buffer.from(bitmap).toString('base64'); |
203 | | - }) |
| 209 | + var bitmap = fs.readFileSync( |
| 210 | + path.resolve(RESOURCES_PATH, "icons", "64x64.png") |
| 211 | + ); |
| 212 | + return Buffer.from(bitmap).toString("base64"); |
| 213 | + }); |
204 | 214 | } |
0 commit comments