-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbigPicture.js
More file actions
69 lines (68 loc) · 2.02 KB
/
Copy pathbigPicture.js
File metadata and controls
69 lines (68 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
!(function (e, t, i) {
var r = (e.bigPicture = e.bigPicture || []);
if (!r.initialized)
if (r.invoked)
e.console &&
console.error &&
console.error("BigPicture.io snippet included twice.");
else {
(r.invoked = !0),
(r.SNIPPET_VERSION = 1.5),
(r.handler = function (e) {
if (void 0 !== r.callback)
try {
return r.callback(e);
} catch (e) {}
}),
(r.eventList = ["mousedown", "mouseup", "click", "submit"]),
(r.methods = [
"track",
"identify",
"page",
"group",
"alias",
"integration",
"ready",
"intelReady",
"consentReady",
"on",
"off",
]),
(r.factory = function (e) {
return function () {
var t = Array.prototype.slice.call(arguments);
return t.unshift(e), r.push(t), r;
};
});
for (var n = 0; n < r.methods.length; n++) {
var o = r.methods[n];
r[o] = r.factory(o);
}
r.getCookie = function (e) {
var i = ("; " + t.cookie).split("; " + e + "=");
return 2 == i.length && i.pop().split(";").shift();
};
var c = (r.isEditor = (function () {
try {
return (
e.self !== e.top &&
(new RegExp("app" + i, "ig").test(t.referrer) ||
"edit" == r.getCookie("_bpr_edit"))
);
} catch (e) {
return !1;
}
})());
r.init = function (n, o) {
if (((r.projectId = n), (r._config = o), !c))
for (var a = 0; a < r.eventList.length; a++)
e.addEventListener(r.eventList[a], r.handler, !0);
var s = t.createElement("script");
s.async = !0;
var d = c ? "/editor/editor" : "/public-" + n;
(s.src = "//cdn" + i + d + ".js"),
t.getElementsByTagName("head")[0].appendChild(s);
};
}
})(window, document, ".bigpicture.io");
bigPicture.init("1260");