-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsplice.fission.php
More file actions
73 lines (69 loc) · 1.46 KB
/
splice.fission.php
File metadata and controls
73 lines (69 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
// hot reload for splice
@$delta = $_GET['data'];
if(isset($delta)){
$delta2 = rand();
file_put_contents('./splice-src/fission.io',$delta2);
exit();
}
?>
<html>
<head>
<title>Splice: Hotreload</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0">
</head>
<body>
<style>
html, body {
padding: 0px;
margin: 0px;
}
#bolt {
width: 100%;
height: 100%;
right: 0px;
border: 0;
}
.loader {
position: fixed;
left: 0px;
top: 0;
width: 100%;
height: 100%;
z-index: 9999;
background-color: #3A3A3A;
}
#splash {
position: absolute;
top: 50%;
left: 50%;
width: 800px;
height: 700px;
margin-top: -350px; /* Half the height */
margin-left: -400px; /* Half the width */
}
</style>
<div class="loader">
<center>
<img src="./splice-src/img/bolt1.gif" id="splash">
</center>
</div>
<iframe id="bolt" src="delta.html"></iframe>
</body>
<script src="./splice-src/js/jquery3.js"></script>
<script>
window.onload = function() {
$(".loader").fadeOut("slow");
}
var socket = "0";
setInterval(()=>{
$.get( "./splice-src/fission.io", function( data ) {
if(data != socket) {
document.getElementById('bolt').src = document.getElementById('bolt').src;
socket = data;
}
});
},200);
</script>
</html>