1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/development/index.html

61 lines
1.3 KiB
HTML
Raw Normal View History

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