summary refs log tree commit diff stats
path: root/mentions.js
diff options
context:
space:
mode:
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");
+      }
+    );
+  });
+});