I need to Run javascript in adress bar.where the js code is contained in external URL.
javascript:(a = (b = document).createElement(“script”)).src = “//domain.com/hi.js”, b.body.appendChild(a); void(0)
The above code works in IE,firefox and chrome,But not on SAFARI…some one help me to make this work in safari,thanks
You’re using fancy quotes (
“”), which aren’t interpreted properly. Try this:All I did was replace the fancy quotes with plain quotes. This should work now.