aboutsummaryrefslogtreecommitdiffstats
path: root/development/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'development/index.html')
-rw-r--r--development/index.html84
1 files changed, 40 insertions, 44 deletions
diff --git a/development/index.html b/development/index.html
index a0814cb55..e5a027447 100644
--- a/development/index.html
+++ b/development/index.html
@@ -3,62 +3,58 @@
<head>
<meta charset="utf-8">
<title>MetaMask</title>
-
</head>
<body>
-
- <!-- app content -->
- <div id="app-content" style="height: 100%"></div>
<script src="./bundle.js" type="text/javascript" charset="utf-8"></script>
+
+ <style>
+ html, body, #test-container, .super-dev-container {
+ height: 100%;
+ width: 100%;
+ position: relative;
+ background: white;
+ }
+ #app-content {
+ background: #F7F7F7;
+ }
+ </style>
- </body>
+ <script>
+ liveReloadCode(Date.now(), 300)
+ function liveReloadCode(lastUpdate, updateRate) {
+ setTimeout(iter, updateRate)
-<style>
-html, body, #test-container, .super-dev-container {
- height: 100%;
- width: 100%;
- position: relative;
- background: white;
-}
-#app-content {
- background: #F7F7F7;
-}
-</style>
+ function iter() {
+ var xhr = new XMLHttpRequest()
-<script>
-liveReloadCode(Date.now(), 300)
-function liveReloadCode(lastUpdate, updateRate) {
- setTimeout(iter, updateRate)
+ xhr.open('GET', '/-/live-reload')
+ xhr.onreadystatechange = function() {
+ if(xhr.readyState !== 4) {
+ return
+ }
- function iter() {
- var xhr = new XMLHttpRequest()
+ try {
+ var change = JSON.parse(xhr.responseText).lastUpdate
- xhr.open('GET', '/-/live-reload')
- xhr.onreadystatechange = function() {
- if(xhr.readyState !== 4) {
- return
- }
+ if(lastUpdate < change) {
+ return reload()
+ }
+ } catch(err) {
+ }
- try {
- var change = JSON.parse(xhr.responseText).lastUpdate
+ xhr =
+ xhr.onreadystatechange = null
+ setTimeout(iter, updateRate)
+ }
- if(lastUpdate < change) {
- return reload()
+ xhr.send(null)
}
- } catch(err) {
}
- xhr =
- xhr.onreadystatechange = null
- setTimeout(iter, updateRate)
- }
-
- xhr.send(null)
- }
-}
+ function reload() {
+ window.location.reload()
+ }
+ </script>
-function reload() {
- window.location.reload()
-}
- </script>
+ </body>
</html>