I was researching how to create bookmarklets for use with mobile safari and I ran across this problem:
I'm not sure why am unable to find any questions on this topic. And my Google searches came up with nothing as well. But it appears that iOS has completely disallowed JavaScript being entered into the address bar of mobile safari. There is a message that appears like this one:
They've even gone so far as to ensure that when you're editing a bookmark on mobile Safari, There is no way to escape Single quotes or double quotes and they have completely disabled double-quotes from the keyboard - thus handicapping the user's ability to create a bookmark with those characters in it.
So is there any way to make a bookmarklet that actually does anything? For instance, Can I create a bookmarklet that'll allow me to link to a particular website using the selected text as a parameter into the url?
And it just me or is this something new?
To enable the JavaScript in Safari Browser, you need to open the Settings on your iOS device and then go to the advanced option. Under the advance option, toggle the button of the JavaScript and turn it ON.
The solution to bookmarklets in mobile Safari is to just not use the address bar. Create a bookmark for some random site, and edit it afterwards. I.e.:
google.com
or some other random siteThat's it. A little awkward, but it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With