diff options
-rw-r--r-- | publish.el | 8 | ||||
-rw-r--r-- | scripts/webring.js | 12 |
2 files changed, 16 insertions, 4 deletions
@@ -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}`); + } +} |