Skip to content

Instantly share code, notes, and snippets.

@snluu
Last active October 11, 2015 10:38
Show Gist options
  • Save snluu/3846438 to your computer and use it in GitHub Desktop.
Save snluu/3846438 to your computer and use it in GitHub Desktop.
Example of a page embedding shawty
<script>
function shawty(data) {
if (data.success) {
document.write(
'<a href="' + data.short +
'">Short URL to the current page</a>');
}
}
</script>
<script src="//luu.bz/shawty.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment