Skip to content

Commit

Permalink
Add Evernote and Dropbox handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
craSH committed Oct 17, 2010
1 parent b70c7d8 commit f57ded4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions xpi/handlers/dropbox.js
@@ -0,0 +1,18 @@
// Authors:
// Ian Gallagher <crash@neg9.org>
// Dropbox seems to have recently started issuing cookies with the Secure flag set,
// so this handler will not be too useful. But for people who have login sessions
// more than a few weeks old at the time of it's writing, or just something odd that
// happens, it will work.

register({
name: 'Dropbox',
url: 'https://www.dropbox.com/home#:::',
domains: [ 'dropbox.com' ],
sessionCookieNames: [ 'lid' ],

identifyUser: function () {
var resp = this.httpGet(this.siteUrl);
this.userName = resp.body.querySelector("#topnav strong").textContent;
}
});
13 changes: 13 additions & 0 deletions xpi/handlers/evernote.js
@@ -0,0 +1,13 @@
// Authors:
// Ian Gallagher <crash@neg9.org>
register({
name: 'Evernote',
url: 'https://www.evernote.com/Home.action',
domains: [ 'evernote.com' ],
sessionCookieNames: [ 'auth' ],

identifyUser: function () {
var resp = this.httpGet(this.siteUrl);
this.userName = resp.body.querySelectorAll("#nav td")[2].textContent.match(/Sign out \((.*)\).*/)[1];
}
});

0 comments on commit f57ded4

Please sign in to comment.