-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.mjs
More file actions
45 lines (38 loc) · 1.54 KB
/
script.mjs
File metadata and controls
45 lines (38 loc) · 1.54 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
import GDAPI from "./GDAPI.js";
import StringUtils from "./StringUtils.mjs";
//import Client from "./node_modules/gd.js/esm/index.js"; // grrrrrrrr
const api = new GDAPI();
//const client = new Client();
debugTest();
run();
async function run() {
var args = [
"\n %c %c %c Geometry Dash Site LOADED",
'background: #ff66a5; padding:5px 0;',
'background: #ff66a5; padding:5px 0;',
'color: #ff66a5; background: #030307; padding:5px 0;'
];
console.log.apply(this, args);
if (document.URL.includes("user")) {
let nameText = document.getElementById("nameText");
let params = document.URL.split("?");
let urlParams = new URLSearchParams(params[1]);
let id = urlParams.get("id");
console.log(await api.getUser(id));
// let user = await client.users.getByAccountID(parseFloat(id));
// console.log(user.username);
// nameText.innerText = "Name: " + user.username;
// let xhr = new XMLHttpRequest();
// xhr.open("GET", "https://boomlings.com/database/getGJUserInfo20.php");
// xhr.setRequestHeader("secret", "Wmfd2893gb7");
// xhr.setRequestHeader("targetAccountID", id);
// xhr.setRequestHeader("Access-Control-Allow-Origin", "*");
// console.log(xhr.send());
}
}
// Test my StringUtils, this is used to decode Geometry Dash's user information
function debugTest() {
let test = "1:YesCool:2:Yippee";
let stringUtils = new StringUtils();
console.log(stringUtils.SplitNum(test, ":"));
}