Przeglądaj źródła

Add theme listener to desktop

Toby Chui 4 dni temu
rodzic
commit
beb476246c
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      src/web/desktop.html

+ 4 - 0
src/web/desktop.html

@@ -7321,6 +7321,10 @@
                     }
                 } catch(e) {}
             });
+            // Notify standalone browser tabs that have called ao_module_onThemeChanged
+            try {
+                localStorage.setItem('ao_system_theme', JSON.stringify({theme: theme, ts: Date.now()}));
+            } catch(e) {}
         }
 
         function toggleDesktopTheme(){