Update htmlrunner.html
Browse files- htmlrunner.html +33 -1
htmlrunner.html
CHANGED
@@ -20,6 +20,36 @@
|
|
20 |
|
21 |
reader.readAsText(file);
|
22 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
</script>
|
24 |
</head>
|
25 |
<body>
|
@@ -27,7 +57,8 @@
|
|
27 |
<p>
|
28 |
(If it isn't working press TAB)
|
29 |
</p>
|
30 |
-
<input type="file" accept=".html" onchange="handleFileSelect(event)">
|
|
|
31 |
<br>
|
32 |
<iframe id="output" width="100%" height="1000px"></iframe>
|
33 |
</body>
|
@@ -55,3 +86,4 @@ function handleFile(e){
|
|
55 |
</html>
|
56 |
|
57 |
|
|
|
|
20 |
|
21 |
reader.readAsText(file);
|
22 |
}
|
23 |
+
function toggleFullscreen() {
|
24 |
+
var iframe = document.getElementById('output');
|
25 |
+
|
26 |
+
if (iframe.requestFullscreen) {
|
27 |
+
if (document.fullscreenElement) {
|
28 |
+
document.exitFullscreen();
|
29 |
+
} else {
|
30 |
+
iframe.requestFullscreen();
|
31 |
+
}
|
32 |
+
} else if (iframe.mozRequestFullScreen) { // Firefox
|
33 |
+
if (document.mozFullScreenElement) {
|
34 |
+
document.mozCancelFullScreen();
|
35 |
+
} else {
|
36 |
+
iframe.mozRequestFullScreen();
|
37 |
+
}
|
38 |
+
} else if (iframe.webkitRequestFullscreen) { // Chrome, Safari, and Opera
|
39 |
+
if (document.webkitFullscreenElement) {
|
40 |
+
document.webkitExitFullscreen();
|
41 |
+
} else {
|
42 |
+
iframe.webkitRequestFullscreen();
|
43 |
+
}
|
44 |
+
} else if (iframe.msRequestFullscreen) { // IE/Edge
|
45 |
+
if (document.msFullscreenElement) {
|
46 |
+
document.msExitFullscreen();
|
47 |
+
} else {
|
48 |
+
iframe.msRequestFullscreen();
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
</script>
|
54 |
</head>
|
55 |
<body>
|
|
|
57 |
<p>
|
58 |
(If it isn't working press TAB)
|
59 |
</p>
|
60 |
+
<input type="file" accept=".html" onchange="handleFileSelect(event)"><br><button onclick="toggleFullscreen()">Toggle Fullscreen</button>
|
61 |
+
|
62 |
<br>
|
63 |
<iframe id="output" width="100%" height="1000px"></iframe>
|
64 |
</body>
|
|
|
86 |
</html>
|
87 |
|
88 |
|
89 |
+
|