aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--importAddrBook.js12
-rw-r--r--manifest.webapp12
2 files changed, 24 insertions, 0 deletions
diff --git a/importAddrBook.js b/importAddrBook.js
index 97f4466..ebbd358 100644
--- a/importAddrBook.js
+++ b/importAddrBook.js
@@ -168,6 +168,18 @@
document.body.addEventListener("submit",
submitHandler, false);
+
+ navigator.mozSetMessageHandler('activity', function(activityRequest) {
+ var option = activityRequest.source;
+
+ if ((option.name === "view") || (option.name === "open")) {
+ // Do something to handle the activity
+ console.log("option.data = " + option.data);
+// var URL = document.getElementsByName("URL")[0].value;
+
+ }
+ });
+
};
}());
diff --git a/manifest.webapp b/manifest.webapp
index cbd931a..f86fa2e 100644
--- a/manifest.webapp
+++ b/manifest.webapp
@@ -18,6 +18,18 @@
},
"disposition": "inline",
"href": "/index.html"
+ },
+ "view": {
+ "filters": {
+ "type": "url",
+ "url": {
+ "required": true,
+ "regexp": "\\.ldif$",
+ "pattern": "\\.ldif$"
+ }
+ },
+ "disposition": "inline",
+ "href": "/index.html"
}
},
"permissions": {