Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.50 KB | None | 0 0
  1. !function (e) {
  2. var t = {};
  3.  
  4. function n(o) {
  5. if (t[o]) return t[o].exports;
  6. var i = t[o] = {i: o, l: !1, exports: {}};
  7. return e[o].call(i.exports, i, i.exports, n), i.l = !0, i.exports
  8. }
  9.  
  10. n.m = e, n.c = t, n.d = function (e, t, o) {
  11. n.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: o})
  12. }, n.r = function (e) {
  13. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
  14. }, n.t = function (e, t) {
  15. if (1 & t && (e = n(e)), 8 & t) return e;
  16. if (4 & t && "object" == typeof e && e && e.__esModule) return e;
  17. var o = Object.create(null);
  18. if (n.r(o), Object.defineProperty(o, "default", {
  19. enumerable: !0,
  20. value: e
  21. }), 2 & t && "string" != typeof e) for (var i in e) n.d(o, i, function (t) {
  22. return e[t]
  23. }.bind(null, i));
  24. return o
  25. }, n.n = function (e) {
  26. var t = e && e.__esModule ? function () {
  27. return e.default
  28. } : function () {
  29. return e
  30. };
  31. return n.d(t, "a", t), t
  32. }, n.o = function (e, t) {
  33. return Object.prototype.hasOwnProperty.call(e, t)
  34. }, n.p = "", n(n.s = 0)
  35. }([function (e, t, n) {
  36. "use strict";
  37. var o;
  38. n.r(t);
  39. var i, r = [], l = 0;
  40.  
  41. function c(e) {
  42. window.addEventListener("scroll", e)
  43. }
  44.  
  45. function d(e) {
  46. window.removeEventListener("scroll", e)
  47. }
  48.  
  49. var u = document.getElementsByTagName("img");
  50. var a = document.getElementsByTagName("video");
  51. var s = document.getElementById("WYCIETO");
  52. var f = document.getElementById("WYCIETO");
  53. var g = document.getElementsByTagName("video");
  54. var m, v = [], p = [], w = [], y = 0, h = [], b = 0;
  55.  
  56. function B(e) {
  57. p[e] = setInterval((function () {
  58. !function (e) {
  59. v[e]++
  60. }(e)
  61. }), 1e3)
  62. }
  63.  
  64. var E, T, N, O, I, S = [], H = 0;
  65.  
  66. function z() {
  67. c(z), E = T;
  68. var e = document.getElementsByClassName(E);
  69. for (H = 0; H < e.length; H++) {
  70. var t = window.pageYOffset, n = t + window.innerHeight, o = e[H].id,
  71. i = document.getElementById(o).offsetTop, r = e[H].clientHeight, l = i + r;
  72. 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
  73. }
  74. !function (e) {
  75. if (0 === b) for (y = 0; y < e.length; y++) v[y] = 0, h[y] = 0, b++;
  76. 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]--);
  77. var t
  78. }(e)
  79. }
  80.  
  81. window.config = function (e, t) {
  82. I = t || 1e3, function (e) {
  83. T = e
  84. }(O = e), z()
  85. }, window.start = function () {
  86. var e;
  87. e = O, N = setInterval((function () {
  88. for (var t = document.getElementsByClassName(e), n = 0; n < t.length; n++) {
  89. var o = {name: t[n].id, percent: S[n], timeAbove50: v[n]}, i = JSON.stringify(o);
  90. console.log(i)
  91. }
  92. }), I || 1e3)
  93. }, window.alldiv = function (e) {
  94. !function (e) {
  95. for (i = document.getElementsByClassName(e), l = 0; l < i.length; l++) {
  96. var t = window.pageYOffset, n = t + window.innerHeight, c = i[l].id,
  97. d = document.getElementById(c).offsetTop, u = i[l].clientHeight, a = d + u, s = i[l].offsetWidth;
  98. 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;
  99. var f = {key: c, details: {name: c, visible: o, height: u, width: s}}, g = JSON.stringify(f, null, 2);
  100. console.log(g)
  101. }
  102. }(e)
  103. }, window.selecteddiv = function (e) {
  104. !function (e) {
  105. var t, n = document.documentElement.scrollTop, o = document.documentElement.scrollTop + window.innerHeight,
  106. i = e.id, r = document.getElementById(i).offsetTop, l = e.clientHeight, c = r + l, d = e.offsetWidth;
  107. 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);
  108. var u = {key: i, details: {name: i, visible: t, height: l, width: d}}, a = JSON.stringify(u, null, 2);
  109. console.log(a)
  110. }(e)
  111. }, window.WYCIETO = f, window.WYCIETO = s, window.onload = function () {
  112. window.scroll(0, 1)
  113. }, function e() {
  114. c(e);
  115. for (var t = 0; t < u.length; t++) {
  116. var n = u[t].getBoundingClientRect().bottom;
  117. if (u[t].getBoundingClientRect().top - window.innerHeight <= 100 && n >= -100) {
  118. var o = u[t].getAttribute("lazy-src") || u[t].getAttribute("src");
  119. u[t].setAttribute("src", o)
  120. }
  121. }
  122. }(), function e() {
  123. c(e);
  124. for (var t = 0; t < a.length; t++) {
  125. var n = a[t].getBoundingClientRect().bottom;
  126. if (a[t].getBoundingClientRect().top - window.innerHeight <= 100 && n >= -100) {
  127. var o = a[t].getAttribute("lazy-vid");
  128. a[t].setAttribute("src", o), d(e)
  129. }
  130. }
  131. }(), function e() {
  132. c(e), Array.prototype.forEach.call(document.querySelectorAll("div.WYCIETO"), (function (t) {
  133. var n = t.getBoundingClientRect().bottom, o = t.getBoundingClientRect().top;
  134. t.id === document.getElementById("WYCIETO").id && o - window.innerHeight <= 100 && n >= -100 && (_WYCIETOWYCIETOWYCIETO), d(e))
  135. }))
  136. }(), function e() {
  137. c(e), Array.prototype.forEach.call(document.querySelectorAll("div.WYCIETO"), (function (t) {
  138. var n = t.getBoundingClientRect().bottom, o = t.getBoundingClientRect().top;
  139. t.id === document.getElementById("WYCIETO").id && o - window.innerHeight <= 100 && n >= -100 && (WYCIETOWYCIETOWYCIETO), d(e))
  140. }))
  141. }(), window.stop = function () {
  142. clearInterval(N)
  143. }, window.time = function () {
  144. !function () {
  145. for (var e = 0; e < g.length; e++) {
  146. var t = g[e].currentTime.toFixed(2), n = g[e].duration.toFixed(2), o = Math.round(t / n * 100) + "%";
  147. if (!0 === isNaN(parseFloat(n)) && (n = "Video not lazyloaded"), !0 === isNaN(parseFloat(o)) && (o = "0%"), "number" == typeof n) {
  148. var i = {key: g[e].id, details: {currentTime: t + "s", duration: n + "s", percentPlayed: o}},
  149. r = JSON.stringify(i, null, 2);
  150. console.log(r)
  151. } else {
  152. var l = {key: g[e].id, details: {currentTime: t + "s", duration: n, percentPlayed: o}},
  153. c = JSON.stringify(l, null, 2);
  154. console.log(c)
  155. }
  156. }
  157. }()
  158. }, window.divpos = function (e) {
  159. !function (e) {
  160. var t = document.documentElement.scrollTop, n = t + window.innerHeight, o = e.id,
  161. i = document.getElementById(o).offsetTop,
  162. r = {divName: o, topToFooter: i - n, botToTop: i + e.clientHeight - t}, l = JSON.stringify(r, null, 2);
  163. console.log(l)
  164. }(e)
  165. }
  166. }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement