summary refs log tree commit diff stats
path: root/mentions.js
diff options
context:
space:
mode:
authormounderfod <mounderfod@gmail.com>2023-07-14 16:40:46 +0100
committermounderfod <mounderfod@gmail.com>2023-07-14 16:40:46 +0100
commit6f0b93a1817aede17c5d8a86eb2409a32fb8ab25 (patch)
tree642426993a6942bcc255e47700d4e9e2d3723384 /mentions.js
parent31f65887ac5972d487610bec9e0e69bf8b9fa72b (diff)
downloadwebsite-6f0b93a1817aede17c5d8a86eb2409a32fb8ab25.tar.gz
Level 3 IndieWeb
Diffstat (limited to 'mentions.js')
-rw-r--r--mentions.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/mentions.js b/mentions.js
new file mode 100644
index 0000000..83a1c5a
--- /dev/null
+++ b/mentions.js
@@ -0,0 +1,13 @@
+jQuery(function ($) {
+  $("*[data-webmention-count]").each(function (i, e) {
+    $.getJSON(
+      "https://webmention.io/api/count",
+      {
+        target: $(e).data("url"),
+      },
+      function (data) {
+        $(e).text(data.count + " mentions");
+      }
+    );
+  });
+});