1/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */ 2! 3function(a) { 4 "use strict"; 5 a.event.special.swipe = a.event.special.swipe || { 6 scrollSupressionThreshold: 10, 7 durationThreshold: 1e3, 8 horizontalDistanceThreshold: 30, 9 verticalDistanceThreshold: 75, 10 setup: function() { 11 var b = a(this); 12 b.bind("touchstart", function(c) { 13 function d(b) { 14 if (g) { 15 var c = b.originalEvent.touches ? b.originalEvent.touches[0] : b; 16 e = { 17 time: (new Date).getTime(), 18 coords: [c.pageX, c.pageY] 19 }, Math.abs(g.coords[0] - e.coords[0]) > a.event.special.swipe.scrollSupressionThreshold && b.preventDefault() 20 } 21 } 22 var e, f = c.originalEvent.touches ? c.originalEvent.touches[0] : c, 23 g = { 24 time: (new Date).getTime(), 25 coords: [f.pageX, f.pageY], 26 origin: a(c.target) 27 }; 28 b.bind("touchmove", d).one("touchend", function() { 29 b.unbind("touchmove", d), g && e && e.time - g.time < a.event.special.swipe.durationThreshold && Math.abs(g.coords[0] - e.coords[0]) > a.event.special.swipe.horizontalDistanceThreshold && Math.abs(g.coords[1] - e.coords[1]) < a.event.special.swipe.verticalDistanceThreshold && g.origin.trigger("swipe").trigger(g.coords[0] > e.coords[0] ? "swipeleft" : "swiperight"), g = e = void 0 30 }) 31 }) 32 } 33 }, a.event.special.swipeleft = a.event.special.swipeleft || { 34 setup: function() { 35 a(this).bind("swipe", a.noop) 36 } 37 }, a.event.special.swiperight = a.event.special.swiperight || a.event.special.swipeleft 38}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.