MCPcopy Create free account
hub / github.com/talkgo/night / t

Function t

static/javascripts/application.js:108–129  ·  view source on GitHub ↗
(e, o)

Source from the content-addressed store, hash-verified

106 "use strict";
107
108 function t(e, o) {
109 function i(t, e) {
110 return function() {
111 return t.apply(e, arguments)
112 }
113 }
114 var r;
115 if (o = o || {}, this.trackingClick = !1, this.trackingClickStart = 0, this.targetElement = null, this.touchStartX = 0, this.touchStartY = 0, this.lastTouchIdentifier = 0, this.touchBoundary = o.touchBoundary || 10, this.layer = e, this.tapDelay = o.tapDelay || 200, this.tapTimeout = o.tapTimeout || 700, !t.notNeeded(e)) {
116 for (var s = ["onMouse", "onClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel"], a = this, c = 0, l = s.length; l > c; c++) a[s[c]] = i(a[s[c]], a);
117 n && (e.addEventListener("mouseover", this.onMouse, !0), e.addEventListener("mousedown", this.onMouse, !0), e.addEventListener("mouseup", this.onMouse, !0)), e.addEventListener("click", this.onClick, !0), e.addEventListener("touchstart", this.onTouchStart, !1), e.addEventListener("touchmove", this.onTouchMove, !1), e.addEventListener("touchend", this.onTouchEnd, !1), e.addEventListener("touchcancel", this.onTouchCancel, !1), Event.prototype.stopImmediatePropagation || (e.removeEventListener = function(t, n, o) {
118 var i = Node.prototype.removeEventListener;
119 "click" === t ? i.call(e, t, n.hijacked || n, o) : i.call(e, t, n, o)
120 }, e.addEventListener = function(t, n, o) {
121 var i = Node.prototype.addEventListener;
122 "click" === t ? i.call(e, t, n.hijacked || (n.hijacked = function(t) {
123 t.propagationStopped || n(t)
124 }), o) : i.call(e, t, n, o)
125 }), "function" == typeof e.onclick && (r = e.onclick, e.addEventListener("click", function(t) {
126 r(t)
127 }, !1), e.onclick = null)
128 }
129 }
130 var e = navigator.userAgent.indexOf("Windows Phone") >= 0,
131 n = navigator.userAgent.indexOf("Android") > 0 && !e,
132 o = /iP(ad|hone|od)/.test(navigator.userAgent) && !e,

Callers

nothing calls this directly

Calls 3

nFunction · 0.85
rFunction · 0.85
iFunction · 0.70

Tested by

no test coverage detected