aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2013-10-11 16:44:00 +0200
committerMatěj Cepl <mcepl@redhat.com>2013-10-11 16:44:00 +0200
commit743cb7e2184fff16c71817f78a17daef3cc01752 (patch)
tree03cf8fc31259c0ee2e0f69f6b144207cf563eb19
parent2cf7929b16071d895137bdf509c574b0550e663e (diff)
downloadimportLDIF-activity.tar.gz
More attempts towards changing the app into activity handler.activity
-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": {