Start animation also in German
The app's new port means empty browser storage, so a German app reloaded right after the start and lost the animation. The language now comes with the login. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a639abf216
commit
99613327f8
2 files changed
+6
-3
No files matched your search
+5
-2
@@ -17,10 +17,13 @@
|
||||
<b>DSP Control</b><small>VK-Audio</small>
|
||||
</div>
|
||||
<script>
|
||||
// start animation of the desktop apps: only their login arrives with this parameter, a reload doesn't
|
||||
// start animation of the desktop apps: only their login arrives with this parameter, a reload doesn't.
|
||||
// The language comes along: on the app's new port the browser storage is empty, and correcting it later needs a reload
|
||||
(function () {
|
||||
var el = document.getElementById("splash");
|
||||
if (location.search !== "?start=app") return el.remove();
|
||||
var m = /^\?start=app&lang=(en|de)$/.exec(location.search);
|
||||
if (!m) return el.remove();
|
||||
try { localStorage.setItem("dsp.lang", m[1]); } catch (e) { /* private mode */ }
|
||||
history.replaceState(null, "", "/");
|
||||
el.classList.add("show");
|
||||
setTimeout(function () { el.remove(); }, 1500);
|
||||
|
||||
Reference in new issue
Block a user