aboutsummaryrefslogtreecommitdiffstats
path: root/firefox-addon
diff options
context:
space:
mode:
Diffstat (limited to 'firefox-addon')
-rw-r--r--firefox-addon/lib/main.js5
-rw-r--r--firefox-addon/package.json7
2 files changed, 10 insertions, 2 deletions
diff --git a/firefox-addon/lib/main.js b/firefox-addon/lib/main.js
index c5446f2..cc8845e 100644
--- a/firefox-addon/lib/main.js
+++ b/firefox-addon/lib/main.js
@@ -7,9 +7,10 @@ var XMLHttpRequest = require("sdk/net/xhr").XMLHttpRequest;
function log(url, title){
var xhr = new XMLHttpRequest();
xhr.open("POST", prefs.callbackUrl);
- var data = "url=" + url;
+ var data = "url=" + encodeURIComponent(url);
data += "&time=" + Date.now();
- data += "&title=" + title;
+ data += "&title=" + encodeURIComponent(title);
+ data += "&key=" + encodeURIComponent(prefs.key);
xhr.send(data);
}
diff --git a/firefox-addon/package.json b/firefox-addon/package.json
index af6f529..6c89753 100644
--- a/firefox-addon/package.json
+++ b/firefox-addon/package.json
@@ -12,5 +12,12 @@
"title": "CallbackĀ URL",
"description": "URL to be notified on page load/show.",
"value": "http://localhost:8080"
+ },
+ {
+ "name": "key",
+ "type": "string",
+ "title": "Browser key",
+ "description": "Key to identify the browser.",
+ "value": "firefox"
}]
}