aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Janzen <jjanzenn@proton.me>2024-04-28 15:38:17 -0500
committerJacob Janzen <jjanzenn@proton.me>2024-04-28 15:38:17 -0500
commit5d7c1b955b4d7632f667b9d28e6dfcebc2e1dbec (patch)
tree78a79aae3636884e0a43c61d0829eadc3a9a37cf
parent49c0281797049fc0049a39753d2a51e8a065e4f1 (diff)
add test script
-rw-r--r--publish.el8
-rw-r--r--scripts/webring.js12
2 files changed, 16 insertions, 4 deletions
diff --git a/publish.el b/publish.el
index fb0bdc0..f397a0c 100644
--- a/publish.el
+++ b/publish.el
@@ -73,10 +73,10 @@
:with-toc nil
:headline-levels 4
:section-numbers nil
- :html-head "<link rel='stylesheet' href='/css/stylesheet.css' type='text/css'/>"
- :html-preamble "<div class='topnav'><a href='/'>Home</a><a href='/projects.html'>Projects</a><a href='/blog'>Blog</a><a href='/config.html'>Dotfiles</a><a href='/about.html'>About Me</a><a href='/rss.xml'>RSS</a></div>"
- ;; :html-postamble "<div class='footer'><span><a href='/'>« Left Site</a></span><span>Web Ring</span><span><a href='/'>Right Site »</a></span></div>"
- :html-postamble nil)
+ :html-head "<link rel='stylesheet' href='/css/stylesheet.css' type='text/css'/><script src='/scripts/webring.js'></script>"
+ :html-preamble "<div class='topnav'><a href='/'>Home</a><a href='/projects.html'>Projects</a><a href='/blog'>Blog</a><a href='/config.html'>Dotfiles</a><a href='/about.html'>About Me</a><a href='/rss.xml'>RSS</a></div>")
+ ;; :html-postamble "<div class='footer'><span><a href='/'>« Left Site</a></span><span>Web Ring</span><span><a href='/'>Right Site »</a></span></div>"
+
("org-static"
:base-directory "~/website/"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
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}`);
+ }
+}