Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Issue #180 - Adds support for the correct share object

  • Loading branch information...
commit 5bde8f280cf3af21e429d0bda058e1e233c7634f 1 parent 545ce26
Paul Kinlan authored
View
3  server/demos/inspirationmator/layouts/application.html
@@ -5,7 +5,6 @@
<link rel="stylesheet" href="/styles/application.css">
<link rel=icon href="favicon.ico" />
<intent action="http://webintents.org/edit" type="image/*" href="index.html" />
- <intent action="http://webintents.org/pick" type="image/*" href="pick.html" />
</head>
<body onload="show_box_load();" class="hide">
<div class="nother">
@@ -40,4 +39,4 @@
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
-</html>
+</html>
View
1  server/demos/inspirationmator/pages/index.html
@@ -27,7 +27,6 @@
<div id="actions">
<div class="btn-h"><span id="save" class="btn">Save <span aria-hidden="true" data-icon="c" class="icon"></span></span></div>
<div class="btn-h"><span id="share" class="btn">Share <span aria-hidden="true" data-icon="R" class="icon"></span></span></div>
- <div class="btn-h"><span id="sharelink" class="btn dbl">Share Page <span aria-hidden="true" data-icon="R" class="icon"></span></span></div>
<div class="btn-h"><span id="done" class="btn dbl" style="display:none">Done<span aria-hidden="true" data-icon="R" class="icon"></span></span></div>
</div>
{% endblock %}
View
18 server/demos/inspirationmator/static/scripts/index.js
@@ -111,7 +111,6 @@ var updateImage = function(data) {
$('#done').hide();
$('#save').show();
$('#share').show();
- $('#sharelink').show();
$('#actions').show();
}
});
@@ -125,7 +124,6 @@ $(function() {
$('#actions').show();
$('#share').hide();
$('#save').hide();
- $('#sharelink').hide();
$('#done').show();
$('#done').click(function() {
@@ -149,7 +147,6 @@ $(function() {
$('#container').click(function() {
$('#save').hide();
$('#share').hide();
- $('#sharelink').hide();
$('#done').hide();
$('#actions').hide();
@@ -168,13 +165,16 @@ $(function() {
$('#share').click(function() {
var url = "http://www.inspirationmator.com/image/" + imageID + ".png";
- var i = new Intent("http://webintents.org/share", "image/*", url);
- startActivity.call(window.navigator, i);
- });
+ var params = {
+ "action": "http://webintents.org/share",
+ "type": "image/png",
+ "data": {
+ "url": url,
+ "blob": data
+ }
+ };
- $('#sharelink').click(function() {
- var url = "http://www.inspirationmator.com/image/" + imageID + ".html";
- var i = new Intent("http://webintents.org/share", "text/uri-list", url);
+ var i = new Intent(params);
startActivity.call(window.navigator, i);
});
Please sign in to comment.
Something went wrong with that request. Please try again.