mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
Check userAgent before running electron init
This commit is contained in:
@@ -417,11 +417,15 @@ function calculateAchievements(): void {
|
||||
}
|
||||
|
||||
export function initElectron(): void {
|
||||
const userAgent = navigator.userAgent.toLowerCase();
|
||||
if (userAgent.indexOf(' electron/') > -1) {
|
||||
// Electron-specific code
|
||||
setAchievements([]);
|
||||
initWebserver();
|
||||
setInterval(calculateAchievements, 5000);
|
||||
initAppNotifier();
|
||||
}
|
||||
}
|
||||
|
||||
function initWebserver(): void {
|
||||
(document as any).saveFile = function (filename: string, code: string): string {
|
||||
|
||||
Reference in New Issue
Block a user