Open cougarten opened 7 years ago
Custom commands are tricky to implement because they involve so many different components of Saka Key including:
But your post inspired me, so I sketched out a proposal for custom commands in #28. I think it should meet your needs. This will be fun to implement, so it should be out by this weekend.
I really like your proposal to use hints mode to activate commands. I've added a todo for this in #18.
If you want to send a GET request, you can use the Fetch API from any Javascript function. I'll add an API to forward fetch requests to the background page because websites may have Content Security Policies that block requests to external domains.
Your suggestion to pass arguments gave me an idea. After activating a command or selecting a hint, you can switch to Args mode, which is just a text box that submits whatever you enter as an argument to your command.
Hi, what is holding this back? The next release of ff is looming so I can probably find some time to implement this feature. Is there any blocker, or just waiting on someone to put in the time?
The main blocker is my lack of time as of late. The other blocker is that there are subtle issues you have to take care of when providing implementing custom commands.
I can share a design that addresses many of these issues if you're interested in helping with the implementation. I've also made some baby steps toward the implementation myself.
I'd appreciate what you have so far. I'm starting to read the code but I'm not too familar with webextensions or saka-key so it will take me a while to get hacking.
Have a look at https://key.saka.io/dev_docs/
Yup, I've been reading through those :)
Hi, looking at the structure of this wonderful plugin it seems trivial to add some custom js, but can you hint me at where to add it (without loosing it with updates etc) and how to bind it?
Simply triggering a bookmarklet-style js and bind it to a key would be great!
I want it to add pages to pocket via (contrary to their old bookmarklet, this undocumented url still works):
javascript:(function(){window.open('https://getpocket.com/edit?url='+escape(window.location.href)', '_self');})
Additional things that would be nice:
window.location.href
(I'd use a new tab with target_blank
than)<args>
would be:javascript:(function(){window.open('https://getpocket.com/edit?url='+escape(window.location.href)+'&tags=<args>', '_self');})
Thank you so much for providing an alternative to the other keyboard-wizardry add-ons that are now becoming legacy. I thought I'd leave FF behind for good (and install your extention on chrome, hehe) and I'm so happy I can stay!