PageSourceSearch

https://storyxpress.co/main.js

js storyxpress.co collected 2026-09-24 08:39:36 UTC 17,230 bytes, 504 lines download raw bytes

1(function ($) {
2  // Preloader (if the #preloader div exists)
3  $(window).on("load", () => {
4    if ($("#preloader").length) {
5      $("#preloader").delay(100).fadeOut("slow", function () {
6        $(this).remove();
7      });
8    }
9  });
10
11  // Back to top button
12  $(window).scroll(function () {
13    if ($(this).scrollTop() > 100) {
14      $(".back-to-top").fadeIn("slow");
15    } else {
16      $(".back-to-top").fadeOut("slow");
17    }
18  });
19  $(".back-to-top").click(() => {
20    $("html, body").animate({ scrollTop: 0 }, 1500, "easeInOutExpo");
21    return false;
22  });
23
24  // Initiate the wowjs animation library
25
26  // Header scroll class
27  $(window).scroll(function () {
28    if ($(this).scrollTop() > 10) {
29      $("#header").addClass("header-scrolled");
30    } else {
31      $("#header").removeClass("header-scrolled");
32    }
33  });
34
35  if ($(window).scrollTop() > 10) {
36    $("#header").addClass("header-scrolled");
37  }
38
39  // Smooth scroll for the navigation and links with .scrollto classes
40  $(".main-nav a, .mobile-nav a, .scrollto").on("click", function () {
41    if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) {
42      const target = $(this.hash);
43      if (target.length) {
44        let top_space = 0;
45
46        if ($("#header").length) {
47          top_space = $("#header").outerHeight();
48
49          if (!$("#header").hasClass("header-scrolled")) {
50            top_space -= 40;
51          }
52        }
53
54        $("html, body").animate({
55          scrollTop: target.offset().top - top_space
56        }, 1500, "easeInOutExpo");
57
58        if ($(this).parents(".main-nav, .mobile-nav").length) {
59          $(".main-nav .active, .mobile-nav .active").removeClass("active");
60          $(this).closest("li").addClass("active");
61        }
62
63        if ($("body").hasClass("mobile-nav-active")) {
64          $("body").removeClass("mobile-nav-active");
65          $(".mobile-nav-toggle i").toggleClass("fa-times fa-bars");
66          $(".mobile-nav-overly").fadeOut();
67        }
68        return false;
69      }
70    }
71  });
72
73  // Navigation active state on scroll
74  const nav_sections = $("section");
75  const main_nav = $(".main-nav, .mobile-nav");
76  const main_nav_height = $("#header").outerHeight();
77
78  $(window).on("scroll", function () {
79    const cur_pos = $(this).scrollTop();
80
81    nav_sections.each(function () {
82      const top = $(this).offset().top - main_nav_height;
83      const bottom = top + $(this).outerHeight();
84
85      // if (cur_pos >= top && cur_pos <= bottom) {
86      //   main_nav.find('li').removeClass('active');
87      //   main_nav.find('a[href="#'+$(this).attr('id')+'"]').parent('li').addClass('active');
88      // }
89    });
90  });
91
92  // closing nav dropdown on clicking outside
93  $(document).on("click", (e) => {
94    if ($(e.target).is("#header, #sol-drop, .sol-dropdown") === false) {
95      $(".sol-dropdown").removeClass("show-drop");
96      $("#solutionDropdown").removeClass("active");
97    }
98    if ($(e.target).is("#header, #sol-drop, .use-case-dropdown") === false) {
99      $(".use-case-dropdown").removeClass("show-drop");
100      $("#useCaseDropDown").removeClass("active");
101    }
102    if ($(e.target).is("#header, #sol-drop, .integration-dropdown") === false) {
103      $(".integration-dropdown").removeClass("show-drop");
104      $("#integrationDropdown").removeClass("active");
105    }
106    if ($(e.target).is("#header, #sol-drop, .enterprise-dropdown") === false) {
107      $(".enterprise-dropdown").removeClass("show-drop");
108      $("#enterpriseDropDown").removeClass("active");
109    }
110  });
111  // toggle dropdown on click in navbar
112  $("#solutionDropdown").click(function () {
113    $("#header.header-nav-new").toggleClass("header-active");
114    if ($(".use-case-dropdown")) {
115      $(".use-case-dropdown").removeClass("show-drop");
116      $("#useCaseDropDown").removeClass("active");
117    }
118    if ($(".integration-dropdown")) {
119      $(".integration-dropdown").removeClass("show-drop");
120      $("#integrationDropdown").removeClass("active");
121    }
122    if ($(".enterprise-dropdown")) {
123      $(".enterprise-dropdown").removeClass("show-drop");
124      $("#enterpriseDropDown").removeClass("active");
125    }
126    $(this).toggleClass("active");
127    $(".sol-dropdown").toggleClass("show-drop");
128  });
129
130  $("#enterpriseDropDown").click(function () {
131    $("#header.header-nav-new").toggleClass("header-active");
132    $(".sol-dropdown").removeClass("show-drop");
133    $("#enterpriseDropDown").removeClass("active");
134    if ($(".integration-dropdown")) {
135      $(".integration-dropdown").removeClass("show-drop");
136      $("#integrationDropdown").removeClass("active");
137    }
138    if ($(".use-case-dropdown")) {
139      $(".use-case-dropdown").removeClass("show-drop");
140      $("#useCaseDropDown").removeClass("active");
141    }
142    $(this).toggleClass("active");
143    $(".enterprise-dropdown").toggleClass("show-drop");
144  });
145
146  $("#useCaseDropDown").click(function () {
147    $("#header.header-nav-new").toggleClass("header-active");
148    $(".sol-dropdown").removeClass("show-drop");
149    $("#solutionDropdown").removeClass("active");
150    if ($(".integration-dropdown")) {
151      $(".integration-dropdown").removeClass("show-drop");
152      $("#integrationDropdown").removeClass("active");
153    }
154    if ($(".enterprise-dropdown")) {
155      $(".enterprise-dropdown").removeClass("show-drop");
156      $("#enterpriseDropDown").removeClass("active");
157    }
158    $(this).toggleClass("active");
159    $(".use-case-dropdown").toggleClass("show-drop");
160  });
161
162  $("#integrationDropdown").click(function () {
163    $("#header.header-nav-new").toggleClass("header-active");
164    $(".sol-dropdown").removeClass("show-drop");
165    if ($(".use-case-dropdown")) {
166      $(".use-case-dropdown").removeClass("show-drop");
167      $("#useCaseDropDown").removeClass("active");
168    }
169    if ($(".enterprise-dropdown")) {
170      $(".enterprise-dropdown").removeClass("show-drop");
171      $("#enterpriseDropDown").removeClass("active");
172    }
173    $(this).toggleClass("active");
174    $(".integration-dropdown").toggleClass("show-drop");
175  });
176
177  // Replacing image in feature section of header on hover
178  $(".feature-heading").mouseover(function () {
179    const image = $(this).find("img");
180    if (image.length > 0) {
181      image.attr("src", image.attr("src").replace(".svg", "-blue.svg"));
182    }
183  }).mouseout(function () {
184    const image = $(this).find("img");
185    if (image.length > 0) {
186      image.attr("src", image.attr("src").replace("-blue.svg", ".svg"));
187    }
188  });
189}(jQuery));
190
191// ----------------
192
193// const classes = [
194//   "class1",
195//   "class2",
196//   "class3"
197// ];
198
199// let classIndex = 0;
200
201// function loopClasses() {
202//   const currentClass = classes[classIndex];
203
204//   // loop through classes and remove from element
205//   for (let i = 0; i < classes.length; i++) {
206//     $(".element").removeClass(classes[i]);
207//   }
208
209//   // add current class to element
210//   $(".element").addClass(currentClass);
211
212//   // advance or reset loop counter
213//   classIndex = (classIndex + 1) % classes.length;
214// }
215
216// setInterval(loopClasses, 2500);
217
218// $(document).ready(() => {
219//   $(".owl-carousel").owlCarousel({
220//     items: 1,
221//     autoplay: true,
222//     loop: true,
223//     dots: true,
224//     nav: true,
225//     dotsContainer: ".slider-nav .thumbs",
226//   });
227// });
228
229// HelpCrunch Chat bot
230// (function (w, d) {
231//   w.HelpCrunch = function () { w.HelpCrunch.q.push(arguments); }; w.HelpCrunch.q = [];
232//   function r() { const s = document.createElement("script"); s.async = 1; s.type = "text/javascript"; s.src = "https://widget.helpcrunch.com/"; (d.body || d.head).appendChild(s); }
233//   if (w.attachEvent) { w.attachEvent("onload", r); } else { w.addEventListener("load", r, false); }
234// }(window, document));
235
236// const stored = window.localStorage;
237// const { uemail } = stored;
238// HelpCrunch("init", "storyxpress", {
239//   applicationId: 1,
240//   applicationSecret: "6Vx2dk1LKkDZN3bk4geTAFsam2MZZZs4slD6qP0EUPE7c9TQ2KGWW8ErCEoWnh
240I+N7YRHC8VdZ0QlMZYY1r6bw==",
241//   ...(uemail
242//     ? {
243//       user: {
244//         email: uemail,
245//         user_id: uemail,
246//       }
247//     }
248//     : {}
249//   )
250// });
251
252// HelpCrunch("showChatWidget");
253
254(function () {
255  const utm_nav = document.getElementsByClassName("get-utm-source-nav");
256  const utm_nav_si = document.getElementsByClassName("get-utm-source-nav-si");
257  if (utm_nav && utm_nav_si && utm_nav.length > 0 && utm_nav_si.length > 0) {
258    for (let i = 0; i < utm_nav.length; i += 1) {
259      const utm_nav_header = utm_nav[i].innerHTML.replace(/ /g, "");
260
261      const productName = window.location.pathname;
262      let edit_str;
263
264      if (productName.split("/").length > 2) {
265        edit_str = productName.split("/")[2];
266      } else {
267        edit_str = productName.split("/")[1];
268      }
269      const link_utm_nav = `/account/signup?product=${edit_str}&source_url=${encodeURIComponent(window.location.href)}&utm_source=${productName}&utm_medium=${utm_nav_header}`;
270      utm_nav[i].setAttribute("href", link_utm_nav);
271    }
272    for (let i = 0; i < utm_nav_si.length; i += 1) {
273      const utm_nav_header_si = utm_nav_si[i].innerHTML.replace(/ /g, "");
274      const productName = window.location.pathname;
275      let edit_str;
276
277      if (productName.split("/").length > 2) {
278        edit_str = productName.split("/")[2];
279      } else {
280        edit_str = productName.split("/")[1];
281      }
282      const link_utm_nav_si = `/account/login?product=${edit_str}&source_url=${encodeURIComponent(window.location.href)}&utm_source=${productName}&utm_medium=${utm_nav_header_si}`;
283      utm_nav_si[i].setAttribute("href", link_utm_nav_si);
284    }
285  }
286}());
287
288(function () {
289  const utm_source = document.getElementById("get-utm-source");
290  const utm_medium = document.getElementById("get-utm-medium");
291  if (utm_source) {
292    const utm = utm_source.innerHTML.trim().replace(/ /g, "_");
293    const productName = window.location.pathname;
294
295    let edit_str;
296    if (productName.split("/").length > 2) {
297      edit_str = productName.split("/")[2];
298    } else {
299      edit_str = productName.split("/")[1];
300    }
301    const link = `/account/signup?product=${edit_str}&source_url=${encodeURIComponent(window.location.href)}&utm_source=${productName}&utm_medium=${utm}`;
302    utm_source.setAttribute("href", link);
303  }
304  if (utm_medium) {
305    const utm_med = utm_medium.innerHTML.trim().replace(/ /g, "_");
306
307    const productName = window.location.pathname;
308
309    let edit_str;
310    if (productName.split("/").length > 2) {
311      edit_str = productName.split("/")[2];
312    } else {
313      edit_str = productName.split("/")[1];
314    }
315    const link_med = `/pricing/?product=${edit_str}&source_url=${encodeURIComponent(window.location.href)}&utm_source=${productName}&utm_medium=${utm_med.replace(/\//g, "_")}`;
316    utm_medium.setAttribute("href", link_med);
317  }
318}());
319
320(function () {
321  const signup_utms = document.getElementsByClassName("signup-utms");
322  if (signup_utms && signup_utms.length > 0) {
323    for (var i = 0; i < signup_utms.length; i++) {
324      const innerText = signup_utms[i].innerHTML.trim().replace(/\ /g, "_");
325      const productName = window.location.pathname;
326      let edit_str;
327      if (productName.split("/").length > 2) {
328        edit_str = productName.split("/")[2];
329      } else {
330        edit_str = productName.split("/")[1];
331      }
332      const link = `/account/signup?product=${edit_str}&source_url=${encodeURIComponent(window.location.href)}&utm_source=${productName}&utm_medium=${innerText}`;
333      signup_utms[i].setAttribute("href", link);
334    }
335  }
336})();
337
338// (function() {
339//   const pricingCTAs = document.getElementsByClassName("pricing_utm");
340//   console.log(pricingCTAs);
341//   if (pricingCTAs && pricingCTAs.length > 0) {
342//     for (var i = 0; i < pricingCTAs.length; i++) {
343//       const innerText = pricingCTAs[i].innerHTML.trim().replace(/ /g, "_");
344
345//       const productName = window.location.pathname;
346//       let edit_str;
347//       if (productName.split("/").length > 2) {
348//         edit_str = productName.split("/")[2];
349//       } else {
350//         edit_str = productName.split("/")[1];
351//       }
352//       const link = `/pricing/?product=${edit_str}&source_url=${encodeURIComponent(window.location.href)}&utm_source=${productName}&utm_medium=${innerText}`;
353//       pricingCTAs[i].setAttribute("href", link);
354//     }
355//   }
356// })();
357
358(function() {
359  if (window.localStorage.getItem("dataLayer")) {
360    const dataLayerParsed = JSON.parse(window.localStorage.getItem("dataLayer"));
361    window.dataLayer = window.dataLayer || [];
362    window.dataLayer.push({
363      ...dataLayerParsed
364    });
365  }
366})();
367
368/**
369 * Google Analytics
370 */
371// (function () {
372//   $.get("/api/public/token", (data, textStatus, xhr) => {
373//     if (data.env === "production" && data.googleAnalyticsKey) {
374//       (function (i, s, o, g, r, a, m) {
375//         i.GoogleAnalyticsObject = r;
376//         i[r] = i[r] || function () {
377//           (i[r].q = i[r].q || []).push(arguments);
378//         }, i[r].l = 1 * new Date();
379//         a = s.createElement(o), m = s.getElementsByTagName(o)[0];
380//         a.async = 1;
381//         a.src = g;
382//         m.parentNode.insertBefore(a, m);
383//       }(window, document, "script", "//www.google-analytics.com/analytics.js", "ga"));
384//       ga("create", data.googleAnalyticsKey, "auto");
385//       ga("send", "pageview");
386//     }
387//   });
388// }());
389
390/**
391 * Hubspot
392 */
393(function() {
394  $.get("/api/public/token", (data) => {
395    try {
396      if (data.env === "production") {
397        const s = document.createElement("script");
398        s.id = "hs-script-loader";
399        s.src = "//js.hs-scripts.com/5756480.js";
400        s.async = 1;
401        s.defer = 1;
402        document.body.appendChild(s);
403      }
404    } catch (err) { }
405  });
406})();
407
408/**
409 * Script for handling onclick for CTA with external links
410 */
411if (document.getElementById("request-demo-cta")) {
412  document.getElementById("request-demo-cta").addEventListener("click", () => {
413    window.open("https://meetings.hubspot.com/tam12", "_blank");
414  }, false);
415}
416
417if (document.getElementsByClassName("book-demo-cta") && document.getElementsByClassName("book-demo-cta").length > 0) {
418  for (let i = 0; i < document.getElementsByClassName("book-demo-cta").length; i += 1) {
419    document.getElementsByClassName("book-demo-cta")[i].addEventListener("click", () => {
420      window.open(`https://meetings.hubspot.com/ankit17?utm_source=website&utm_medium=link&utm_campaign=${encodeURIComponent(window.location.href)}`, "_blank");
421    });
422  }
423}
424
425function handleRedirect(page) {
426  let url = `https://meetings.hubspot.com/ankit17?utm_source=website&utm_medium=link&utm_campaign=${encodeURIComponent(window.location.href)}`;
427
428  if (page === "free_screen_recorder") url = "https://chrome.google.com/webstore/detail/webcam-%20-screen-video-rec/jfpjkgdpgdbddknpgplfkjjfncenlmkf?hl=en&gl=IN&authuser=1";
429
430  window.open(url, "_blank");
431}
432
433function handlePlatformRedirec(url) {
434  window.open(`${url}`, "_blank");
435}
436
437const intentPoupContainers = [
438  "/video/hosting/",
439  "/video/online-video-player/",
440  "/video/hub-cms/",
441  "/video/channels/",
442  "/video/seo/",
443  "/video/screen-recorder/video-editor/",
444  "/video/knowledge-base/",
445  "/video/send-share/",
446  "/video/playlists/",
447  "/product-features/create-video",
448  "/video/customize-thumbnail/",
449  "/video/call-to-actions/",
450  "/video/video-analytics/",
451  "/screen-recorder/webcam-video-recorder/",
452  "/integrations/",
453  "/video/marketing/",
454  "/video/sales/",
455  "/video/customer-support/",
456  "/video/remote-communication/",
457  "/integrations/hubspot/",
458  "/integrations/activecampaign/",
459  "/integrations/calendly/",
460  "/help/integrations/pipedrive/",
461  "/help/integrations/freshsales/",
462  "/video-creation-api-for-business",
463  "/video/personalization/",
464  "/video/ecommerce-creator/"
465];
466
467function handlePopupClose(e) {
468  const shouldExit = [...e.target.classList].includes("exit-intent-container")
469    || [...e.target.classList].includes("exit-intent-close-button")
470    || [...e.target.classList].includes("popup-close")
471    || e.target.nodeName === "svg"
472    || e.target.nodeName === "path";
473  if (shouldExit) {
474    document.querySelector(".exit-intent-container").classList.remove("visible");
475  }
476}
477
478if (intentPoupContainers.includes(window.location.pathname)) {
479  const mouseEvent = (e) => {
480    const shouldShowExitIntent = !e.toElement && !e.relatedTarget && e.clientY < 10;
481
482    if (shouldShowExitIntent) {
483      document.removeEventListener("mouseout", mouseEvent);
484
485      document.querySelector(".exit-intent-container").classList.add("visible");
486    }
487  };
488  document.addEventListener("mouseout", mouseEvent);
489  document.querySelector(".exit-intent-container").addEventListener("click", handlePopupClose);
490}
491
492const bookdemoLink = document.getElementsByClassName("book-demo-link");
493
494if (bookdemoLink && bookdemoLink.length > 0) {
495  const url = `https://meetings.hubspot.com/ankit17?utm_source=website&utm_medium=link&utm_campaign=${encodeURIComponent(window.location.href)}`;
496  for (let i = 0; i < bookdemoLink.length; i += 1) {
497    bookdemoLink[i].setAttribute("href", url);
498  }
499}
500
501const bannerElem = document.getElementsByClassName("banner-text-container");
502if (bannerElem && bannerElem[0]) {
503  bannerElem[0].style.paddingTop = "20px";
504}

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.