forked from LafeLabs/trashbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforkdestroyer.html
139 lines (116 loc) · 3.94 KB
/
forkdestroyer.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
<!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
ALL CODE CC0 PUBLIC DOMAIN
-->
<link href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA4A8AAO/vAADqrwAA6q8AAOqvAADqrwAA6q8AAOqvAADqrwAA7+8AAMAHAADf9wAAwAcAAPu/AAD4PwAA" rel="icon" type="image/x-icon" />
<!--Stop Google:-->
<META NAME="robots" CONTENT="noindex,nofollow">
</head>
<body>
<div id = "mainscroll">
<a href = "index.html">HOME</a>
</div>
<script>
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.className = "dirlink";
document.getElementById("mainscroll").appendChild(newa);
var newdeletebutton = document.createElement("span");
newdeletebutton.innerHTML = "DELETE";
newdeletebutton.className = "button";
newa.appendChild(newdeletebutton);
newdeletebutton.onclick = function(){
thisdir = this.parentNode.innerHTML.split("/")[0];
// console.log(thisdir);
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);
}
}
}
};
httpc2.open("GET", "dir.php?type=dir", true);
httpc2.send();
function addDeleteButtons(){
dirlist = document.getElementsByClassName("dirlink");
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.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.removeChild(this.parentNode);
}
}
}
</script>
<style>
#mainscroll{
position:absolute;
overflow:scroll;
left:0px;
right:0px;
top:0px;
bottom:0px;
border-width:10px;
}
body,input,table{
background-color:#9f8767;
font-family:Comic Sans MS;
}
a{
display:block;
color:blue;
margin-left:5em;
margin-bottom:1em;
font-size:2em;
}
.button{
cursor:pointer;
color:red;
}
.button:hover{
background-color:green;
}
.button:active{
background-color:yellow;
}
.button{
cursor:pointer;
color:red;
font-family:courier;
font-size:1.5em;
}
</style>
</body>
</html>