Skip to content

Instantly share code, notes, and snippets.

@BinaryMuse
Created November 19, 2010 22:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save BinaryMuse/707345 to your computer and use it in GitHub Desktop.
Save BinaryMuse/707345 to your computer and use it in GitHub Desktop.
FireSheep handler for Moodle
register({
name: 'moodle.domain.com',
url: 'http://moodle.domain.com/',
icon: 'http://moodle.domain.com/theme/mytheme/favicon.ico',
domains: [ 'moodle.domain.com' ],
sessionCookieNames: [ 'MoodleSession', 'MoodleSessionTest' ],
identifyUser: function() {
var site = this.httpGet('http://moodle.domain.com/user/view.php');
this.userName = site.body.querySelector('div.logininfo a').text;
this.userAvatar = site.body.querySelector('img.userpicture').src;
}
});
@BinaryMuse
Copy link
Author

https://github.com/codebutler/firesheep/wiki/Writing-Handlers for more information. The selectors in identifyUser may be different depending on your version of Moodle or the theme you're using. Replace all instances of moodle.domain.com with your own URL, obviously.

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