Created
October 5, 2012 14:21
-
-
Save josemvidal/3840034 to your computer and use it in GitHub Desktop.
Bookmarklet Code
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
<p>Grab our <a id="bookmarklet" href="">Pin It</a> bookmarklet and put it on your bookmarks bar.</p> | |
<!-- The script below sets the href above with the correct host, so it'll work both on localhost:8080 | |
and on the real host. --> | |
<script> | |
link = document.getElementById('bookmarklet'); | |
link.href = "javascript:(function(){ _my_script=document.createElement('SCRIPT');_my_script.type='text/javascript';_my_script.src='http://" | |
+ location.host + "/js/bookmarklet.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_my_script);})();" | |
</script> |
How do i put link in this code? Please tell me, how can i use this code to create a bookmarklet. Thanks
sus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you are awesome