Wednesday, July 11, 2007

Google Bookmarks 'bookmarklet' link in Safari

If you are unable to use the Google Bookmarks 'bookmarklet' in Safari, the workaround is to manually add a bookmark and use the following javascript code for the address.

javascript:(function(){a=window;b=document;c=encodeURIComponent;d=a.open("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();
The issue is the spaces and quotes in the original javascript code do not appear to be correctly decoded in Safari.

6 comments:

Nathan Novielli said...
This comment has been removed by the author.
Stuart said...

I'm not aware of one - but I think it would be possible...

Anonymous said...

this works in IE 6 with popup blocker disabled.

thanks for sharing.

Sameer Dhoot
http://sameer.dhoot.in

Paweł K. said...

Works great :) Thank you - I've missed this little button :)

Someone else said...

Thank the lord! Google bookmarks button is essential. Good work for sorting this out. Much appreciated.

jwdoom said...

Love it! Thanks.