-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·39 lines (38 loc) · 1.26 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
<html>
<head>
<title>Better Course Explorer</title>
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link href="elements/registration-app.html" rel="import" />
<script type="text/javascript">
window.Updator = require('updator');
Updator.check();
</script>
<script type="text/javascript">
console.log("Main frame loaded.");
Catalog = require('catalog');
Bookmark = require('bookmark');
if (!localStorage.getItem('index')) {
// location.assign('data-helper.html#autorestore');
window.catalog = new Catalog([], [], " ");
window.bookmark = new Bookmark([]);
window.addEventListener("load", () => {
// Launch db wizard
document.querySelector("sidebar-element").selected = 2; // Settings
document.querySelector("main-window-settings").page = "database";
document.querySelector("uiuc-settings-database").initwizard();
});
} else {
console.log("Loading catalog...");
Catalog.inst = Catalog.fromLocalStorage(); // TODO
window.catalog = Catalog.inst;
if (!localStorage.getItem("bookmark")) {
localStorage.setItem("bookmark", "{}");
}
window.bookmark = Bookmark.fromStorage(localStorage);
console.log("Catalog loaded.");
}
</script>
</head>
<body fullbleed unresolved>
<registration-app></registration-app>
</body>