aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-12-03 01:21:46 -0800
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-12-03 01:21:46 -0800
commit644c3cb25c27cf3d4b8047f9223c4797a9a29ea0 (patch)
tree2b54b631d975ff1bcf4d6cee48c981302e8756c7 /src/client/views/Main.tsx
parentc352e3535636269243e26156c99d0438a3177c37 (diff)
parent3b045d03656383df81515485032bfda9e2b16409 (diff)
pull
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index c256d2ebb..92f6ae028 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -24,5 +24,12 @@ AssignAllExtensions();
event.preventDefault();
}
}, true);
+ const startload = (document as any).startLoad;
+ const loading = Date.now() - (startload ? Number(startload) : (Date.now() - 3000));
+ console.log("Load Time = " + loading);
+ const d = new Date();
+ d.setTime(d.getTime() + (100 * 24 * 60 * 60 * 1000));
+ const expires = "expires=" + d.toUTCString();
+ document.cookie = `loadtime=${loading};${expires};path=/`;
ReactDOM.render(<MainView />, document.getElementById('root'));
})(); \ No newline at end of file