Fix inline javascript comments breaking via compression layout

Also added a note into the README about this issue for developers
This commit is contained in:
Xevion
2022-09-22 01:26:24 -05:00
parent 2c599536f3
commit a15056e437
2 changed files with 11 additions and 5 deletions

View File

@@ -53,18 +53,17 @@ layout: compress
{% endif %}
</head>
<body class="{% if page.wide or layout.wide %}wide{% endif %}">
{{ content }}
</body>
<script type="text/javascript">
// Is all of this too much effort to make the animation play in just the right way?
/** Is all of this too much effort to make the animation play in just the right way? **/
window.onbeforeunload = function(){
// Remember the origin so it can be checked for page reloadss
/** Remember the origin so it can be checked for page reloads **/
sessionStorage.setItem("origin", window.location.href);
}
window.onload = function() {
// Display the glitch effect on new page loads or reloads.
/** Display the glitch effect on new page loads or reloads. **/
let glitch_seen = sessionStorage.getItem('glitch')
if (glitch_seen !== 'true' || window.location.href === sessionStorage.getItem("origin")) {
sessionStorage.setItem('glitch', 'true')