From 6f0b93a1817aede17c5d8a86eb2409a32fb8ab25 Mon Sep 17 00:00:00 2001 From: mounderfod Date: Fri, 14 Jul 2023 16:40:46 +0100 Subject: Level 3 IndieWeb --- mentions.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 mentions.js (limited to 'mentions.js') 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"); + } + ); + }); +}); -- cgit 1.4.1-2-gfad0