Apply the requested view before first paint via a data-view attribute and CSS, and switch views before loading the library.
This commit is contained in:
1 parent
b45b4437b8
commit
eb8a9bb57b
4 files changed
+34
-1
No files matched your search
@@ -14,6 +14,10 @@
|
||||
<script>
|
||||
try {
|
||||
if (localStorage.getItem("sb.theme") === "light") document.documentElement.dataset.theme = "light";
|
||||
const view = new URLSearchParams(location.search).get("view");
|
||||
if (["recommend", "hltb", "friends", "services"].includes(view)) {
|
||||
document.documentElement.dataset.view = view;
|
||||
}
|
||||
} catch (_) {}
|
||||
</script>
|
||||
<link rel="stylesheet" href="/static/styles.css">
|
||||
|
||||
Reference in new issue
Block a user