Safari Extension Questions
Posted
by Rob Wilkerson
on Stack Overflow
See other posts from Stack Overflow
or by Rob Wilkerson
Published on 2010-06-11T22:38:22Z
Indexed on
2010/06/11
22:42 UTC
Read the original article
Hit count: 447
safari
|safari-extension
I'm in the process of building my first Safari extension--a very simple one--but I've run into a couple of problems. The extension boils down to a single, injected script that attempts to bypass the native feed handler and redirect to an http:// URI. My issues so far are twofold:
- The "whitelist" isn't working the way I'd expect. Since all feeds are shown under the "feed://" protocol, I've tried to capture that in the whitelist as "feed://*/*" (with nothing in the blacklist), but I end up in a request loop that I can't understand. If I set blacklist values of "http://*/*" and "https://*/*", everything works as expected.
- I can't figure out how to access my settings from my injected script. The script creates a
beforeload
event handler, but can't access my settings using thesafari.extension.settings
path indicated in the documentation.
I haven't found anything in Apple's documentation to indicate that settings shouldn't be available from my script. Since extensions are such a new feature, even Google returns limited relevant results and most of those are from the official documentation.
What am I missing?
Thanks.
© Stack Overflow or respective owner