This script was rebuilt and moved into a proper Github repo: https://github.com/mckamey/doubleTap.js
See the old version for a more basic polyfill which only implements the dblclick event.
try{ | |
module("ES5 ranges"); | |
test("ES5 Epoch", function() { | |
// epoch | |
var expected = 0; | |
var actual = new Date(expected); |
/** | |
* perf.js | |
* Simple JS Timer API | |
* | |
* @public | |
* @param {number} alpha weight for EWMA trends (default: 0.2) | |
* @this {Perf} | |
* @constructor | |
*/ | |
var Perf = function(alpha) { |
var safariDebug = ( navigator.platform.indexOf("iPhone") < 0 && navigator.platform.indexOf("iPod") < 0 && navigator.platform.indexOf("iPad") < 0 ); | |
if(safariDebug) | |
{ | |
PhoneGap.run_command = function() | |
{ | |
if (!PhoneGap.available || !PhoneGap.queue.ready) | |
return; |
/*global jQuery */ | |
var App = (function(App, $){ | |
'use strict'; | |
// private members | |
var foo = 0, | |
bar = 'bar'; |
/*global jQuery */ | |
// ensure root namespace | |
var App = App || {}; | |
(function(App, $){ | |
'use strict'; | |
// private members |
/*global jQuery */ | |
// ensure root namespace | |
var App = App || {}; | |
App.foo = (function($){ | |
'use strict'; | |
// private members |
(function (window) { | |
'use strict'; | |
if (window.localStorage && window.sessionStorage) { | |
return; | |
} | |
// initialize if data already stored | |
var data = JSON.parse(window.name || '{}'); |
This script was rebuilt and moved into a proper Github repo: https://github.com/mckamey/doubleTap.js
See the old version for a more basic polyfill which only implements the dblclick event.
/** | |
* Creates a function which fires only once when called in quick succession | |
* @param {function...} action the function to fire | |
* @param {number} delay amount of time until considered done, default:100ms | |
* @param {boolean} asap if should execute at the start of the series (true) or the end (false), default:false | |
* return {function} debounced function | |
*/ | |
var debounce = function(action, delay, asap){ | |
if ('function' !== typeof action) { | |
return null; |
The way you can do this for "http://" URLs (and what I think Apple and Spotify do) this is to:
Register a custom URL scheme [like the other answers have shown][1].
Set up your HTTP URL to point to a real webpage.
Put a script on that page to redirect to your custom URL if is on iOS.
For example, here is a sample page which will take you to the Twitter app for a particular user or the Twitter website depending upon if you are on the web or on your iOS device.