mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-17 19:15:59 +08:00
showing requested styles and client version on no css warning
This commit is contained in:
parent
96f64039e7
commit
374251bc39
2 changed files with 22 additions and 7 deletions
|
@ -9,6 +9,7 @@ import * as NewVersionNotification from "./elements/version-check";
|
|||
import * as Notifications from "./elements/notifications";
|
||||
import * as Focus from "./test/focus";
|
||||
import * as CookiePopup from "./popups/cookie-popup";
|
||||
import { CLIENT_VERSION } from "./version";
|
||||
|
||||
ManualRestart.set();
|
||||
UpdateConfig.loadFromLocalStorage();
|
||||
|
@ -22,6 +23,20 @@ if (window.location.hostname === "localhost") {
|
|||
});
|
||||
}
|
||||
|
||||
$("#nocss .requestedStylesheets").html(
|
||||
"Requested stylesheets:<br>" +
|
||||
(
|
||||
[
|
||||
...document.querySelectorAll("link[rel=stylesheet"),
|
||||
] as HTMLAnchorElement[]
|
||||
)
|
||||
.map((l) => l.href)
|
||||
.filter((l) => /\/css\//gi.test(l))
|
||||
.join("<br>") +
|
||||
"<br><br>Client version:<br>" +
|
||||
CLIENT_VERSION
|
||||
);
|
||||
|
||||
Focus.set(true, true);
|
||||
RouteController.handleInitialPageClasses(window.location.pathname);
|
||||
$(document).ready(() => {
|
||||
|
|
|
@ -66,16 +66,16 @@
|
|||
>
|
||||
<span style="font-size: 6rem; color: #e2b714">:(</span>
|
||||
<span style="font-size: 2rem; color: #d1d0c5">
|
||||
It seems like the CSS failed to load. Please clear your cache to
|
||||
redownload the styles. If that doesn't help contact support.
|
||||
It seems like the CSS failed to load. Please try refreshing or clearing
|
||||
your cache to redownload the styles. If that doesn't help contact support.
|
||||
<br />
|
||||
(jack@monkeytype.com or discord.gg/monkeytype)
|
||||
</span>
|
||||
<span>(ctrl/cmd + shift + r on Chromium browsers)</span>
|
||||
<!-- <span>
|
||||
If the website works for a bit but then this screen comes back, clear
|
||||
your cache again and then on Monkeytype open the command line (esc)
|
||||
and search for "Clear SW cache".
|
||||
</span> -->
|
||||
<span class="requestedStylesheets">
|
||||
If the website works for a bit but then this screen comes back, clear your
|
||||
cache again and then on Monkeytype open the command line (esc) and search
|
||||
for "Clear SW cache".
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue