Skip to content

Instantly share code, notes, and snippets.

Paul Kinlan PaulKinlan

Block or report user

Report or block PaulKinlan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2853874
window.addEventListener("load", function() {
if(window.intent && window.intent.action === "") {
var data =;
if(data instanceof Blob) {
// do something with the blob.
else {
// do something with the object.
View gist:2853817
var i = new Intent({
"action": "",
"type": "image/*",
"data": blob
var onsuccess = function(data) {
var img1 = document.getElementById("img1");
img1.src = URL.createObjectURL(data);
View edit-intent-tag.html
View subscribe.html
<!doctype html>
<intent action="" type="application/atom+xml" />
<script src=""></script>
<button id="go">Go</button>
PaulKinlan / gist:1222849
Created Sep 16, 2011 — forked from ianb/gist:1222633
Web Intent use case brainstorm
View gist:1222849

Use Cases

Screen scrape microdata:

  • grab an ical event (send)
  • grab an hcard
  • atom feed
  • make note of an hreview (actually I can't think of what you'd do with an hreview)
  • ? generic grabbing, or we specifically figure out support for particular kinds of data (i.e., specs)
View dataUriForStylesheet.js
var toDataURI = function(datatype, data) {
return "data:" + datatype +";base64," + window.btoa(data);
var renderStyleSheet = function() {
var link = document.createElement("link");
link.rel = "stylesheet";
link.href = toDataUri("text/css", "body { background-color: red;}" );
You can’t perform that action at this time.