nifty-wallet/development/index.html

61 lines
1.3 KiB
HTML
Raw Normal View History

2016-06-30 18:22:16 -07:00
<!doctype html>
<html>
<head>
<meta charset="utf-8">
2018-07-17 10:18:12 -07:00
<title>Nifty Wallet</title>
2016-06-30 18:22:16 -07:00
</head>
<body>
<script src="./bundle.js" type="text/javascript" charset="utf-8"></script>
2017-09-29 11:50:24 -07:00
<style>
html, body, #test-container, .super-dev-container {
height: 100%;
width: 100%;
position: relative;
background: white;
}
#app-content {
background: #F7F7F7;
}
</style>
2016-06-30 18:22:16 -07:00
2017-09-29 11:50:24 -07:00
<script>
liveReloadCode(Date.now(), 300)
function liveReloadCode(lastUpdate, updateRate) {
setTimeout(iter, updateRate)
2016-06-30 23:50:20 -07:00
2017-09-29 11:50:24 -07:00
function iter() {
var xhr = new XMLHttpRequest()
2017-09-29 11:50:24 -07:00
xhr.open('GET', '/-/live-reload')
xhr.onreadystatechange = function() {
if(xhr.readyState !== 4) {
return
}
2017-09-29 11:50:24 -07:00
try {
var change = JSON.parse(xhr.responseText).lastUpdate
2017-09-29 11:50:24 -07:00
if(lastUpdate < change) {
return reload()
}
} catch(err) {
}
2017-09-29 11:50:24 -07:00
xhr =
xhr.onreadystatechange = null
setTimeout(iter, updateRate)
}
2017-09-29 11:50:24 -07:00
xhr.send(null)
}
}
2017-09-29 11:50:24 -07:00
function reload() {
window.location.reload()
}
</script>
2017-09-29 11:50:24 -07:00
</body>
2016-06-30 18:22:16 -07:00
</html>