GitHub Favorites: A Google Chrome Extension

tl;dr: I made a Chrome Extension. Find the source code here. Install it from here.

Last weekend I was talking to some coworkers about a glorious idea I had for a website. The basic gist was that it would be a site like Hacker News, but only of links to resources and documentation that were related to hacking and programming. No punditry or introspection allowed. And each post would be taggable, so that at a later point you could search and easily find a link you had seen earlier.

I thought the idea brilliant, my coworker not so much. He posted a link to Delicious, asked how was my idea different, and promptly killed my dream.

Ok maybe it wasn’t that harsh but he had a point. As I had conceived it there wasn’t enough of a difference between my idea and Delicious to warrant an investment of time and thought.

But I still wanted to code something. Something preferably small.

As we hashed out and destroyed my idea I remembered another idea that had appealed to me before. GitHub allows you to watch repos, and whatever repo you watch you see its activity in your stream. This is Nice and Good but some repos tend to be more noisy than others. This leads to a stream of commits and comments from one repo without being able to see any others.

It’a been suggested to GibHub (via HN) to add the ability to Favorite or Bookmark a repo. GitHub either isn’t interested in this feature or hasn’t come up with an implementation they are happy with as I have yet to see the appearance of a Favorite button.

So this past week I took it upon myself to create this feature. I’ve built my first Chrome Extension that I’m calling GitHub Favorites. It’s a very simple tool: it adds a Favorites button next to a repos Watch button and when clicked it adds that repo as to your bookmarks in the newly created GitHub Favorites folder. Simple as pie (TM).

Creating a Chrome Extension was as straight forward as I had imagined. There were a few gotchyas: a content script (script that runs directly on a web page) can’t access chrome.* API extensions, nor can it access the page’s functions and variables.

This meant I had to either include my own reference to jQuery for DOM manipulation or go directly to the JavaScript DOM API. I chose the latter and immediately missed the coziness of jQuery’s bling (read: $).

But it was worth it. I think. The native JS DOM API wasn’t horrible. But jQuery is so much nicer…*drools*

You can find the source code to the extension on its GitHub page and install it from its Chrome Extension page. Please let me know if you have any bug or feature requests. And please enjoy. I hope it saves your sanity (as it did mine) when dealing with you GitHub stream.

Google Chrome: New Release and New Promo Video

If you’re not aware: the program you are using right now to read my website is called a browser. Specifically a web browser because it ‘browses’ the web.

Currently there are five major browsers that are used: Internet Explorer, Safari, Firefox, Google Chrome, and Opera. Depending on what you primarily use the internet for decides what browser is the best choice for you. And really, at the end of the day, the browser you use is your choice, so choose the one you enjoy using the most.

Personally I prefer a browser that is fast. And by fast I mean it’s the fastest out of all the browsers. Today my choice is Google Chrome. And today a new version of Google Chrome was released that I think you should try.

The Google Chrome blog describes in detail how much faster the new release is due to improvements in the browser’s code. However that isn’t the main reason why I’m excited about this new release. The blog describes it best:

“Additionally, this is the first Chrome beta that features initial integration of the Adobe Flash Player plug-in with Chrome, so that you can browse a rich, dynamic web with added security and stability — you’ll automatically receive security and feature updates for Flash Player with Chrome’s auto-update mechanism.”

What does that mean for you? Flash, which lets you watch videos on YouTube and similar websites, will be automatically installed and updated for you to the newest, fastest, and safest release. All without you having to do anything. How’s that for easy street?

But the team that makes Google Chrome wasn’t content to stop there. They have gone ahead and made a video (with the help of video-makers) that gives a neat frame of reference for just how fast Google Chrome is. Have a look at the video below, and after you’re done watching download the new release by clicking here. Let me know if you like the browser.