From 80eba28a610b7993a2de669c09830c190f56cd15 Mon Sep 17 00:00:00 2001 From: Ian Gallagher Date: Tue, 19 Oct 2010 00:17:08 -0700 Subject: [PATCH 1/2] Add handlers for Windows Live and Gowalla --- xpi/handlers/gowalla.js | 14 ++++++++++++++ xpi/handlers/live.js | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 xpi/handlers/gowalla.js create mode 100644 xpi/handlers/live.js diff --git a/xpi/handlers/gowalla.js b/xpi/handlers/gowalla.js new file mode 100644 index 0000000..12c3a85 --- /dev/null +++ b/xpi/handlers/gowalla.js @@ -0,0 +1,14 @@ +// Authors: +// Ian Gallagher + +register({ + name: 'Gowalla', + url: 'https://gowalla.com/home', + domains: [ 'gowalla.com' ], + sessionCookieNames: [ '__utma' ], + + identifyUser: function () { + var resp = this.httpGet(this.siteUrl); + this.userName = resp.body.querySelectorAll('.contentnode a')[1].textContent; + } +}); diff --git a/xpi/handlers/live.js b/xpi/handlers/live.js new file mode 100644 index 0000000..d390fac --- /dev/null +++ b/xpi/handlers/live.js @@ -0,0 +1,32 @@ +// Authors: +// Ian Gallagher +register({ + name: 'Windows Live', + url: 'http://live.com', + domains: [ 'live.com' ], + sessionCookieNames: [ + 'MSPProf', + 'MSPAuth', + 'RPSTAuth', + 'NAP', + /* + 'BP', + 'MH', + 'LD', + 'mkt0', + 'wlidperf', + 'ANON', + 'MUID', + 'wlp', + //'UIC', + 'wla42', + 'HIC' + */ + ], + + identifyUser: function () { + //var resp = this.httpGet(this.siteUrl); + //this.userName = resp.body.querySelector("#idWinLiveIdValue").textContent.trim(); + this.userName = "Alice, or perhaps Bob"; + } +}); From 0256125a822572a684ccb1902d5e3319963a29fb Mon Sep 17 00:00:00 2001 From: Ian Gallagher Date: Tue, 19 Oct 2010 00:28:04 -0700 Subject: [PATCH 2/2] Improve Evernote hadnler * Fix duplicate entries showing up for the same session --- xpi/handlers/evernote.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xpi/handlers/evernote.js b/xpi/handlers/evernote.js index fc07af5..6b5fbca 100644 --- a/xpi/handlers/evernote.js +++ b/xpi/handlers/evernote.js @@ -6,6 +6,11 @@ register({ domains: [ 'evernote.com' ], sessionCookieNames: [ 'auth' ], + processPacket: function () { + var utma_cookie = this.firstPacket.cookies['__utma']; + this.sessionId = utma_cookie; + }, + identifyUser: function () { var resp = this.httpGet(this.siteUrl); this.userName = resp.body.querySelectorAll("#nav td")[2].textContent.match(/Sign out \((.*)\).*/)[1];