When does Zen create the new tab? Custom extension is no longer working, could do with some guidance. #5499
Unanswered
n-winspear
asked this question in
Q&A
Replies: 1 comment
-
I found 1 similar thread that might be helpful:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
If this isn't the right place for this question let me know.
TL;DR my extension isn't working with the new tabs update and I need some help working how / when Zen creates a new tabs.
I've been really enjoying Zen since moving over from Arc after it started tanking my battery life regularly.
Since the new tab functionality came in I'm having some trouble with an extension that I built and I'm hoping that people here might know why or can point me in the direction.
I'm not a professional developer, it's just a hobby so could be something I'm doing very wrong 😅
The extension is called Quick Linker and I ported it over from Chromium to Firefox when I moved to Zen. The idea is that you can trigger it as a search shortcut like google, duck duck go, etc an then put in a keyword, e.g. 'yt' and it'll lookup the corresponding URL you've saved and take you there.
It was working fine prior to the new update to how tabs work and now I'm not sure how to make it work again. I believe I've isolated the problem to this code in particular which handles omnibox events and redirection.
When I use Command + L and trigger the shortcut it correctly updates the current tab to the new URL, however when I use Command + T to open a new tab and trigger the shortcut the tabs.query() returns the current tab I'm on rather than a new tab.
The console log in that code outputs an array of tabs like this if I'm on google.com.
I don't really understand when Zen browser 'creates' the new tab. In traditional browsers it happens immediately. In Arc I used a workaround with 'Site Search' as the Arc toolbar didn't use the omnibox api (at least not when I first made the extension).
If someone knows what I'm doing wrong I'd appreciate the help since creating a new tab, googling a random thing, and then using the extension kind of defeats the purpose!
If you need more information please ask I'll try to answer as best I can.
Thanks in advance
N
Beta Was this translation helpful? Give feedback.
All reactions