deyz112 / fauxbar

Automatically exported from code.google.com/p/fauxbar
0 stars 0 forks source link

Add an API allowing other extensions to query Fauxbar for suggestions #121

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I propose exposing a simple messaging-based API that allows other extensions to 
query Fauxbar's suggestion engine. This would allow other UI-altering 
extensions (e.g. Vimium) to effectively replace the omnibox without needing to 
reimplement all the fancy search and ranking logic already present within 
Fauxbar.

I have implemented this functionality and am using it happily in my own 
browser. In short, I simply split the function that provides suggestions to the 
omnibox into two parts: one that returns a list of "suggestion" objects with 
the raw data, and one that decorates these results with tags like <match> 
before passing them to the omnibox callback. The API then is just a connection 
listener that collections raw suggestions corresponding to a query and sends 
them back to the requesting extension. 

The changes I made are available in my Github repo: 
https://github.com/drewfrank/Fauxbar-API/tree/api .

Original issue reported on code.google.com by drewfr...@gmail.com on 6 Jul 2012 at 4:40