mirror of
https://github.com/Xevion/v2.xevion.dev.git
synced 2025-12-10 14:09:09 -06:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user