aboutsummaryrefslogtreecommitdiff
path: root/deploy
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-09 10:50:15 -0500
committerbobzel <zzzman@gmail.com>2021-03-09 10:50:15 -0500
commit72f9988e5750f38d725aa0dd78e9af39a8794808 (patch)
tree3771318fdff2a844d3b3221ff8ca1409b8a36a50 /deploy
parent2beec2fd2075f210054095dcd028c056dab48e28 (diff)
fixed following portal link to reset camera position. prevent warning errors in loading screen. hide textsidebar until text is selected. fixed link titles to handle case when link anchor is the link document and not infinitely recurse.
Diffstat (limited to 'deploy')
-rw-r--r--deploy/index.html29
1 files changed, 9 insertions, 20 deletions
diff --git a/deploy/index.html b/deploy/index.html
index f2eb5e2aa..dda0c6457 100644
--- a/deploy/index.html
+++ b/deploy/index.html
@@ -125,26 +125,15 @@
let load = getCookie("loadtime");
document.startLoad = Date.now();
console.log("Last Load = " + load);
- setTimeout(() => {
- document.getElementById("dash-progress").style.width = "10%"
- document.getElementById("dash-loader-text").innerHTML = "Loading Dash..."
- }, load / 10);
- setTimeout(() => {
- document.getElementById("dash-progress").style.width = "33%"
- document.getElementById("dash-loader-text").innerHTML = "Preparing dashboards..."
- }, load / 3);
- setTimeout(() => {
- document.getElementById("dash-progress").style.width = "50%"
- document.getElementById("dash-loader-text").innerHTML = "Initializing scripts..."
- }, load / 2);
- setTimeout(() => {
- document.getElementById("dash-progress").style.width = "75%"
- document.getElementById("dash-loader-text").innerHTML = "Fetching documents..."
- }, load / 4 * 3);
- setTimeout(() => {
- document.getElementById("dash-progress").style.width = "100%"
- document.getElementById("dash-loader-text").innerHTML = "Finalising setup..."
- }, load);
+ let dashmesg = (width, msg) => {
+ if (document.getElementById("dash-progress")) document.getElementById("dash-progress").style.width = width
+ if (document.getElementById("dash-progress")) document.getElementById("dash-progress").innerHTML = msg
+ }
+ setTimeout(() => dashmesg("10%", "Loading Dash..."), load / 10);
+ setTimeout(() => dashmesg("33%", "Preparing dashboards..."), load / 3);
+ setTimeout(() => dashmesg("50%", "Initializing scripts..."), load / 2);
+ setTimeout(() => dashmesg("75%", "Fetching documents..."), load / 4 * 3);
+ setTimeout(() => dashmesg("100%", "Finalising setup..."), load);
</script>
</div>
<div id="dash-loader-text" class="dash-loader-text">