I am writing a fairly complex browser extension for Chrome, Firefox and Safari.
In Chrome and Firefox, I can specify which script content is injected into which sites based on URL match.
Safari does not offer any such (fine-grained) functions - they only allow one white / black list for all sites.
Is there any way to do this? If not, how can I conditionally load a Javascript file? (bearing in mind, I cannot add them to the DOM).
I tried yepnope , but it is added to the DOM.
Note. I do not want to add logic to the actual files, since they are essentially library code that is duplicated over extensions.
source
share