Converting Greasemonkey Scripts
SafariExtension object. For more information, see Injecting Scripts and Injecting Styles.
One important difference is how you access your extension’s settings. The settings API isn’t directly available to injected scripts because they are run as part of the web content layer. To access settings, dispatch a message from the injected script to the global page via the
SafariContentBrowserTabProxy object. Because the global page is part of the application layer, scripts running in it can access your extension’s settings. Then dispatch a message that contains the settings information from the global page back to the injected script.
Safari extensions must be digitally signed before they can be installed. To get your signing certificate, visit the Safari Dev Center.