Permalink
Browse files

Issue 180 - Imagemator share now shares the correct object

  • Loading branch information...
PaulKinlan committed Oct 5, 2012
1 parent f3d6f3c commit 12decf236146c17df6cd5ed72a3b83587fda663a
Showing with 12 additions and 1 deletion.
  1. +12 −1 server/demos/imagestudio/static/scripts/index.js
@@ -5,6 +5,7 @@ $(function() {
var imageBlob;
var url;
+ var type = "image/*";
var createBlobFromCanvas = function(c) {
var data = c.toDataURL('image/png');
@@ -25,6 +26,7 @@ $(function() {
};
if(window.intent) {
+ type = window.intent.type;
loadImage(window.intent.data);
}
@@ -55,7 +57,16 @@ $(function() {
});
$('#share').click(function() {
- var intent = new Intent( 'http://webintents.org/share', 'image/*', imageBlob || url);
+ var params = {
+ "action": "http://webintents.org/share",
+ "type": type,
+ "data": {
+ "url": url,
+ "blob": imageBlob
+ }
+ };
+
+ var intent = new Intent(params);
startActivity.call(window.navigator, intent);
});
});

0 comments on commit 12decf2

Please sign in to comment.