Skip to content

Commit

Permalink
#150 clearing up the share example
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKinlan committed Jan 23, 2012
1 parent 511b944 commit 8cee529
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{% extends "examples/layouts/base.html" %}
{% content scripts %}
<!doctype html>
<html>
<head>
<script src="//webintents.org/webintents.min.js"></script>
<script src="/javascripts/events.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
</style>
<script>
attachEventListener(window, "load", function() {

Expand Down Expand Up @@ -53,8 +60,8 @@
}, false);

</script>
{% endblock %}
{% block content %}
</head>
<body>
<h2>Client App</h2>
<p>This is an external app that needs to share links. It has no prior knowledge of any other sharing application.</p>
<section>
Expand All @@ -79,5 +86,6 @@ <h2>Share an image</h2>
[ imageData ]);

window.navigator.startActivity(intent);</pre>
</section>
{% endblock %}
</section>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<intent
action="http://webintents.org/share"
type="image/*"
href="share_image.html"
href="image.html"
title="Kinlan's Image Share" />
<script>
attachEventListener(window, "load", function(e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<intent
action="http://webintents.org/share"
type="text/uri-list"
href="sharelink.html"
href="link.html"
disposition="inline"
title="Kinlan's Link Share" />
<script>
Expand Down
9 changes: 5 additions & 4 deletions server/examples/pages/intents/share/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<intent
action="http://webintents.org/share"
type="image/*"
href="share_image.html"
href="image.html"
title="Kinlan's Image Share" />
<intent
action="http://webintents.org/share"
type="text/uri-list"
href="share_link.html"
href="link.html"
disposition="inline"
title="Kinlan's Link Share" />
{% endblock %}
Expand All @@ -43,12 +43,13 @@ <h2>Share Intent Registration</h2>
<pre>&lt;intent
action="http://webintents.org/share"
type="image/*"
href="shareimage.html"
href="image.html"
title="Kinlan's Image Share" /&gt;

&lt;intent
action="http://webintents.org/share"
type="text/uri-list"
href="sharelink.html"
href="link.html"
title="Kinlan's Link Share" /&gt;</pre>
<p>Any application that launches a startActivity with an action of "http://webintents.org/share" will see these applications listed.</p>
</div>
Expand Down

0 comments on commit 8cee529

Please sign in to comment.