PageSourceSearch

https://www.wcpl.net/wp-content/themes/wcpl/assets/js/cycle2-swipe.js?ver=7.1.2

js wcpl.net collected 2026-10-04 00:13:37 UTC 1,926 bytes, 54 lines download raw bytes

1/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20141007 */
2!(function (a) {
3  "use strict";
4  (a.event.special.swipe = a.event.special.swipe || {
5    scrollSupressionThreshold: 10,
6    durationThreshold: 1e3,
7    horizontalDistanceThreshold: 30,
8    verticalDistanceThreshold: 75,
9    setup: function () {
10      var b = a(this);
11      b.bind("touchstart", function (c) {
12        function d(b) {
13          if (g) {
14            var c = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
15            (e = { time: new Date().getTime(), coords: [c.pageX, c.pageY] }),
16              Math.abs(g.coords[0] - e.coords[0]) >
17                a.event.special.swipe.scrollSupressionThreshold &&
18                b.preventDefault();
19          }
20        }
21        var e,
22          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),
30            g &&
31              e &&
32              e.time - g.time < a.event.special.swipe.durationThreshold &&
33              Math.abs(g.coords[0] - e.coords[0]) >
34                a.event.special.swipe.horizontalDistanceThreshold &&
35              Math.abs(g.coords[1] - e.coords[1]) <
36                a.event.special.swipe.verticalDistanceThreshold &&
37              g.origin
38                .trigger("swipe")
39                .trigger(
40                  g.coords[0] > e.coords[0] ? "swipeleft" : "swiperight"
41                ),
42            (g = e = void 0);
43        });
44      });
45    },
46  }),
47    (a.event.special.swipeleft = a.event.special.swipeleft || {
48      setup: function () {
49        a(this).bind("swipe", a.noop);
50      },
51    }),
52    (a.event.special.swiperight =
53      a.event.special.swiperight || a.event.special.swipeleft);
54})(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.