Skip to content

Instantly share code, notes, and snippets.

@aaronpk
Last active March 17, 2019 14:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronpk/6207445 to your computer and use it in GitHub Desktop.
Save aaronpk/6207445 to your computer and use it in GitHub Desktop.
Display webmention count with no jQuery or external Javascript libraries
<span id="webmention-count"></span>
<script type="text/javascript">
function loadWebmentions(data){
document.getElementById("webmention-count").innerHTML = data.count + " mentions";
}
</script>
<script type="text/javascript" src="http://webmention.io/api/count?jsonp=loadWebmentions&amp;target=http://example.com/page/100"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment