A Workaround to Get Rid of the Annoying Alert in Safari 11

Dec 20, 2017

Problem: security in Safari 11 improved, but …

Most of the time i use Safari for browsing, it’s good to see that Safari 11 become more secure than before. In Safari 11 (or maybe in 10.12.2+), when you click on a link which opens an installed application with a custom URL scheme associated on your Mac, you will get a popup alert asks “Do you want to allow this page to open …”.

As an example, when i want to clone a repository from Github with GitHub Desktop app:

This behavior is under the security policy, which is nice; but if everytime i click a link with custom app scheme, the alert pops up, that will really annoy me.

Workaround: a Safari App Extension

To solve the problem, i need to create a Safari App Extension AlertFilterSafariExtension. The extension will detect all the link clicking after webpage loaded, filter out the links with custom app scheme, then ignore the popup alert and perform the default action of link clicking.

Download link of the extension:
https://github.com/diatoming/AlertFilterSafariExtension/release

For more details, please check the repository:
https://github.com/diatoming/AlertFilterSafariExtension

#macOS #Safari App Extension