Home > Blog Posts > Dev > I Made Another Chrome Extension

I Made Another Chrome Extension

Tags:

dev
Published: Feb 05 2018

Estimated Read Time:

The extension is available in Chrome (direct link). The underlying javascript function is on github as well (github link).

What Is It?

The extension is just one javascript function. When run it opens all the comment threads on the current subreddit. There is a small piece that adds the opened links to local storage so that it won't open the same links more than once in 24 hours. 

Why Is It?

I generally visit a few subreddits and click through interesting or even all comments once per day. Sometimes twice. There are two problems I was having with this. First, this is slow. Clicking all the links was a little time consuming. Not much but a little. Second, I use middle click (scroll wheel) to open links in a new tab. The problem is that I love my mouse but it's pretty sensitive and the wheel will scroll off the link and make me miss constantly. I solved these by just making it a single button in the browser that would open all the links for me.

Benefits?

I save a bit of time. If I do this task every day that is a lot of savings. It also has the benefit that it keeps my skills a little sharp. The task is small and focused. I knew what I wanted at every step and even with something so simple I could see there was some depth or further improvements I could make. It gave me a chance to brush up on adding an extension to Chrome as well. I made the script without any libraries so that even if you don't want this extension you can use the script and alter it to your liking.

One example of something that is useful. Local storage and JSON. I use both of these to hold the opened links' data. Both of these are heavily used in many frameworks and problems and will likely help in the future. 

Updates?

I don't have any plans to update the script any time soon. It solves the task I wanted it to solve. There are things that could be improved though. For example, the extension only saves the links it opens. This means that if I open a link on the page and then click the extension it will still open because these functions are disconnected. This could be solved by adding an event on link click or page load that adds the url to the list of opened links. Other things might be options to only open a subset (instead of the full page). 

Related Posts:

Previous:
How I Keep Track of Job Applications

Next:
Bringing Value