PageSourceSearch

https://karabakh.center/assets/js/plugins/lg-video.min.js

js karabakh.center collected 2026-10-02 20:33:15 UTC 12,723 bytes, 188 lines download raw bytes

vendor: 4,324 bytes, lines 1-87
1/**!
2 * lg-video.js | 1.2.1 | September 15th 2020
3 * http://sachinchoolur.github.io/lg-video.js
4 * Copyright (c) 2016 Sachin N; 
5 * @license GPLv3 
6 */
7! function (e) {
8    if ("object" == typeof exports && "undefined" != typeof module) module.exports = e();
9    else if ("function" == typeof define && define.amd) define([], e);
10    else {
11        var o;
12        o = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, o.LgVideo = e()
13    }
14}(function () {
15    var e, o, i;
16    return function () {
17        function e(o, i, t) {
18            function r(s, a) {
19                if (!i[s]) {
20                    if (!o[s]) {
21                        var d = "function" == typeof require && require;
22                        if (!a && d) return d(s, !0);
23                        if (l) return l(s, !0);
24                        var c = new Error("Cannot find module '" + s + "'");
25                        throw c.code = "MODULE_NOT_FOUND", c
26                    }
27                    var n = i[s] = {
28                        exports: {}
29                    };
30                    o[s][0].call(n.exports, function (e) {
31                        return r(o[s][1][e] || e)
32                    }, n, n.exports, e, o, i, t)
33                }
34                return i[s].exports
35            }
36            for (var l = "function" == typeof require && require, s = 0; s < t.length; s++) r(t[s]);
37            return r
38        }
39        return e
40    }()({
41        1: [function (o, i, t) {
42            ! function (o, i) {
43                if ("function" == typeof e && e.amd) e([], i);
44                else if (void 0 !== t) i();
45                else {
46                    var r = {
47                        exports: {}
48                    };
49                    i(), o.lgVideo = r.exports
50                }
51            }(this, function () {
52                "use strict";
53                var e = Object.assign || function (e) {
54                        for (var o = 1; o < arguments.length; o++) {
55                            var i = arguments[o];
56                            for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (e[t] = i[t])
57                        }
58                        return e
59                    },
60                    o = {
61                        videoMaxWidth: "855px",
62                        youtubePlayerParams: !1,
63                        vimeoPlayerParams: !1,
64                        dailymotionPlayerParams: !1,
65                        vkPlayerParams: !1,
66                        videojs: !1,
67                        videojsOptions: {}
68                    },
69                    i = function i(t) {
70                        return this.el = t, this.core = window.lgData[this.el.getAttribute("lg-uid")], this.core.s = e({}, o, this.core.s), this.videoLoaded = !1, this.init(), this
71                    };
72                i.prototype.init = function () {
73                    var e = this;
74                    utils.on(e.core.el, "hasVideo.lgtm", function (o) {
75                        if (e.core.___slide[o.detail.index].querySelector(".lg-video").insertAdjacentHTML("beforeend", e.loadVideo(o.detail.src, "lg-object", !0, o.detail.index, o.detail.html)), o.detail.html)
76                            if (e.core.s.videojs) try {
77                                videojs(e.core.___slide[o.detail.index].querySelector(".lg-html5"), e.core.s.videojsOptions, function () {
78                                    e.videoLoaded || this.play()
79                                })
80                            } catch (e) {
81                                console.error("Make sure you have included videojs")
82                            } else e.core.___slide[o.detail.index].querySelector(".lg-html5").play()
83                    }), utils.on(e.core.el, "onAferAppendSlide.lgtm", function (o) {
84                        e.core.___slide[o.detail.index].querySelector(".lg-video-cont") && (e.core.___slide[o.detail.index].querySelector(".lg-video-cont").style.maxWidth = e.core.s.videoMaxWidth, e.videoLoaded = !0)
85                    });
86                    var o = function o(i) {
87                        if (utils.hasClass(i.querySelector(".lg-object"), "lg-has-
87poster") && "none" !== i.querySelector(".lg-object").style.display)
88                            if (utils.hasClass(i, "lg-has-video")) {
89                                var t = i.querySelector(".lg-youtube"),
90                                    r = i.querySelector(".lg-vimeo"),
91                                    l = i.querySelector(".lg-dailymotion"),
92                                    s = i.querySelector(".lg-html5");
93                                if (t) t.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', "*");
94                                else if (r) try {
95                                        $f(r).api("play")
96                                    } catch (e) {
97                                        console.error("Make sure you have included froogaloop2 js")
98                                    } else if (l) l.contentWindow.postMessage("play", "*");
99                                    else if (s)
100                                    if (e.core.s.videojs) try {
101                                        videojs(s).play()
102                                    } catch (e) {
103                                        console.error("Make sure you have included videojs")
104                                    } else s.play();
105                                utils.addClass(i, "lg-video-playing")
106                            } else {
107                                utils.addClass(i, "lg-video-playing"), utils.addClass(i, "lg-has-vi
vendor: 6,907 bytes, lines 107-188
107deo");
108                                var a, d, c = function o(t, r) {
109                                    if (i.querySelector(".lg-video").insertAdjacentHTML("beforeend", e.loadVideo(t, "", !1, e.core.index, r)), r)
110                                        if (e.core.s.videojs) try {
111                                            videojs(e.core.___slide[e.core.index].querySelector(".lg-html5"), e.core.s.videojsOptions, function () {
112                                                this.play()
113                                            })
114                                        } catch (e) {
115                                            console.error("Make sure you have included videojs")
116                                        } else e.core.___slide[e.core.index].querySelector(".lg-html5").play()
117                                };
118                                e.core.s.dynamic ? (a = e.core.s.dynamicEl[e.core.index].src, d = e.core.s.dynamicEl[e.core.index].html, c(a, d)) : (a = e.core.items[e.core.index].getAttribute("href") || e.core.items[e.core.index].getAttribute("data-src"), d = e.core.items[e.core.index].getAttribute("data-html"), c(a, d));
119                                var n = i.querySelector(".lg-object");
120                                i.querySelector(".lg-video").appendChild(n), utils.hasClass(i.querySelector(".lg-video-object"), "lg-html5") || (utils.removeClass(i, "lg-complete"), utils.on(i.querySelector(".lg-video-object"), "load.lg error.lg", function () {
121                                    utils.addClass(i, "lg-complete")
122                                }))
123                            }
124                    };
125                    if (e.core.doCss() && e.core.items.length > 1 && (e.core.s.enableSwipe && e.core.isTouch || e.core.s.enableDrag && !e.core.isTouch)) utils.on(e.core.el, "onSlideClick.lgtm", function () {
126                        var i = e.core.___slide[e.core.index];
127                        o(i)
128                    });
129                    else
130                        for (var i = 0; i < e.core.___slide.length; i++) ! function (i) {
131                            utils.on(e.core.___slide[i], "click.lg", function () {
132                                o(e.core.___slide[i])
133                            })
134                        }(i);
135                    utils.on(e.core.el, "onBeforeSlide.lgtm", function (o) {
136                        var i = e.core.___slide[o.detail.prevIndex],
137                            t = i.querySelector(".lg-youtube"),
138                            r = i.querySelector(".lg-vimeo"),
139                            l = i.querySelector(".lg-dailymotion"),
140                            s = i.querySelector(".lg-vk"),
141                            a = i.querySelector(".lg-html5");
142                        if (t) t.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', "*");
143                        else if (r) try {
144                                $f(r).api("pause")
145                            } catch (e) {
146                                console.error("Make sure you have included froogaloop2 js")
147                            } else if (l) l.contentWindow.postMessage("pause", "*");
148                            else if (a)
149                            if (e.core.s.videojs) try {
150                                videojs(a).pause()
151                            } catch (e) {
152                                console.error("Make sure you have included videojs")
153                            } else a.pause();
154                        s && s.setAttribute("src", s.getAttribute("src").replace("&autoplay", "&noplay"));
155                        var d;
156                        d = e.core.s.dynamic ? e.core.s.dynamicEl[o.detail.index].src : e.core.items[o.detail.index].getAttribute("href") || e.core.items[o.detail.index].getAttribute("data-src");
157                        var c = e.core.isVideo(d, o.detail.index) || {};
158                        (c.youtube || c.vimeo || c.dailymotion || c.vk) && utils.addClass(e.core.outer, "lg-hide-download")
159                    }), utils.on(e.core.el, "onAfterSlide.lgtm", function (o) {
160                        utils.removeClass(e.core.___slide[o.detail.prevIndex], "lg-video-playing")
161                    })
162                }, i.prototype.loadVideo = function (e, o, i, t, r) {
163                    var l = "",
164                        s = 1,
165                        a = "",
166                        d = this.core.isVideo(e, t) || {};
167                    i && (s = this.videoLoaded ? 0 : 1);
168                    var c;
169                    if (this.core.s.dynamic) c = this.core.s.dynamicEl[t].title;
170                    else if (!(c = this.core.items[t].getAttribute("title"))) {
171                        var n = this.core.items[t].querySelector("img");
172                        n && (c = n.getAttribute("alt"))
173                    }
174                    if (c = c ? 'title="' + c + '"' : "", d.youtube) a = "?wmode=opaque&autoplay=" + s + "&enablejsapi=1", this.core.s.youtubePlayerParams && (a = a + "&" + utils.param(this.core.s.youtubePlayerParams)), l = '<iframe class="lg-video-object lg-youtube ' + o + '" ' + c + ' width="560" height="315" src="//www.youtube.com/embed/' + d.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
175                    else if (d.vimeo) a = "?autoplay=" + s + "&api=1", this.core.s.vimeoPlayerParams && (a = a + "&" + utils.param(this.core.s.vimeoPlayerParams)), l = '<iframe class="lg-video-object lg-vimeo ' + o + '" ' + c + ' width="560" height="315"  src="//player.vimeo.com/video/' + d.vimeo[1] + a + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
176                    else if (d.dailymotion) a = "?wmode=opaque&autoplay=" + s + "&api=postMessage", this.core.s.dailymotionPlayerParams && (a = a + "&" + utils.param(this.core.s.dailymotionPlayerParams)), l = '<iframe class="lg-video-object lg-dailymotion ' + o + '" ' + c + ' width="560" height="315" src="//www.dailymotion.com/embed/video/' + d.dailymotion[1] + a + '" frameborder="0" allowfullscreen></iframe>';
177                    else if (d.html5) {
178                        var u = r.substring(0, 1);
179                        "." !== u && "#" !== u || (r = document.querySelector(r).innerHTML), l = r
180                    } else d.vk && (a = "&autoplay=" + s, this.core.s.vkPlayerParams && (a = a + "&" + utils.param(this.core.s.vkPlayerParams)), l = '<iframe class="lg-video-object lg-vk ' + o + '" ' + c + '  width="560" height="315" src="http://vk.com/video_ext.php?' + d.vk[1] + a + '" frameborder="0" allowfullscreen></iframe>');
181                    return l
182                }, i.prototype.destroy = function () {
183                    this.videoLoaded = !1
184                }, window.lgModules.video = i
185            })
186        }, {}]
187    }, {}, [1])(1)
188});

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.