Permalink
Browse files

Issue #180 - Making Mememator share the correct object

  • Loading branch information...
1 parent 12decf2 commit 545ce26d3260a690808800115633b7d3c82c315b @PaulKinlan committed Oct 5, 2012
Showing with 13 additions and 3 deletions.
  1. +1 −2 server/demos/mememator/pages/index.html
  2. +12 −1 server/demos/mememator/static/scripts/index.js
@@ -17,8 +17,7 @@
<div id="actions" class="cf">
<span id="done" class="btn">Done Editing</span>
<span id="save" class="btn">Save Meme</span>
- <span id="share" class="btn">Share Image</span>
- <span id="sharelink" class="btn">Share Link</span>
+ <span id="share" class="btn">Share Meme</span>
</div>
</div>
{% endblock %}
@@ -206,7 +206,18 @@ $(function() {
$('#share').click(function() {
var canvas = $('#container canvas')[0];
var data = createBlobFromCanvas(canvas);
- var i = new Intent("http://webintents.org/share", "image/png", data);
+ var url = "http://www.mememator.com/image/" + imageID + ".png"
+ var params = {
+ "action": "http://webintents.org/share",
+ "type": type,
+ "data": {
+ "url": url,
+ "blob": data
+ }
+ };
+
+ var i = new Intent(params);
+
startActivity.call(window.navigator, i);
});

0 comments on commit 545ce26

Please sign in to comment.