How to allow Javascript from the Smart Search Field in Safari

One of the latest discoveries I’ve done is that Safari does not allow, by default, javascript code in the Smart Search Field. To be honest, I do not know if is a new security measure, what I know is that before the installation of Mavericks (OSX 10.9) I was able to do it, now I’m not any more.

This is a quick screenshot of the error message I’ve got.


First step: how to show develop menu in Safari

To show develop menu in Safari I need to go in the browser’s preferences, by clicking on Safari -> Preferences using the top menu or by simply clicking cmd + comma on the keyboard (how much I love shortcuts…)


Once done, go in Advanced field and then tick “Show develop menu in menu bar”, as shown in the picture below.


Second step: allow Javascript from the Smart Search Field

As magic we have the “Develop” menu in the top menu of our Mac. All we need to do is click on the last line, as shown in the pic below.


Third step: enjoy

Now we can use javascript in the Smart Search Field in Safari, which is useful, for example, to obtain coordinates from a Google Maps using this code:


Here is the final result:


If it seems not to work, try to restart Safari and try again.


We will be happy to hear your thoughts

Leave a reply