visit ie-touch repo for updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ScrollHandler = (function(Math, UA){ | |
| // (C) 2014 - Andrea Giammarchi | |
| // https://gist.github.com/WebReflection/8924001 | |
| var | |
| MINIMUM_SCROLL_DISTANCE = 8, | |
| ONE_EIGHTY_PI = 180 / Math.PI, | |
| atan2 = Math.atan2, | |
| round = Math.round, | |
| sqrt = Math.sqrt, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (/iP(?:od|hone)/.test(navigator.userAgent)) { | |
| // deletable at least, i.e. | |
| // if (window.gestureStart && dontWantIt) { | |
| // document.removeEventListener("gesturestart", gestureStart); | |
| // delete window.gestureStart; | |
| // } | |
| this.gestureStart = (function(metas, i){ | |
| function gestureStart() { | |
| // address .length once per loop | |
| for (i = metas.length; i--;) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! (C) Andrea Giammarchi */ | |
| // @link https://gist.github.com/WebReflection/7461879 | |
| // @example | |
| // isFontLoaded('FontAwesome', '\uf06b') | |
| var isFontLoaded = function(canvas1, canvas2) { | |
| function reset(canvas, fontName) { | |
| var context = canvas.getContext('2d'); | |
| canvas.width = canvas.height = 16; | |
| context.clearRect(0, 0, 16, 16); | |
| context.fillStyle = "rgb(0,0,0)"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! (C) Andrea Giammarchi */ | |
| // @link https://gist.github.com/WebReflection/7311642 | |
| var HorizontalScroll = (function(UA, Math){ | |
| var | |
| // this is horrible, unfortunately needed | |
| bugged = /Android 4\.0/.test(UA), | |
| // AFAIK no proper way to do feature in here detection :-( | |
| preventsAllDefaults = /Android/.test(UA) && | |
| /Chrom(?:e|ium)/.test(UA), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! (C) Andrea Giammarchi */ | |
| (function(window, add, dom, load){ | |
| function ready(collection) { | |
| return function(e) { | |
| while(collection.length) { | |
| collection.shift().call(window, e); | |
| } | |
| collection.K = true; | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*jslint browser: true, indent: 2 */ | |
| var Delayed = (function (delay) { | |
| /*! Andrea Giammarchi - Mit Style License */ | |
| // https://gist.github.com/WebReflection/7286687 | |
| 'use strict'; | |
| // method shared across all delayed wrappers | |
| function clear() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function(dict, from){ | |
| /** | |
| * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| * Version 2, December 2004 | |
| * | |
| * Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
| * | |
| * Everyone is permitted to copy and distribute verbatim or modified | |
| * copies of this license document, and changing it is allowed as long |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*jslint browser: true, plusplus: true, indent: 2 */ | |
| function restyle( | |
| rules, // an object containing selectors and | |
| // a collection of key/value pairs per each | |
| // selector, i.e. | |
| // restyle({ | |
| // 'body > section.main': { | |
| // color: '#EEE', | |
| // 'margin-left': (innerWidth - 200) + 'px' | |
| // } |