Skip to content

Instantly share code, notes, and snippets.

@minikomi
Created March 1, 2012 06:24
Show Gist options
  • Save minikomi/1947762 to your computer and use it in GitHub Desktop.
Save minikomi/1947762 to your computer and use it in GitHub Desktop.
To do - Github watched list bookmarklet
var user = $(".account-switcher-container .minibutton")
.text()
.replace(/^\s*/, "").replace(/\s*$/, "");
var url = "https://api.github.com/users/"+user+"/watched"+"?callback=?";
$.getJSON(url, function(docs){
$(".news").html("");
$.each(docs.data, function(i,r){
$(".news").append("repo: " + r.name + " ");
$(".news").append("<br/>");
$(".news").append("issues: " + r.open_issues + " ");
$(".news").append("<br/>");
$(".news").append("language:" + r.language + " ");
$(".news").append("<br/>");
$(".news").append("watchers: " + r.watchers + " ");
$(".news").append("<br/>");
$(".news").append("<hr/>");
$(".news").append("<br/>");
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment