forked from LafeLabs/trashbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scrollset.html
169 lines (148 loc) · 3.99 KB
/
scrollset.html
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAABEAERABEAAAEQABAAEQAAAAEAEAEAAAAAABAQEAAAAAEAAREAEAAAERERERERAAABAAERABAAAAAAEBAQAAAAAAEAEAEAAAABEAAQABEAAAEQABAAEQAAAAABEQAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" rel="icon" type="image/x-icon" />
<!--Stop Google:-->
<META NAME="robots" CONTENT="noindex,nofollow">
</head>
<body>
<table id = "toptable">
<tr>
<td>
<a href = "index.html">
<img src = "iconsymbols/home.svg"/>
</a>
</td>
<td>
<a href = "fork.html">
<img src = "iconsymbols/fork.svg"/>
</a>
</td>
</tr>
</table>
<table>
<tr>
<td style = "text-align:right">SOURCE SERVER:</td>
<td>
<input id = "sourceinput"/>
</td>
</tr>
<tr>
<td style = "text-align:right">THIS SERVER HERE:</td>
<td>
<input id = "hereinput"/>
</td>
</tr>
</table>
<a href = "scrollsetreplicator.php" id = "fetchlink">
(!)CLICK TO FETCH SET FROM SOURCE TO HERE(!)
</a>
<textarea id = "textio"></textarea>
<script>
var localurl = window.location.href.split("scrollset.html")[0];
document.getElementById("hereinput").value = localurl;
scrollset = {};
var httpc = new XMLHttpRequest();
httpc.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
scrollset = JSON.parse(this.responseText);
if(scrollset.server.charAt(scrollset.server.length-1) != "/"){
scrollset.server = scrollset.server + "/";
}
document.getElementById("sourceinput").value = scrollset.server;
var httpc9 = new XMLHttpRequest();
httpc9.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
scrolls = JSON.parse(this.responseText);
scrollset.scrolls = scrolls;
document.getElementById("textio").value = JSON.stringify(scrollset.scrolls,null," ");
savejson();
};
}
httpc9.open("GET", "dir.php?filename=scrolls", true);
httpc9.send();
}
};
httpc.open("GET", "fileloader.php?filename=data/scrollset.txt", true);
httpc.send();
document.getElementById("sourceinput").onchange = function(){
scrollset.server = this.value;
if(scrollset.server.charAt(scrollset.server.length-1) != "/"){
scrollset.server = scrollset.server + "/";
}
savejson();
}
function savejson(){
var url = "filesaver.php";
var httpc2 = new XMLHttpRequest();
httpc2.open("POST", url, true);
httpc2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
httpc2.send("data="+encodeURIComponent(JSON.stringify(scrollset,null," "))+"&filename=data/scrollset.txt");//send text to filesaver.php
}
</script>
<style>
#buttontable{
position:absolute;
right:0px;
top:0px;
}
#buttontable td{
width:12em;
text-align:center;
}
#inputtable{
position:absolute;
bottom:1em;
left:1em;
}
#inputtable table{
width:80%;
}
#inputtable tr{
width:100%;
}
#textio{
position:absolute;
right:1px;
top:2em;
height:80%;
width:40%;
}
#feed{
position:absolute;
top:50%;
bottom:0px;
left:0px;
right:0px;
overflow:scroll;
}
#serverinput{
width:100%;
}
body,div,textarea,input{
background-color:#9f8767;
font-family:Comic Sans MS;
font-size:24px;
}
a{
font-family:courier;
font-size:24px;
color:blue;
}
.button{
cursor:pointer;
border:solid;
}
.button:hover{
background-color:#00ff0080;
}
.button:active{
background-color:#ffff0080;
}
.box img{
width:3em;
}
</style>
</body>
</html>