Open darajava opened 8 years ago
Was it impossible to keep the input
and add your logic on it rather than crafting a new one? This would fix #27.
No, that's not possible (well maybe it is) but when you submit their search input, it does some mad stuff as it's a single page app, and not simply requesting a form. No matter what I did, I couldn't intercept submission of that input.
I don't really know jQuery that well. I was thinking about something like binding RET on the input that is already present. Depending on whether YouTube itself uses jQuery (and you use your own version, not too sure what kind of sorcery this may breed), you might need to empty the list of event for RET or preventDefault
. This also requires you to handle click events on search candidates (and the markup looks quite troublesome/random to find with jQuery).
Or you could just build your own suggestion dropdown?
But this is just speculative, as I don't know neither of YouTube's APi nor your code.
I will create this myself in a future update.
not sure if this one is possible to fix..