A Workaround to Get Rid of the Annoying Alert in Safari 11
- 2 minutes read - 227 wordsProblem: 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:
https://github.com/diatoming/AlertFilterSafariExtension/releases
To install:
- Extract and move the app to
/Applications
- Run the app once will install the embeded extension
- Enable “Allow unsigned extensions” in Safari
For more information about how to enable unsigned extension in Safari, please check the section “Enable Your App Extension in Safari” on this page: https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/SafariAppExtension_PG/CreatingandTestingYourFirstSafariAppExtension.html#//apple_ref/doc/uid/TP40017319-CH11-SW1
For more details, please check the repository: