DEV Community

Cover image for A Chrome Omnibox Extension to Search Oracle's Javadoc
Andrew (he/him)
Andrew (he/him)

Posted on


A Chrome Omnibox Extension to Search Oracle's Javadoc

There used to be a really nice Chrome extension for searching Oracle's Javadoc (Java documentation) directly from the "Omnibox" (the search bar at the top of the Google Chrome browser).

But that extension hasn't been maintained since about Java 7 (pre-2014) and as a result was very out of date.

My new extension can be used to search the documentation of any JDK (Java Development Kit) version 9 through 13, inclusive.

Developing an Omnibox extension is a bit of work (especially if you're not very familiar with JavaScript callbacks, like me), but the end result is pretty cool:

Screenshot of a browser using the Javadoc Omnibox extension

Screenshot of a browser using the Javadoc Omnibox extension, just before hitting "return" to see the search result

Screenshot of a browser showing the search result, a page in the Oracle Javadoc

I've never done anything like this before, so my solution is definitely suboptimal (for instance, I simulate a search entry in an input field with key events, rather than interfacing with the search code itself). If anyone who knows a bit of JavaScript would be willing to help out, feel free to submit a pull request!

If you're interested in creating your own Omnibox extensions, there are some examples online. If you know a bit of JavaScript, it's really easy -- just a single function that gets called when the user uses a keyword in the Omnibox. Not very spoopy, but that's my Hacktoberfest contribution to the world!

If you enjoyed this post, please consider supporting my work by buying me a coffee!

Top comments (0)

The JavaScript Brief

1. Top 5 MERN STACK projects to improve your practical understanding

Boost your MERN Stack development skills by undertaking interesting beginner projects. These five engaging projects cover web applications and range from social media website applications to geo-social networking maps. Hone your understanding and apply modern techniques backed up by hands-on experience.

2. How To Optimize Your React App’s Performance

Learn the best optimizing techniques to make your React applications faster and more efficient. Focusing on the identification of performance bottlenecks and common pitfalls to avoid, these optimization strategies will keep your applications running smoothly even when faced with growing complexity.

3. A story of let, const, object mutation, and a bug in my code

In the pursuit of bug-free code, explore an incident involving a mix-up between const and let, making sure your custom code works effectively with third

party documentation. Discover best practices on program flow and learn about JavaScript's unpredictable aspects to ensure your core code is robust.