-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresult.html
146 lines (146 loc) · 6.51 KB
/
result.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Result - NGGANGL</title>
<link rel="stylesheet" href="https://nggaaa.github.io/resource/ngl.css" />
<link rel="icon" type="image/png" sizes="180x180" href="/faviconme.png" />
<script>
function getFileId(url) {
let fileId = "";
let startIndex = url.indexOf("d/") + 2;
let endIndex = url.indexOf("/view");
fileId = url.substring(startIndex, endIndex);
return fileId;
}
let params = new URLSearchParams(new URL(location.href).search);
var output = `
<code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>send anonymous message</title>
<link rel="stylesheet" href="https://nggaaa.github.io/resource/ngl.css" />
</head>
<body class="bg-violet-100 transition duration-300">
<div id="myModal"></div>
<div class="container">
<div
class="flex flex-wrap min-h-screen items-center justify-center py-24"
>
<div class="w-full md:w-3/4 lg:w-1/2 h-1/2 p-6 bg-white rounded-lg">
<div class="p-6">
<img
src="https://drive.google.com/uc?id=${getFileId(
params.get("drive")
)}"
class="rounded-full mx-auto"
style="width: 8rem"
alt=""
/>
</div>
<h1 class="text-center font-extrabold text-3xl">
Kirim pesan anomim
</h1>
<h2 class="text-center font-bold text-xl">@${params.get(
"instagram"
)}</h2>
<form
id="my-form"
action="${params.get("appscript")}"
class="py-6"
>
<div class="mb-6">
<label for="" class="font-medium text-base text-black block mb-3">
Pesan
</label>
<textarea
name="pesan"
required
rows="5"
placeholder="Ketikkan pesanmu disini..."
class="w-full border-[1.5px] border-form-stroke rounded-lg py-3 px-5 font-medium text-body-color placeholder-body-color outline-none focus:border-primary active:border-primary transition disabled:bg-[#F5F7FD] disabled:cursor-default"
></textarea>
</div>
<button
type="submit"
id="btn-submit"
class="py-4 px-10 block lg:px-8 xl:px-10 w-full items-center justify-center text-center text-white text-base bg-violet-700 hover:bg-opacity-90 font-normal rounded-md"
>
Kirim
</button>
</form>
</div>
</div>
</div>
<script>
window.addEventListener("load", function () {
const form = document.getElementById("my-form");
form.addEventListener("submit", function (e) {
e.preventDefault();
const data = new FormData(form);
const action = e.target.action;
fetch(action, {
method: "POST",
body: data,
}).then(() => {
document.getElementById("myModal").innerHTML = "<div class='bg-black bg-opacity-90 z-[10] fixed top-0 left-0 w-full min-h-screen h-full flex items-center justify-center px-4 py-5'><div class='w-full max-w-[570px] rounded-[20px] bg-white py-12 px-8 md:py-[60px] md:px-[70px] text-center'><h3 class='font-bold text-dark text-xl sm:text-2xl pb-2'>Pesanmu Terkirim</h3><span class='inline-block bg-violet-700 h-1 w-[90px] mx-auto rounded mb-6'></span><p class='text-base text-body-color leading-relaxed mb-10'>Ditunggu yaa :)</p><div class='flex flex-wrap justify-center -mx-3'><div class='w-1/2 px-3'><a href='/' class='block text-center w-full p-3 text-base font-medium rounded-lg bg-violet-700 text-white border border-primary hover:bg-opacity-90 transition'>Oke</a></div></div></div></div>";
});
});
});
</script>
</body>
</html>
</code>`;
window.addEventListener("load", function () {
document.getElementById("showscript").innerHTML = output;
});
</script>
<link rel="stylesheet" href="/prism.css" />
<script src="/prism.js"></script>
</head>
<body class="bg-violet-100 transition duration-300">
<div id="myModal"></div>
<div class="container">
<div
class="flex flex-wrap min-h-screen items-center justify-center py-24"
>
<div class="w-full md:w-3/4 lg:w-1/2 h-1/2 p-6 bg-white rounded-lg">
<div class="p-6">
<!-- file id foto kamu -->
<img
src="/android-chrome-512x512.png"
class="rounded-full mx-auto"
style="width: 8rem"
alt=""
/>
</div>
<h1 class="text-center font-extrabold text-xl">
Copy Kode Di Bawah. Buat file baru bernama
<code class="bg-pink-100">index.html</code>.<br />Lalu paste
</h1>
<div class="py-6">
<div class="mb-10">
<pre
class="language-html mb-6"
id="showscript"
style="height: 20rem"
></pre>
</div>
<p></p>
<a
href="/create.html"
class="py-4 px-10 block lg:px-8 xl:px-10 w-full items-center justify-center text-center text-white text-base bg-pink-500 hover:bg-opacity-90 font-normal rounded-md"
>
Buat Lagi
</a>
</div>
</div>
</div>
</div>
</body>
</html>