Skip to content

Instantly share code, notes, and snippets.

@burningTyger
Forked from BinaryMuse/moodle.js
Created March 21, 2011 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save burningTyger/880299 to your computer and use it in GitHub Desktop.
Save burningTyger/880299 to your computer and use it in GitHub Desktop.
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;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment