-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Safari web extension [WIP] #3885
Conversation
32885c6
to
b7b7f11
Compare
Looking into the API availability a bit, and it seems like the Edit, dito for |
|
BTW, if I only write extensions and always use them by |
Hmm, I tried just creating a local |
Yeah, I think that should be possible, although I guess the "load unsigned" stuff might toggle off after restarting etc. as well, haven't looked into it much myself though. |
I've managed to fix the |
No. Your change will prevent pages using JavaScript listeners and doing whatever they want. Please consider about update |
Hmm, I think I understand the problem, although I'm not able to get it working the way I thought. I guess we could just tailor the behaviour specifically for if Utils.isSafari() && modifiers.metaKey {
simulateClickDefaultAction(element, modifiers)
} |
637cf0d
to
b7b7f11
Compare
I've also looked into the yanking/pasting a bit, and I managed to get the yanking working by using the Clipboard API, although I can't get pasting working through that. Perhaps because it needs to happen in a user-interaction chain, some more info here. Re: the clipboard-API, would it be safe to switch to using that, instead of using the |
Well, an ideal way is to hook the process of event propagation, and append But the code will be too complicated ... Seems we have to skip normal event dispatching directly. |
I'm not sure. I suggest we only call |
As far as I know, there will not exist any reliable method to read or paste from an extension, in Manifest V3 (https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/), which is very annoying, but it seems nothing can be done. |
@cheif hey, thanks for the work! I just managed to build and install your branch locally here. Honestly, it works just fine! The most pressing part now seems to be how to properly release a first version considering that annual fee that was mentioned above. |
If GitHub sponsors/some other contribution method is enabled I'll gladly donate the amount for the Apple developer account registration. |
I'm happy to cover the annual fee. I just haven't gotten around to
reviewing this and trying this out. I will once I get some time. Thank
you @cheif for all of the great work thus far.
…On Wed, Aug 25, 2021 at 10:57 AM Cooper Pellaton ***@***.***> wrote:
If GitHub sponsors/some other contribution method is enabled I'll gladly
donate the amount for the Apple developer account registration.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3885 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACDFVYLXWZXZBZBHV654DT6UVJBANCNFSM5CB2LYAQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I believe I found a couple problems this morning which I am not sure if it is happening only on my side.
|
|
I was able to reproduce the problem a few times with both inspectors open, but they did not show anything useful there. By reloading the page everything goes back to normal. Sorry, couldn't provide more info. |
Has anything changed with regards to Web Extensions on Safari this past year? |
Description
This creates a Safari web extension-wrapper around the current code, with the idea of being able to run Vimium natively in Safari (See #3610). I've basically just taken the steps from other users in that issue and wrapped it up in a PR for now, with the hope that we can collaborate on this here.
Status
Right now this is runnable, but not everything is working, as in #3610 (comment) some commands doesn't work (see below).
How to test
Vimium/Vimium.xcodeproj
in XCode (You'll need XCode, I'm running XCode 12.5)Develop>Web Extension Background Pages>Vimium
in Safari.Things to test
Known bugs:
yy
, visual mode copy,P
, etc.)B
doesn't have access to bookmarks (bookmarks
-API isn't supported in safari)F
loads a URL in the currently selected tab rather than a new oneX
doesn't seem to restore the last closed tab (sessions
-API isn't supported in safari)Questions/considerations
Vimium
folder with an.xcproj
, this is what was created by runningxcrun safari-web-extension-converter
, but might not be the desired folder structuremain.js
is running conditionally on whether or not we're onchrome
, is this safe, or should we find a way to trigger it in similar conditions in safari?manifest.json
was changed to have a broadermatches
for one.css
file, is this safe or do we need to do something smarter here?