GitHub (Un)Follow Bookmarklet
Inspired by this great protip, I decided to create a simple bookmarklet to simplify the process of following/unfollowing people and organisations on GitHub. Basically, running this bookmarklet toggles the follow state you have with the user/organization in question.
javascript:(function () {
var base = "https://github.com/users/follow?target=",
addr = window.location.pathname.split("/"),
name = addr.pop(),
func = function (response) {
var count = parseInt(response.count, 10);
if (typeof count === "number") {
console.log(name + " is now followed by " + count + " people.");
}
};
$.post(base + name, func);
})();
Just select the code above, and drag it to the Bookmarks Bar of your browser. Now that you have your GitHub (Un)Follow Bookmarklet, you just need to click it once to follow/unfollow anyone.
Remember, you must be on a user/organization GitHub homepage for this to work. I don't take responsibility for its misuse.
Also, keep in mind that this bookmarklet toggles the current following state you have with the user/organization in question (e.g., if you were already following, running this bookmarklet will make you unfollow).