-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpanel.html
More file actions
63 lines (54 loc) · 1.38 KB
/
panel.html
File metadata and controls
63 lines (54 loc) · 1.38 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>N60 Panel</title>
<style>
body{background:#111;color:#fff;font-family:Arial;display:flex;justify-content:center;align-items:center;height:100vh}
.box{background:#000;padding:25px;width:500px}
input,textarea,button{
width:100%;
margin-top:10px;
background:#111;
color:#fff;
border:1px solid #333;
padding:10px
}
</style>
</head>
<body>
<div class="box">
<input id="filename" placeholder="حط اسم ملفك">
<textarea id="script" rows="12" placeholder="حط سكربتك هنا"></textarea>
<button onclick="openRAW()">RAW</button>
</div>
<script>
let user = localStorage.getItem("currentUser");
let users = JSON.parse(localStorage.getItem("users") || "{}");
if(!user || !users[user]) location.href="index.html";
filename.oninput = () => {
let name = filename.value.trim();
if(!name) return;
if(!users[user].files[name]){
users[user].files[name] = "";
localStorage.setItem("users", JSON.stringify(users));
}
script.value = users[user].files[name];
};
script.oninput = () => {
let name = filename.value.trim();
if(!name) return;
users[user].files[name] = script.value;
localStorage.setItem("users", JSON.stringify(users));
};
function openRAW(){
let name = filename.value.trim();
if(!name) return;
window.open(
"raw.html?u=" + user + "&f=" + name,
"_blank"
);
}
</script>
</body>
</html>