From 8279e6260a4d4752b6d07f55ea3e78455ba89770 Mon Sep 17 00:00:00 2001 From: peshomir <80340328+peshomir@users.noreply.github.com> Date: Sat, 8 Mar 2025 09:35:16 +0200 Subject: [PATCH] Save last used version in local storage --- src/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 5823fdc..0125565 100644 --- a/src/main.js +++ b/src/main.js @@ -1,5 +1,5 @@ -const fx_version = '0.6.7.2'; // FX Client Version -const fx_update = 'Mar 2'; // FX Client Last Updated +const fx_version = '0.6.7.3'; // FX Client Version +const fx_update = 'Mar 8'; // FX Client Last Updated if ("serviceWorker" in navigator) { navigator.serviceWorker.addEventListener("message", (e) => { @@ -23,6 +23,9 @@ import hoveringTooltip from "./hoveringTooltip.js"; import { keybindFunctions, keybindHandler, mobileKeybinds } from "./keybinds.js"; import customLobby from './customLobby.js'; +const savedVersion = localStorage.getItem("fx_version"); +if (savedVersion !== fx_version) localStorage.setItem("fx_version", fx_version); + window.__fx = window.__fx || {}; const __fx = window.__fx; __fx.version = fx_version + " " + fx_update;