Skip to content

Instantly share code, notes, and snippets.

@lnikkila
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lnikkila/c63422c7a69e160900c0 to your computer and use it in GitHub Desktop.
Save lnikkila/c63422c7a69e160900c0 to your computer and use it in GitHub Desktop.
<a id="alert-twitter"
href="https://twitter.com/intent/tweet?text=%40lnikkila+Hey%2C+this+link+is+dead%3A&amp;url=">
Twitter link
</a>
<a id="alert-email"
href="mailto:hello@lnikki.la?subject=Found+a+dead+link&amp;body=Hey%2C+this+link+is+dead%3A+">
Email link
</a>
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
<script>
(function() {
var twitter = document.getElementById('alert-twitter');
var email = document.getElementById('alert-email');
twitter.href += encodeURIComponent(window.location);
email.href += encodeURIComponent(window.location);
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment