Post

Replies

Boosts

Views

Activity

Reply to Toolbar Button Icons are Blue
The icon appearing in the accent color denotes that the extension has access to the current tab. Thank you for the reply. It seems well intentioned but an unfortunate ui decision. I suppose the color scheme is automatically adopted by all extensions without developer ability to change it to something a bit more pleasing to the eye (like the new privacy extension has)? The new privacy extension seemingly has 2 states - active = normal monochrome/grayscale color and inactive - opacity set to x amount It's seems odd that 3rd party extensions don't automatically adopt that scheme...
Topic: Safari & Web SubTopic: General Tags:
Sep ’20
Reply to Almost every test build I need to re-allow & enable my extension
Sorry for the late replies. This is not about web extensions. I believe I figured out why this was happening. Since I have the current (non-development) build of my extension on my development machine, I always disable the extension before testing. When I test new builds, I test in Safari and a fresh instance of Safari is initialized, which has my non-development extension disabled. That means every time I re-build, I have to re-enable the extension. If I do not disable the extension before building development versions, I seem not to encounter this. It all sounds rather long winded and confusing, but since realizing this, I haven't encountered the issue, so far.
Topic: Safari & Web SubTopic: General Tags:
Jan ’21
Reply to Safari App Extension API vs WebExtensions
I am still hoping for clarification here. To be clear, I am curious if it is possible to accomplish similar results as browser.contextMenus.create({...}), when not using web extensions, but rather the Safari App Extension swift api? Further, if the api doesn't exist for those methods, is it somehow possible to use the web extension api alongside the swift api?
Topic: Safari & Web SubTopic: General Tags:
Mar ’21
Reply to Opening native app from a web extension
I think how you will open the containing app depends on your implementation and from where and how you are trying to do so. Using a custom URL scheme is the way I do it. I can open my containing app from a popup, content script, bundled html page or background by calling the window.open method like so: window.open("customURLscheme");
Topic: Safari & Web SubTopic: General Tags:
Jul ’21
Reply to Safari web extension - background script - sessionStorage
@nbe I never got notified you replied. I am able to set, get and remove session and local storage from my background page/script without issue. I am not using the safari converter however, so perhaps it's an issue with that or how you are going about setting/getting. That being said the person who replied has good advice, I'd do what he says.
Topic: Safari & Web SubTopic: General Tags:
Sep ’21
Reply to SFErrorDomain Code=3 "(null)"
To add some additional clarity, the message that is failing returns an array of of dictionaries [[String: Any]]. It seems that when the array length is greater than 6 the error occurs, however if the array is less than 6 it does not occur.
Topic: Safari & Web SubTopic: General Tags:
Oct ’21
Reply to Using Google Analytics w/Safari Extension
@DSNET to be honest, I don't remember what I ended up doing. I don't use any analytics in my recent extensions, but you can see the source code for the extension I was working on when I made this question here: https://github.com/quoid/coin-ticker - Keep in mind this was the old Safari JS api (hence the 3 year old question)
Topic: Safari & Web SubTopic: General Tags:
Oct ’21
Reply to iOS Safari Extension Memory Limit 6MB
If you're like me and your extension is randomly breaking and you suspect a memory issue, here's what the console message looks like. Be aware it's not a fault or error in the console, this caused me to miss it initially. Side note, I still have no idea how to monitor memory usage in mobile safari whilst developing.
Topic: Safari & Web SubTopic: General Tags:
Oct ’21
Reply to Can a Safari extension detect a page navigation error?
What API would you use to build this? A solution for this off the top of my head, whilst using the WebExtension API goes something like this. JavaScript files of extensions are not loaded for that error page either.  That's right. Content scripts are not loaded in that kind of error page. The background page is loaded however. You could try to listen for browser.webNavigation.onCompleted and then check the currently active tab: browser.tabs.query({currentWindow: true, active: true}, tabs => { const active = tabs[0]; // do something with the tab data }); You could read the active.title and derive if the page failed to load or even run your own fetch and get the status code back and decide what to do from there. I haven't tested this so I can't confirm whether or not browser.webNavigation.onCompleted actually fires for those kind of error pages, but worth a try if you're invested in this.
Topic: Safari & Web SubTopic: General Tags:
Oct ’21