-
Notifications
You must be signed in to change notification settings - Fork 231
Support for Safari? #986
Comments
I don't have plans for it currently, but that's not to say it can't be done; I don't really have a testing environment for it currently. It may still be up to @FooSoft to decide if he wants to do anything with that. |
Has Safari switched to the same Web Extension model as Chrome and Firefox? Last time I looked at it several years ago, it was very different, and would require many changes to the code. I don't really see anything happening for Safari, honestly. It would be an additional development burden, and would steal @toasted-nutbread away from doing all his amazing work for Chrome and Firefox (which together cover the vast majority of the user base) 🙂 |
Hi, just passing through to say I recently discovered Yomichan (had used rikaichan/kun for decades) and would love to see Safari support. Safari (especially on M1 macs) is seeming to be the best choice for browser for Mac users. Searching around (especially reddit) I found several other users like myself wanting to stick with Safari but looking for some Yomichan alternative. Of course, I have no idea what the complexity is to do so (now I'm curious myself). Of course one consideration is MacOS/iOS has the native dictionary/Lookup feature which some compromise for (I myself use it constantly on iOS apps for readings). Love the app and the incredible work you've all done to expand and support it! Cheers! edit: Well, I tried the Apple-provided Web Extension converter and it did not "Just Work" sadly. It did mostly look correct but couldn't get the popup to display. There were several warnings running the tool, probably one of these really is crucial I suppose (or something else, who knows...)
|
Noted, I'll try to look into seeing how compatible Yomichan is with Safari's web extension implementation. |
I've done some initial investigation into supporting Safari, and my current take-away is that their implementation of Web Extensions has some bugs which cause Yomichan to not work correctly. This is not to say it is entirely impossible, but it would take some reworking of Yomichan's internals for it to work properly, which is unfortunate, since it's an issue only for Safari. https://stackoverflow.com/questions/65058757/sendmessage-not-received-by-options-page-onmessage-in-safari |
@toasted-nutbread I've roughly tested a speculation of the bug on sending/listening messages in Safari. At least, The search function seems to be perfectly fine either as I can log the dictionary entries. The problem occurred when creating a popup. Line 286 in 0556c50
await . Thus, the popup can't be displayed.
Edit: I'm using Xcode 13 Beta to convert and build the extension. Not sure if that makes difference. |
It's been a few months since I tested, but I was definitely having issues with sendMessage actually being received in certain contexts. I believe the messages weren't being received by extension pages, but were being received by content scripts. For example, opening the settings page would usually not be respond since the initial I believe that is part of what was causing I was testing in a VM, so maybe that's part of the issue, I'm not sure. |
@toasted-nutbread Ah, yeah, it really stuck at I'm not sure what is the problem in Line 104 in 0556c50
Promise should already resolved by Line 174 in 0556c50
|
I'm only guessing, but the existing problem is deemed to be the top of the iceberg? Not really sure how many problems actually exists. I know that Yomichan is much more complex, but Safarikai might be a similar example that's working well in Safari. With html injection method is somehow similar? One of the difference is that they use |
The problem isn't so much that the issue can't be worked around; it could be addressed with some effort to replace However, the issue still seems to ultimately reside on Safari's end, where it just doesn't send the messages properly. Clicking the extension button would usually result in messages getting through (e.g. the search page would sometimes start responding after clicking that button). This seems similar to the |
it would be nice to get safari support. one perk would be that it would make it available on iphone and ipad as well. |
would you guys be willing to accept paid sponsorship to implement safari, but more specifically ios/ipad os support? @FooSoft @toasted-nutbread |
The comments below are solely my own and I do not speak on behalf of any other Yomichan contributors: This gets into the sponsorship question raised in #2123, so I have a brief response in there. Specifically for this issue, the issues are more of the following:
|
I understand your hesitation and won't push any further than this comment. The long term maintenance burden was something I hadn't considered. It also makes sense not wanting to turn something that is a fun open source side project that you are working on into being something you become obligated to work on. Also logistics complicating things is problematic for sure. It's definitely not my goal to earn any particular special priority or favor in general outside of what I would be directly sponsoring. I could pay for an ipad mini, the developer account and would be willing to pay for your time as well depending on how long you would think it would take and what you would think a fair hourly wage would be. If your privacy is important I could pay in bitcoin. if for some reason you change your mind then you can reach out, assuming its something I'm still needing. totally no pressure at all though. |
@xrishox, I've taken a back seat on Yomichan development; the number of projects I maintain has increased but the amount of time I have overall has decreased... @toasted-nutbread has been doing an amazing job running things; support from other contributors has also been invaluable in keeping this project alive. OSS development is really a labor of love, and I strongly believe that the primary purpose of any project is to meet the developer's needs. The moment that you start implementing features or supporting a project that you no longer actively rely on, it becomes a job. Sponsorship can help act as a way of saying "thanks for what you do", but at the same time it can contribute to a feeling of obligation. As pointed out it, things become even weirder when you consider that there exist many contributors who helped make the project be what it is today. It's complicated enough just to think about what happens with licensing, without bringing financials into it. Hardware, accounts, and ongoing technical burden of validating that the extension does not break due to browser changes is a whole other issue. The last one is especially big; even if someone were to do a drive by PR with all of the Safari stuff implemented you could end up at a net loss if you don't personally have any skin in the Apple ecosystem but still have to keep it alive. This is all very similar to the reason that Yomichan would never support any language outside of Japanese. If someone were to add Chinese support, does it mean that toasted or myself would have to learn Chinese just to maintain the project? |
totally fair points. thanks for all that you guys have done and i totally understand! |
Some more testing on Safari reveals that its support for extensions is still not on par with Firefox or Chrome. It doesn't seem to be able to embed
And the other issue that I previously encountered of the settings page not loading properly still exists. |
Here's a Rikaikun fork for Safari if you'd like a reference for working around Safari's quirks: And thanks for all your work trying to get this ported to Safari! |
I've messed around with some of these extensions before, and the Rikai* extensions probably have an easier time since they don't deal with |
With recent updates to Safari, it's easier to port extensions to the browser. Are there any plans on porting yomichan to Safari?
The text was updated successfully, but these errors were encountered: