Skip to content

Instantly share code, notes, and snippets.

View PaulKinlan's full-sized avatar

Paul Kinlan PaulKinlan

View GitHub Profile

Shortcuts API Specification

This explainer is for the Shortcut API

Introduction

Some platforms like Windows and Android have ways to add menu items to the app launcher icon itself, here after called shortcuts. These can perform certain app actions. On Android in addition, you can drag these shortcuts to the homescreen.

@triblondon
triblondon / README.md
Last active August 29, 2015 14:13
Edge conf 5: London 2015

#Early draft of Edge conf 5

This was a discussion of the schedule for Edge 5, which is now finalised, and the information below is out of date. See the website for current details.

##Format

Edge 5 will feature a single track of 4 sequential panel discussions on topics of universal importance and topicality to the web community, followed by lunch and then 12 breakout sessions across 4 tracks, in which face to face discussions of specific current and future web topics can be had in boardroom style with groups of up to 50.

/**
* Get requestAutocomplete data. Can only be called as part of an interaction event
* listener such as mouse up/down, click, key & touch.
*
* @param {{billing: boolean, shipping: boolean}} opts
* If billing is true, credit card & billing address details will be requested.
* If shipping is true, a shipping name & address will be requested.
* @param {function(response:Object<string, string>)} callback [description]
* You callback is passed a single response object in this format:
* {
@addyosmani
addyosmani / headless.md
Last active July 18, 2023 18:47
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

var i = new Intent({
"action": "http://webintents.org/save",
"type": "image/*",
"data": blob
})
var onsuccess = function(data) {
var img1 = document.getElementById("img1");
img1.src = URL.createObjectURL(data);
};
@ahmednuaman
ahmednuaman / detect_if_dom_is_ready.js
Created March 8, 2011 16:52
Using document.readyState to see if the DOM is ready
var timer = setInterval( function()
{
if ( /loaded|complete/.test( document.readyState ) )
{
clearInterval( timer );
// go!
}
}, 10 );
@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||