Skip to content

Commit 5bde8f2

Browse files
committed
Issue #180 - Adds support for the correct share object
1 parent 545ce26 commit 5bde8f2

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

server/demos/inspirationmator/layouts/application.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<link rel="stylesheet" href="/styles/application.css">
66
<link rel=icon href="favicon.ico" />
77
<intent action="http://webintents.org/edit" type="image/*" href="index.html" />
8-
<intent action="http://webintents.org/pick" type="image/*" href="pick.html" />
98
</head>
109
<body onload="show_box_load();" class="hide">
1110
<div class="nother">
@@ -40,4 +39,4 @@ <h1>{% block headline %}{% endblock %}</h1>
4039
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
4140
})();
4241
</script>
43-
</html>
42+
</html>

server/demos/inspirationmator/pages/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ <h2>Click to create your own<br />inspirational image.</h2>
2727
<div id="actions">
2828
<div class="btn-h"><span id="save" class="btn">Save <span aria-hidden="true" data-icon="c" class="icon"></span></span></div>
2929
<div class="btn-h"><span id="share" class="btn">Share <span aria-hidden="true" data-icon="R" class="icon"></span></span></div>
30-
<div class="btn-h"><span id="sharelink" class="btn dbl">Share Page <span aria-hidden="true" data-icon="R" class="icon"></span></span></div>
3130
<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>
3231
</div>
3332
{% endblock %}

server/demos/inspirationmator/static/scripts/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ var updateImage = function(data) {
111111
$('#done').hide();
112112
$('#save').show();
113113
$('#share').show();
114-
$('#sharelink').show();
115114
$('#actions').show();
116115
}
117116
});
@@ -125,7 +124,6 @@ $(function() {
125124
$('#actions').show();
126125
$('#share').hide();
127126
$('#save').hide();
128-
$('#sharelink').hide();
129127

130128
$('#done').show();
131129
$('#done').click(function() {
@@ -149,7 +147,6 @@ $(function() {
149147
$('#container').click(function() {
150148
$('#save').hide();
151149
$('#share').hide();
152-
$('#sharelink').hide();
153150
$('#done').hide();
154151
$('#actions').hide();
155152

@@ -168,13 +165,16 @@ $(function() {
168165

169166
$('#share').click(function() {
170167
var url = "http://www.inspirationmator.com/image/" + imageID + ".png";
171-
var i = new Intent("http://webintents.org/share", "image/*", url);
172-
startActivity.call(window.navigator, i);
173-
});
168+
var params = {
169+
"action": "http://webintents.org/share",
170+
"type": "image/png",
171+
"data": {
172+
"url": url,
173+
"blob": data
174+
}
175+
};
174176

175-
$('#sharelink').click(function() {
176-
var url = "http://www.inspirationmator.com/image/" + imageID + ".html";
177-
var i = new Intent("http://webintents.org/share", "text/uri-list", url);
177+
var i = new Intent(params);
178178
startActivity.call(window.navigator, i);
179179
});
180180

0 commit comments

Comments
 (0)