Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !function (e) {
- var t = {};
- function n(o) {
- if (t[o]) return t[o].exports;
- var i = t[o] = {i: o, l: !1, exports: {}};
- return e[o].call(i.exports, i, i.exports, n), i.l = !0, i.exports
- }
- n.m = e, n.c = t, n.d = function (e, t, o) {
- n.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: o})
- }, n.r = function (e) {
- "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
- }, n.t = function (e, t) {
- if (1 & t && (e = n(e)), 8 & t) return e;
- if (4 & t && "object" == typeof e && e && e.__esModule) return e;
- var o = Object.create(null);
- if (n.r(o), Object.defineProperty(o, "default", {
- enumerable: !0,
- value: e
- }), 2 & t && "string" != typeof e) for (var i in e) n.d(o, i, function (t) {
- return e[t]
- }.bind(null, i));
- return o
- }, n.n = function (e) {
- var t = e && e.__esModule ? function () {
- return e.default
- } : function () {
- return e
- };
- return n.d(t, "a", t), t
- }, n.o = function (e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }, n.p = "", n(n.s = 0)
- }([function (e, t, n) {
- "use strict";
- var o;
- n.r(t);
- var i, r = [], l = 0;
- function c(e) {
- window.addEventListener("scroll", e)
- }
- function d(e) {
- window.removeEventListener("scroll", e)
- }
- var u = document.getElementsByTagName("img");
- var a = document.getElementsByTagName("video");
- var s = document.getElementById("WYCIETO");
- var f = document.getElementById("WYCIETO");
- var g = document.getElementsByTagName("video");
- var m, v = [], p = [], w = [], y = 0, h = [], b = 0;
- function B(e) {
- p[e] = setInterval((function () {
- !function (e) {
- v[e]++
- }(e)
- }), 1e3)
- }
- var E, T, N, O, I, S = [], H = 0;
- function z() {
- c(z), E = T;
- var e = document.getElementsByClassName(E);
- for (H = 0; H < e.length; H++) {
- var t = window.pageYOffset, n = t + window.innerHeight, o = e[H].id,
- i = document.getElementById(o).offsetTop, r = e[H].clientHeight, l = i + r;
- i > t ? l < n ? m = 100 : i < n && (m = Math.round((n - i) / r * 100)) : l > t ? m = Math.round((l - t) / r * 100) : l < t && (m = 0), i > n && (m = 0), S[H] = m
- }
- !function (e) {
- if (0 === b) for (y = 0; y < e.length; y++) v[y] = 0, h[y] = 0, b++;
- for (y = 0; y < e.length; y++) S[y] >= 50 && 0 === h[y] ? (B(y), h[y]++) : S[y] < 50 && 1 === h[y] && (w[t = y] = clearInterval(p[t]), h[y]--);
- var t
- }(e)
- }
- window.config = function (e, t) {
- I = t || 1e3, function (e) {
- T = e
- }(O = e), z()
- }, window.start = function () {
- var e;
- e = O, N = setInterval((function () {
- for (var t = document.getElementsByClassName(e), n = 0; n < t.length; n++) {
- var o = {name: t[n].id, percent: S[n], timeAbove50: v[n]}, i = JSON.stringify(o);
- console.log(i)
- }
- }), I || 1e3)
- }, window.alldiv = function (e) {
- !function (e) {
- for (i = document.getElementsByClassName(e), l = 0; l < i.length; l++) {
- var t = window.pageYOffset, n = t + window.innerHeight, c = i[l].id,
- d = document.getElementById(c).offsetTop, u = i[l].clientHeight, a = d + u, s = i[l].offsetWidth;
- d > t ? a < n ? o = 100 : d < n && (o = Math.round((n - d) / u * 100)) : a > t ? o = Math.round((a - t) / u * 100) : a < t && (o = 0), d > n && (o = 0), r[l] = o;
- var f = {key: c, details: {name: c, visible: o, height: u, width: s}}, g = JSON.stringify(f, null, 2);
- console.log(g)
- }
- }(e)
- }, window.selecteddiv = function (e) {
- !function (e) {
- var t, n = document.documentElement.scrollTop, o = document.documentElement.scrollTop + window.innerHeight,
- i = e.id, r = document.getElementById(i).offsetTop, l = e.clientHeight, c = r + l, d = e.offsetWidth;
- r > n ? c < o ? t = 100 : r < o && (t = Math.round((o - r) / l * 100)) : c > n ? t = Math.round((c - n) / l * 100) : c < n && (t = 0), r > o && (t = 0);
- var u = {key: i, details: {name: i, visible: t, height: l, width: d}}, a = JSON.stringify(u, null, 2);
- console.log(a)
- }(e)
- }, window.WYCIETO = f, window.WYCIETO = s, window.onload = function () {
- window.scroll(0, 1)
- }, function e() {
- c(e);
- for (var t = 0; t < u.length; t++) {
- var n = u[t].getBoundingClientRect().bottom;
- if (u[t].getBoundingClientRect().top - window.innerHeight <= 100 && n >= -100) {
- var o = u[t].getAttribute("lazy-src") || u[t].getAttribute("src");
- u[t].setAttribute("src", o)
- }
- }
- }(), function e() {
- c(e);
- for (var t = 0; t < a.length; t++) {
- var n = a[t].getBoundingClientRect().bottom;
- if (a[t].getBoundingClientRect().top - window.innerHeight <= 100 && n >= -100) {
- var o = a[t].getAttribute("lazy-vid");
- a[t].setAttribute("src", o), d(e)
- }
- }
- }(), function e() {
- c(e), Array.prototype.forEach.call(document.querySelectorAll("div.WYCIETO"), (function (t) {
- var n = t.getBoundingClientRect().bottom, o = t.getBoundingClientRect().top;
- t.id === document.getElementById("WYCIETO").id && o - window.innerHeight <= 100 && n >= -100 && (_WYCIETOWYCIETOWYCIETO), d(e))
- }))
- }(), function e() {
- c(e), Array.prototype.forEach.call(document.querySelectorAll("div.WYCIETO"), (function (t) {
- var n = t.getBoundingClientRect().bottom, o = t.getBoundingClientRect().top;
- t.id === document.getElementById("WYCIETO").id && o - window.innerHeight <= 100 && n >= -100 && (WYCIETOWYCIETOWYCIETO), d(e))
- }))
- }(), window.stop = function () {
- clearInterval(N)
- }, window.time = function () {
- !function () {
- for (var e = 0; e < g.length; e++) {
- var t = g[e].currentTime.toFixed(2), n = g[e].duration.toFixed(2), o = Math.round(t / n * 100) + "%";
- if (!0 === isNaN(parseFloat(n)) && (n = "Video not lazyloaded"), !0 === isNaN(parseFloat(o)) && (o = "0%"), "number" == typeof n) {
- var i = {key: g[e].id, details: {currentTime: t + "s", duration: n + "s", percentPlayed: o}},
- r = JSON.stringify(i, null, 2);
- console.log(r)
- } else {
- var l = {key: g[e].id, details: {currentTime: t + "s", duration: n, percentPlayed: o}},
- c = JSON.stringify(l, null, 2);
- console.log(c)
- }
- }
- }()
- }, window.divpos = function (e) {
- !function (e) {
- var t = document.documentElement.scrollTop, n = t + window.innerHeight, o = e.id,
- i = document.getElementById(o).offsetTop,
- r = {divName: o, topToFooter: i - n, botToTop: i + e.clientHeight - t}, l = JSON.stringify(r, null, 2);
- console.log(l)
- }(e)
- }
- }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement