mirror of
https://github.com/Dasemu/web-imposter-game.git
synced 2026-11-28 00:07:10 +00:00
feat: add native app detection and adjust styles for Capacitor/Cordova
This commit is contained in:
1 parent
d9e8389777
commit
2bbd388524
5 files changed
+67
-3
No files matched your search
@@ -7,6 +7,17 @@ const THEME_STORAGE_KEY = 'impostorGameTheme';
|
||||
const LANGUAGE_STORAGE_KEY = 'impostorGameLanguage';
|
||||
const SCREEN_LOCK_STORAGE_KEY = 'impostorGameScreenLock';
|
||||
|
||||
// Detect if running as a native app (Capacitor/Cordova)
|
||||
(function detectNativeApp() {
|
||||
const isCapacitor = window.Capacitor !== undefined;
|
||||
const isCordova = window.cordova !== undefined;
|
||||
const isNativeApp = isCapacitor || isCordova;
|
||||
|
||||
if (isNativeApp) {
|
||||
document.documentElement.classList.add('native-app');
|
||||
}
|
||||
})();
|
||||
|
||||
// ---------- Internationalization system ----------
|
||||
const TRANSLATIONS = {
|
||||
es: {
|
||||
|
||||
Reference in new issue
Block a user