Created
November 30, 2012 21:01
-
-
Save phatduckk/4178571 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var tumblr_link_url = "http://www.example.com/permalink/my-article"; | |
var tumblr_link_name = "My Awesome Article"; | |
var tumblr_link_description = "<" + "script type='text/javascript'>alert('9');<" + "/script>"; | |
</script> | |
<!-- Put this code at the bottom of your page --> | |
<script type="text/javascript"> | |
var tumblr_button = document.createElement("a"); | |
tumblr_button.setAttribute("href", "http://www.tumblr.com/share/link?url=" + encodeURIComponent(tumblr_link_url) + "&name=" + encodeURIComponent(tumblr_link_name) + "&description=" + encodeURIComponent(tumblr_link_description)); | |
tumblr_button.setAttribute("title", "Share on Tumblr"); | |
tumblr_button.setAttribute("style", "display:inline-block; text-indent:-9999px; overflow:hidden; width:81px; height:20px; background:url('http://platform.tumblr.com/v1/share_1.png') top left no-repeat transparent;"); | |
tumblr_button.innerHTML = "Share on Tumblr"; | |
document.getElementById("tumblr_button_abc123").appendChild(tumblr_button); | |
</script> | |
<script src="http://platform.tumblr.com/v1/share.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment