Revert "Inline style-switching JS into <head>"
It was bullshit anyway
Cette révision appartient à :
Parent
e425d3d86b
révision
f73d148dec
2 fichiers modifiés avec 6 ajouts et 9 suppressions
|
@ -1,4 +1,10 @@
|
|||
// Night mode
|
||||
var night = localStorage.getItem("night");
|
||||
if (night == "true") {
|
||||
$("#style")[0].href = "/css/style-night.css";
|
||||
$("#nighticon")[0].src = "/img/sun.png";
|
||||
}
|
||||
|
||||
function toggleNightMode() {
|
||||
var night = localStorage.getItem("night");
|
||||
if(night == "true") {
|
||||
|
|
|
@ -27,15 +27,6 @@
|
|||
|
||||
<!-- Website CSS -->
|
||||
<link rel="stylesheet" id="style" href="{{.URL.Parse "/css/style.css"}}">
|
||||
<script type="text/javascript">
|
||||
// Inlined here to allow early style switch
|
||||
if (localStorage.getItem("night") == "true") {
|
||||
document.getElementById("style").href = "/css/style-night.css";
|
||||
document.body.addEventListener("load", function() {
|
||||
document.getElementById("nighticon").src = "/img/sun.png";
|
||||
}, false);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-default" id="mainmenu">
|
||||
|
|
Référencer dans un nouveau ticket