Eliminate platform theme flash
mindflux-ci / build (push) Successful in 23s

This commit is contained in:
AliceDarkest
2026-07-14 15:22:26 +02:00
parent 7a97e6f24e
commit d5d4add293
75 changed files with 188 additions and 181 deletions
+8 -9
View File
@@ -8,6 +8,14 @@
apply(read()); // früh -> kein Aufblitzen
// Die Plattformklasse liegt vor dem ersten Rendern auf html. So ist die
// Neural-Hülle bereits aktiv, wenn die statisch importierten Styles zeichnen.
// Die eigenständigen Spielrouten bleiben bewusst ausgenommen.
var path = window.location.pathname;
var isGameRoute = ['/mindmatch', '/techtacular', '/devlab', '/syntaxsaga', '/codeescape', '/bughunter', '/serviceclash', '/networker']
.some(function (route) { return path === route || path.indexOf(route + '/') === 0; });
if (!isGameRoute) document.documentElement.classList.add('sn-platform');
// Globale, rein clientseitige Komfortfunktionen. FluxTimer bleibt auf öffentlichen
// Seiten inaktiv, läuft bei aktivierter Einstellung aber über Seitennavigationen weiter.
if (!document.querySelector('link[data-fluxtimer]')) {
@@ -17,13 +25,6 @@
timerCss.setAttribute('data-fluxtimer', '');
document.head.appendChild(timerCss);
}
if (!document.querySelector('link[data-platform-neural]')) {
var neuralCss = document.createElement('link');
neuralCss.rel = 'stylesheet';
neuralCss.href = '/css/platform-neural.css?v=1';
neuralCss.setAttribute('data-platform-neural', '');
document.head.appendChild(neuralCss);
}
if (!document.querySelector('script[data-fluxtimer]')) {
var timerScript = document.createElement('script');
timerScript.src = '/js/fluxtimer.js?v=2';
@@ -103,8 +104,6 @@
}
document.addEventListener('DOMContentLoaded', function () {
var isGame = document.querySelector('.mm-body,.tt-body,.dl-body,.dlg-body,.ss-body,.esc-app,.bh-app,.sc-app,.nw-app');
if (!isGame) document.body.classList.add('sn-platform');
document.querySelectorAll('.mf-theme').forEach(function (b) {
b.setAttribute('role', 'button');
b.setAttribute('aria-label', 'Theme umschalten');