2014-05-25 18:23:10 +00:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<title>Open Media Library</title>
|
2015-03-31 18:24:14 +00:00
|
|
|
<link href="../../../oxjs/min/UI/css/UI.css" rel="stylesheet" type="text/css" />
|
2014-08-12 12:51:38 +00:00
|
|
|
<style>
|
2016-01-08 03:33:55 +00:00
|
|
|
#logo {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 96px;
|
|
|
|
width: 256px;
|
|
|
|
height: 256px;
|
|
|
|
margin: auto;
|
|
|
|
moz-user-select: none;
|
|
|
|
ms-user-select: none;
|
|
|
|
o-user-select: none;
|
|
|
|
webkit-user-select: none;
|
|
|
|
}
|
|
|
|
#loadingIcon {
|
|
|
|
position: absolute;
|
|
|
|
left: 16px;
|
|
|
|
top: 256px;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
margin: auto;
|
|
|
|
moz-user-select: none;
|
|
|
|
ms-user-select: none;
|
|
|
|
o-user-select: none;
|
|
|
|
webkit-user-select: none;
|
2014-08-12 12:51:38 +00:00
|
|
|
}
|
2016-01-08 03:33:55 +00:00
|
|
|
#error {
|
|
|
|
position: absolute;
|
|
|
|
left: 16px;
|
|
|
|
top: 256px;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: 240px;
|
|
|
|
height: 32px;
|
|
|
|
margin: auto;
|
2014-08-12 12:51:38 +00:00
|
|
|
padding-bottom: 16px;
|
2016-01-08 03:33:55 +00:00
|
|
|
text-align: center;
|
|
|
|
display: none;
|
2014-08-12 12:51:38 +00:00
|
|
|
}
|
|
|
|
</style>
|
2016-01-08 03:33:55 +00:00
|
|
|
</head>
|
|
|
|
<body class="OxThemeOxlight">
|
|
|
|
<img id="logo" src="../png/oml.png" style="">
|
|
|
|
<img id="loadingIcon" src="../../../oxjs/min/UI/themes/oxlight/svg/symbolLoading.svg">
|
|
|
|
<div id="error">Failed to launch Open Media Library</div>
|
2014-05-25 18:23:10 +00:00
|
|
|
<script>
|
2016-01-08 03:33:55 +00:00
|
|
|
(function() {
|
|
|
|
var animationInterval;
|
|
|
|
function load() {
|
|
|
|
var port = document.location.hash.length
|
|
|
|
? document.location.hash.slice(1)
|
|
|
|
: '9842',
|
|
|
|
base = '//127.0.0.1:' + port,
|
|
|
|
ws = new WebSocket('ws:' + base + '/ws');
|
|
|
|
ws.onopen = function(event) {
|
|
|
|
document.location.href = 'http:' + base;
|
|
|
|
};
|
|
|
|
ws.onerror = function(event) {
|
|
|
|
ws.close();
|
|
|
|
};
|
|
|
|
ws.onclose = function(event) {
|
|
|
|
setTimeout(load, 500);
|
|
|
|
};
|
2014-08-12 12:51:38 +00:00
|
|
|
};
|
2016-01-08 03:33:55 +00:00
|
|
|
function startAnimation() {
|
|
|
|
var css, deg = 0,
|
|
|
|
loadingIcon = document.getElementById('loadingIcon'),
|
|
|
|
previousTime = +new Date();
|
|
|
|
animationInterval = setInterval(function() {
|
|
|
|
var currentTime = +new Date(),
|
|
|
|
delta = (currentTime - previousTime) / 1000;
|
|
|
|
previousTime = currentTime;
|
|
|
|
deg = Math.round((deg + delta * 360) % 360 / 30) * 30;
|
|
|
|
css = 'rotate(' + deg + 'deg)';
|
|
|
|
loadingIcon.style.MozTransform = css;
|
|
|
|
loadingIcon.style.MSTransform = css;
|
|
|
|
loadingIcon.style.OTransform = css;
|
|
|
|
loadingIcon.style.WebkitTransform = css;
|
|
|
|
loadingIcon.style.transform = css;
|
|
|
|
}, 83);
|
|
|
|
}
|
|
|
|
function stopAnimation() {
|
|
|
|
clearInterval(animationInterval);
|
|
|
|
}
|
|
|
|
startAnimation();
|
|
|
|
load();
|
|
|
|
setTimeout(function() {
|
|
|
|
stopAnimation();
|
|
|
|
document.getElementById('loadingIcon').style.display = 'none';
|
|
|
|
document.getElementById('error').style.display = 'block';
|
|
|
|
}, 20000);
|
|
|
|
}());
|
2014-05-25 18:23:10 +00:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|