Created
May 26, 2011 20:17
-
-
Save octatone/993980 to your computer and use it in GitHub Desktop.
usage for blog buttons
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
button_options = document.createElement( 'script' ); | |
button_options.type = 'text/javascript'; | |
button_options.text = "reddit_url = '" + data.songs.song[0].reddit_url + "';\n"; | |
button_options.text += "reddit_title = '" + data.songs.song[0].reddit_title + "';\n"; | |
button_options.text += "reddit_target = 'radioreddit';\n"; | |
button_options.text += "reddit_newwindow = 1;\n"; | |
button_script = document.createElement( 'script' ); | |
button_script.type = 'text/javascript'; | |
button_script.src = 'http://reddit.com/static/button/button1.js'; | |
document.getElementById("test_area").appendChild(button_options); | |
document.getElementById("test_area").appendChild(button_script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment