2023-04-09 22:49:50 +02:00
|
|
|
/*
|
2023-07-13 19:03:13 +02:00
|
|
|
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
|
2023-04-09 22:49:50 +02:00
|
|
|
* Copyright (c) 2023 Vendicated and Vencord contributors
|
2025-02-07 04:16:15 +01:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2023-04-09 22:49:50 +02:00
|
|
|
*/
|
|
|
|
|
|
2025-02-06 04:51:20 +01:00
|
|
|
// Discord deletes this from the window so we need to capture it in a variable
|
2023-06-26 00:41:52 +02:00
|
|
|
export const { localStorage } = window;
|
2023-04-05 16:51:19 +02:00
|
|
|
|
|
|
|
|
export const isFirstRun = (() => {
|
|
|
|
|
const key = "VCD_FIRST_RUN";
|
|
|
|
|
if (localStorage.getItem(key) !== null) return false;
|
|
|
|
|
localStorage.setItem(key, "false");
|
|
|
|
|
return true;
|
|
|
|
|
})();
|
2023-06-21 20:52:56 +02:00
|
|
|
|
|
|
|
|
const { platform } = navigator;
|
|
|
|
|
|
|
|
|
|
export const isWindows = platform.startsWith("Win");
|
2023-07-28 21:45:22 +02:00
|
|
|
export const isMac = platform.startsWith("Mac");
|
2023-10-21 22:15:55 +02:00
|
|
|
export const isLinux = platform.startsWith("Linux");
|