forked from LafeLabs/trashbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fork.html
183 lines (146 loc) · 5.16 KB
/
fork.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<!--
NO MONEY
NO MINING
NO PROPERTY
EVERYTHING IS PHYSICAL
EVERYTHING IS RECURSIVE
EVERYTHING IS FRACTAL
LOOK AT THE INSECTS
LOOK AT THE FUNGI
LANGUGE IS HOW THE MIND PARSES REALITY
-->
<link href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAwEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAABEAAREQAAABERABERAAAAEREAAREAAAAREAAAABAAAQAAAAAAAQAQAAAAAAAAEQAAAAAAAAEREAAAAAAAAREQAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAM/zAACH4QAAh+EAAMfjAAD73wAA/b8AAP5/AAD8PwAA/D8AAP5/AAD//wAA//8AAP//AAD//wAA" rel="icon" type="image/x-icon" />
<!--Stop Google:-->
<META NAME="robots" CONTENT="noindex,nofollow">
</head>
<body>
<a href = "../">
<img alt = "uplink" src = "iconsymbols/uplink.svg"/>
</a>
<a href = "index.html">
<img alt = "home" src = "iconsymbols/home.svg">
</a>
<table id = "newtable">
<tr>
<td>new fork name:</td>
<td><input/><a id = "dirlink"></a></td>
</tr>
<tr id = "replicatorline">
<td>external replicator url</td>
<td><input/></td>
</tr>
</table>
<ul id = "mainlist">
</ul>
<div id = "deleteonbutton">DELETE MODE ON</div>
<script>
dirlink = document.getElementById("dirlink");
dir = "";
replicator = "";
filesetreplicator = "https://raw.githubusercontent.com/LafeLabs/pibrary/main/fileset/php/replicator.txt";
imagesetreplicator = "https://raw.githubusercontent.com/LafeLabs/pibrary/main/imageset/php/replicator.txt";
codesetreplicator = "https://raw.githubusercontent.com/LafeLabs/pibrary/main/codeset/php/replicator.txt";
symbolsetreplicator = "https://raw.githubusercontent.com/LafeLabs/pibrary/main/symbolset/php/replicator.txt";
mapbookreplicator = "https://raw.githubusercontent.com/LafeLabs/pibrary/main/mapbook/php/replicator.txt";
deleteprotect = true;//set to false to enable deletion of directories
//deleteprotect = false;//set to ture to disable deletion of directories
directories = [];
var httpc2 = new XMLHttpRequest();
httpc2.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
directories = JSON.parse(this.responseText);
for(var index = 0;index < directories.length;index++) {
var newa = document.createElement("A");
newa.innerHTML = directories[index] + "/";
newa.href = directories[index] + "/";
var newli = document.createElement("LI");
newli.appendChild(newa);
document.getElementById("mainlist").appendChild(newli);
}
if(!deleteprotect){
addDeleteButtons();
}
}
};
httpc2.open("GET", "dir.php?type=dir", true);
httpc2.send();
inputs = document.getElementById("newtable").getElementsByTagName("input");
inputs[0].value = "";
inputs[1].value = "";
inputs[0].onchange = function() {
inputs[1].value = "";
dir = this.value;
dirlink.innerHTML = "mkdir.php?dir=" + this.value;
dirlink.href = "mkdir.php?dir=" + this.value;
}
inputs[1].onchange = function(){
dir = inputs[0].value;
dirlink.innerHTML = "mkdir.php?dir=" + dir + "&replicator=" + this.value;
dirlink.href = "mkdir.php?dir=" + dir + "&replicator=" + this.value;
}
function addDeleteButtons(){
dirlist = document.getElementById("mainlist").getElementsByTagName("LI");
for(var index = 0;index < dirlist.length;index++){
var newdeletebutton = document.createElement("span");
newdeletebutton.innerHTML = "DELETE";
newdeletebutton.className = "button";
dirlist[index].appendChild(newdeletebutton);
}
deletebuttons = document.getElementById("mainlist").getElementsByClassName("button");
for(var index = 0;index < deletebuttons.length;index++){
deletebuttons[index].onclick = function() {
thisdir = this.parentNode.getElementsByTagName("A")[0].innerHTML;
var httpc = new XMLHttpRequest();
var url = "rdelete.php";
httpc.open("POST", url, true);
httpc.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
httpc.send("filename=" + thisdir);//send text to deletefile.php
this.parentNode.parentNode.removeChild(this.parentNode);
}
}
}
document.getElementById("deleteonbutton").onclick = function(){
addDeleteButtons();
this.style.display = "none";
}
</script>
<style>
body{
font-size:2em;
background-color:#9f8767;
font-family:Comic Sans MS;
}
input{
background-color:#9f8767;
font-family:Comic Sans MS;
}
table{
}
.button{
cursor:pointer;
}
.button:hover{
background-color:green;
}
.button:active{
background-color:yellow;
}
.button{
cursor:pointer;
color:red;
text-align:center;
border:solid;
}
#deleteonbutton{
cursor:pointer;
border:solid;
border-radius:0.3em;
width:10em;
}
</style>
</body>
</html>