javascript protocol

19 views
Skip to first unread message

rick shide

unread,
Feb 20, 2013, 11:13:41 PM2/20/13
to ezlink...@googlegroups.com
pls don't prepend the domain to javascript pprotocols in the URL field of custom bookmarks.

For example if I set  javascript:alert("XXX{);void 0  as the custom URL, clicking that custom search button n the toolbar takes me to, for examplle,  http://google.com/javascript:alert("XXX{);void 0   if I'm at the google homepage.

Erik Z

unread,
Feb 21, 2013, 9:50:07 AM2/21/13
to ezlink...@googlegroups.com
Hi Rick,
What exactly are you trying to accomplish? Do you want the search buttons in the preview to launch bookmarklets that affect the preview page? Do you want to perform javascript functions on the selected text in the main page?

Currently the code takes your custom javascript and puts it as the url of the preview IFRAME.  For me, if I set one of m button's url to:

javascript:alert("XXX{0}");void(0);  (NOTE: {0} to substitute text, closed the ", semicolon at end, parentheses around 0)

When I click the button I do get the alert box.

I do not prepend any domain info in the ezLinkPreview code, chrome must be doing this for you.  Make sure you have well formed javascript and you are running the stable release of chrome.

Please provide me with more details so I can help you out.
Erik
Reply all
Reply to author
Forward
0 new messages