Apple - Force installing untrusted Safari extensions
Copied from: Safari 9 - I cannot install extensions
To install a .safariextz file, go to:
- System Preferences > Keyboard > Shortcuts > Keyboard (for OS X 10.11.4+)
or
- System Preferences > Keyboard > Shortcuts > Full Keyboard Access (for OS X 10.11.1 to 10.11.3)
Then at the bottom of that dialog box, change the Full Keyboard Access:... option from Text boxes and lists only to All controls. You can then dismiss that System Preferences window.
Then, return to installing the extension. Double click your Safari Extension file and when the "Are you sure you want to install..." dialog box appears, do not click on the Trust button. Instead, use tab to select the Trust button and then confirm by hitting space. That should install the extension as required.
So after contacting one of the developers of an "untrusted" extension, they pointed out that this can be done normally in safe mode. You can boot your Mac in safe mode by holding down Shift when booting.
Beware that your Mac performs really slow in safe mode, so download the extension you want to install before booting in safe mode.
This is the Apple Documentation page which points out there's no need for all extensions to be hosted on Safari Extensions Gallery.
Try using the tab key to select "trust" and the space bar to click it. For whatever reason, this works for me.