diff options
author | Jacob Janzen <jjanzenn@proton.me> | 2024-04-28 15:38:17 -0500 |
---|---|---|
committer | Jacob Janzen <jjanzenn@proton.me> | 2024-04-28 15:38:17 -0500 |
commit | 5d7c1b955b4d7632f667b9d28e6dfcebc2e1dbec (patch) | |
tree | 78a79aae3636884e0a43c61d0829eadc3a9a37cf /scripts/webring.js | |
parent | 49c0281797049fc0049a39753d2a51e8a065e4f1 (diff) |
add test script
Diffstat (limited to 'scripts/webring.js')
-rw-r--r-- | scripts/webring.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/webring.js b/scripts/webring.js new file mode 100644 index 0000000..2b08b77 --- /dev/null +++ b/scripts/webring.js @@ -0,0 +1,12 @@ +const xhr = new XMLHttpRequest(); + +xhr.open("GET", "https://aidang.cc/webring/all") +xhr.send(); +xhr.responseType("json"); +xhr.onload = () => { + if (xhr.readyState == 4 && xhr.status == 200) { + console.log(xhr.response); + } else { + console.log(`Error: ${xhr.status}`); + } +} |