-
-
Notifications
You must be signed in to change notification settings - Fork 172
/
Copy pathindex.html
48 lines (48 loc) · 1.62 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Dependency-Track</title>
<base href="/" />
</head>
<body class="sidebar-minimized">
<noscript>
<strong
>We're sorry but this app doesn't work properly without JavaScript
enabled. Please enable it to continue.</strong
>
</noscript>
<div id="app"></div>
<script type="text/javascript">
(function () {
if (!sessionStorage.length) {
// Ask other tabs for session storage
localStorage.setItem('getSessionStorage', Date.now());
}
window.addEventListener('storage', function (event) {
if (event.key == 'getSessionStorage') {
// Some tab asked for the sessionStorage -> send it
localStorage.setItem(
'sessionStorage',
JSON.stringify(sessionStorage),
);
localStorage.removeItem('sessionStorage');
} else if (event.key == 'sessionStorage' && !sessionStorage.length) {
// sessionStorage is empty -> fill it
var data = JSON.parse(event.newValue),
value;
for (key in data) {
sessionStorage.setItem(key, data[key]);
}
} else if (event.key == 'sessionInvalidate') {
// clearing out session in the event a user clicks the logout button
sessionStorage.clear();
location.reload();
}
});
})();
</script>
</body>
</html>