-
-
Notifications
You must be signed in to change notification settings - Fork 132
/
index.html
executable file
·93 lines (71 loc) · 3.24 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<html>
<head>
<title>Iris</title>
<base href="https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="theme-color" content="#222222" />
<meta name="viewport" content="width=device-width" />
<link rel="shortcut icon" type="image/ico" href="https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/assets/favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/assets/favicon.ico" />
<link rel="shortcut-icon" href="https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/assets/favicon.ico" />
<!-- Chrome app -->
<link rel="manifest" href="https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/assets/manifest.json" />
<!-- Apple app -->
<link rel="apple-touch-startup-image" href="https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/assets/logo-full-512.png" />
<link rel="apple-touch-icon" sizes="192x192" href="https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/assets/logo-app-192.png" />
<link rel="apple-touch-icon" sizes="512x512" href="https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/assets/logo-app-512.png" />
<!-- Raven Sentry -->
<script src="https://cdn.ravenjs.com/3.17.0/raven.min.js" crossorigin="anonymous"></script>
</head>
<body>
<div id="app">
<!-- ReactJS application here -->
</div>
</body>
<script type="text/javascript">
// Release details
// These are automatically injected to built HTML
var build = "XXX";
var version = "0.0.0";
// Load query param settings
var urlParams = new URLSearchParams(window.location.search);
console.log(urlParams)
// Construct the script tag
var js = document.createElement("script");
js.type = "application/javascript";
// Construct our css tag
var css = document.createElement("link");
css.rel = "stylesheet";
// Check for test mode. This is toggled under Settings > Debug > Test mode
try {
var ui = JSON.parse(localStorage.getItem('ui') );
var test_mode = (typeof(ui) !== 'undefined' && ui && typeof(ui.test_mode) !== 'undefined' && ui.test_mode);
} catch(error){
console.error(error);
var test_mode = false;
}
// Test mode, use un-minified code
if (test_mode){
js.src = 'https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/app.js?v='+build;
css.href = 'https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/app.css?v='+build;
// Production-grade, minified app
} else {
js.src = 'https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/app.min.js?v='+build;
css.href = 'https://cdn.rawgit.com/jaedb/Iris/master/mopidy_iris/static/app.min.css?v='+build;
// Initiate error tracking. This helps catch errors early so
// patches can accurately and quickly fix issues.
Raven.config(
'https://[email protected]/219026',
{
release: version
}
).install();
}
// And finally inject our CSS/JS tags
document.body.appendChild(js);
document.body.appendChild(css);
</script>
</html>