Macs in Chemistry

Insanely great science

 

Enabling Extensions after Update

The latest update to Safari (Version 12) brings a range of features intended to improve online security and privacy. Unfortunately one of the consequences is that only Safari Extensions available from the App Store are enabled and you will get a message that Safari no longer supports unsafe extensions and you are directed to the App Store.

extension

Whilst I'm sure that extensions from major developers will migrate to the App Store I suspect that those Extensions provided by scientists may well not make the transition. This is a shame because some are very useful. However you can build the extension yourself to get around the problem.

Getting the Extension code

Extensions are stored in

/Users/Username/Library/Safari/Extensions

Currently Safari 12 doesn’t remove the extension files for deprecated or inactive extensions. However I'd recommend putting them into a folder for safe-keeping. You can also download some useful extensions here. All have the extension .safariextz, this is a compressed folder, drag the desired extension to your desktop and then you can uncompress it using the ExtractSafariExtensionArchive AppleScript described here and available to download here. This create a folder containing the extension contents on you desktop. If this is a new extension it is probably worth checking the code to ensure there is nothing untoward.

chemblextension

Adding the Extension

The Safari "Develop" menu needs to be enabled to use the Extension Builder, this can be enabled from

Safari → Preferences → Advanced → Show Develop menu in menu bar. advprefs

With the "Develop" menu now accessible you can now select "Show Extension Builder", if you don't have an apple developer account you may also need to select "Allow Unsigned Extensions" as shown below. The first time you open the Extension Builder, you’ll be asked whether you really want to use it instead of Xcode, Click Continue.

extensionbuilder

With Extension Builder open we can now add the extension. Click on the "+" icon in the bottom left corner and select "Add Extension", when directed, open the folder where the extracted files of your extension are. Then click "Run" in the upper right corner of Extension Builder. You should be prompted for your password.

extensionbuilderdetailed

The extension should now be accessible, highlight a chemical name in a webpage and right-click and select "Search for Carbazeran in ChEMBL" from the dropdown menu. The structure should now appear in a small window.

chemblsearch

Unfortunately if you restart Safari the Extension will not be available and will need to repeat the above.

Last Updated 22 September 2018