spopkin.github.io

A browser extension for keyboard navigation in Chrome

Navigation


View My GitHub Profile

Visit My LinkedIn Page

2018-03-18: Please note that this site is presently undergoing construction, as I have decided to switch over to Jekyll.

Apostrophe Browser Extension

Apostrophe is a browser extension that I have developed for use with Google Chrome and the open-source Chromium that it is based on. Apostrophe allows the user to search all of the links on a given page to see if it matches some given text, as well as to navigate in this means.

In simpler terms, it is a quick and dirty means to replicate the "Quick Find" keyboard shortcut for Firefox that allows for very keyboard-heavy navigation and use.

GitHub: https://github.com/spopkin/apostrophe

Chrome Web Store: https://chrome.google.com/webstore/detail/apostrophe-navigation-ext/flddhoonfbaphfihmkoklkghmhmdhemh

Why Do It?

My main Linux laptop has a slow, but dual-core CPU. As such, it is decent at multiprocessing and multithreaded functionality, but not so good at heavy number crunching on a single thread.

While both Chrome and Firefox both support multiprocess functionality, the privacy extensions that I like to install disable it on Firefox, making Chrome/Chromium perform better on my laptop.

As such, I aim to switch to Chromium (Chrome's open source base) for a little while, at least until Firefox catches back up. Unfortunately, navigation purely by keyboard is a little bit of a pain in Chromium and Chrome, as they lack Firefox's link search shortcut.

Since I am someone who likes to optimize his workflow anyway, I took this opportunity to make an extension to do what I want.

How it is Used

The extension adds an invisible search bar to every page, which is made visible by pressing the apostrophe key.

Pressing the escape key will close the search bar.

While the search bar is focused, any text typed by the user will be searched for in all of the links in the page. The first instance will be highlighted.

Pressing Enter will click on the selected link. Ctrl-Enter opens the selected link in a new tab.

F2 can be used to cycle through all of the links that match the typed text.

List of Technologies and Techniques Used:

How it Works

Basically, the extension is based around a Chrome extension content script. This script loads on every website served over http or https.

It keeps track of variables such as the most recently searched for text and most recently selected link and registers a keyboard event listener connected to a handful of functions that alter the variables accordingly. It's a bit of a messy system, but it more or less follows an "observer" model.

Design Decisions






Return to projects page.