Skip to content

Instantly share code, notes, and snippets.

@dg01d
Created November 12, 2017 15:40
Show Gist options
  • Save dg01d/bf744ba0979a24158f2be540904aeb1d to your computer and use it in GitHub Desktop.
Save dg01d/bf744ba0979a24158f2be540904aeb1d to your computer and use it in GitHub Desktop.
<script id="webmention-hosted">
(function () {
var sn = document.createElement("script"), s = document.getElementsByTagName("script")[0], url;
url = document.querySelectorAll ? document.querySelectorAll("link[rel~=canonical]") : false;
url = url && url[0] ? url[0].href : false;
sn.type = "text/javascript"; sn.async = true;
sn.src = "//webmention.herokuapp.com/api/embed?url=" + encodeURIComponent(url || window.location) + "&version=cutting-edge";
s.parentNode.insertBefore(sn, s);
}());
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment