Skip to content

Instantly share code, notes, and snippets.

@schacon
Created November 4, 2010 04:20
Show Gist options
  • Save schacon/662128 to your computer and use it in GitHub Desktop.
Save schacon/662128 to your computer and use it in GitHub Desktop.
BitBucket FireSheep Handler
register({
name: "BitBucket",
domains: [ "bitbucket.org" ],
sessionCookieNames: [ "sessionid" ],
identifyUser: function () {
var resp = this.httpGet(this.siteUrl);
this.userName = resp.body.querySelectorAll('#main-nav ul li a span')[1].innerHTML.replace(/\(/, "").replace(/\)/, "");
var resp2 = this.httpGet(this.siteUrl + this.userName + '/');
this.userAvatar = resp2.body.querySelector('dl.userinfo dd img').src
}
});
@kennethreitz
Copy link

Hahaha. This is pure awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment