Browse files

Simplify script injection in the bookmarklet

Wrap the bookmarklet in a function
  • Loading branch information...
1 parent be37cbc commit 4ff5bc203dd37724b718ee660d2b404434a8988d @alexdunae committed Dec 31, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.markdown
@@ -23,7 +23,7 @@ Link the script at the end of your HTML email file and view the file in your bro
You can also create a bookmarklet with the following address:
- javascript:var cmp=document.createElement('script');cmp.type='text/javascript';cmp.src='';var s=document.getElementsByTagName('body')[0];s.parentNode.insertBefore(cmp,s);
+ javascript:(function() {var%20cmp=document.createElement('script');cmp.type='text/javascript';cmp.src='';document.getElementsByTagName('body')[0].appendChild(cmp);}());

0 comments on commit 4ff5bc2

Please sign in to comment.