The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Github Bookmarklet For User Pages

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Gabriel Horner

Posts: 62
Nickname: cldwaker
Registered: Feb, 2009

Gabriel Horner is an independent consultant who can't get enough of Ruby
Github Bookmarklet For User Pages Posted: Apr 6, 2009 9:58 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Gabriel Horner.
Original Post: Github Bookmarklet For User Pages
Feed Title: Tagaholic
Feed URL: http://feeds2.feedburner.com/tagaholic
Feed Description: My ruby/rails/knowledge management thoughts
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Gabriel Horner
Latest Posts From Tagaholic

Advertisement

I have a confession to make. I use github all the time. In order to feed the addiction, I decided to logically awesomeize github’s user page. What ensued was a jQuery plugin/bookmarklet which enhances the github user page with repository sorting. And yes, my addiction has only gotten worse.

Test Drive

Copy the bookmarklet:

Github User Page Bookmarklet

When you’re on a github user page (exemplar awesome dude), paste the above bookmarklet in your address bar and hit enter. While you’re waiting for it to fetch the user’s data, you’ll see a bookmarklet status box. Once it’s loaded you should notice two major changes: a sort box above the first repository and the number of watchers and forks in their upper right hand corner of each repository. For defunkt’s page, it’ll look like this:

bookmarklet example

With the sort box, you can now sort a user’s repositories by name, fork count or watchers count in ascending or descending order!

Install

So if you like the bookmarklet and want to use it again, here are some ways to install/reuse this bookmarklet:

  • You can drag the above bookmarklet link to your bookmarks toolbar. When you’re on a github user page, click on it to start the bookmarklet.
  • If you’re on firefox, you can use the ubiquity extension to create a command to execute the bookmarklet as a command from your address bar.
  • For a browser-independent web command similar to ubiquity, I’d recommend queriac. Since I use it often and am its primary developer, I’m slightly biased. Here’s the queriac command for this bookmarklet.
  • If you want the bookmarklet on all the time, you can make a greasemonkey script from this bookmarklet and put it up on their script repository.

If you make a web command from this bookmarklet, let me know and I can link back to it here.

Innards

If you want to play with the bookmarklet, clone/fork it on github:


git clone git://github.com/cldwalker/github_user_page.js.git

Here’s a quick explanation of how it works:

  1. Detects the github username from the current url.
  2. Displays a bookmarklet status box.
  3. Fetches the user’s json data per the github api.
  4. Iterates over the page’s repositories, adding additional repo stats from the json object.
  5. Load the sort plugin which we use to sort the repositories.
  6. Replace the status box with a sort box that allows sorting on multiple repository fields.

Gotta Go

If you enjoyed this bookmarklet, you may also enjoy these bookmarklets/web commands:

If you have github bookmarklets/web commands you’d like to share, please share below.

A merci beacoup to the sort plugin author and to the jquery author without which this bookmarklet would’ve never have happened.

Read: Github Bookmarklet For User Pages

Topic: Optional Static Typing, Redux Previous Topic   Next Topic Topic: Click to Call on stage with Sinatra, Rack and Passenger

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use