Add pointless loading spinner (js) that nobody will ever see.

This commit is contained in:
Retro_Guy 2024-05-15 04:53:09 -07:00
parent 39af9862f5
commit 31345514b1
1 changed files with 35 additions and 0 deletions

View File

@ -15,6 +15,28 @@ $CONFIG = include $config_file;
if (navigator.cookieEnabled)
document.cookie = "tzo="+ (- new Date().getTimezoneOffset())+"; path=/";
</script>
<style>
#loading_indicator {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
border: 10px solid grey;
border-radius: 50%;
border-top: 10px solid blue;
width: 100px;
height: 100px;
animation: spinIndicator 1s linear infinite;
}
@keyframes spinIndicator {
100% {
transform: rotate(360deg);
}
}
</style>
<?php
$menulist = file($config_dir . "menu.conf", FILE_IGNORE_NEW_LINES);
@ -45,6 +67,19 @@ if ((isset($_SESSION['theme'])) && file_exists($rootdir . 'common/themes/' . $_S
?>
</head>
<body>
<div id = "loading_indicator"> </div>
<script>
document.addEventListener('readystatechange', e => {
if(document.readyState === "complete"){
document.getElementById("loading_indicator").style.display ="none";
document.querySelector("body").style.visibility = "visible";
}
});
document.querySelector("body").style.visibility = "hidden";
document.getElementById("loading_indicator").style.visibility = "visible";
</script>
<table class="np_header_bar_top" width="100%" valign="middle">
<tr>
<td width="30%"><a href="<?php echo $CONFIG['default_content'];?>"><img