PageSourceSearch

https://www.ubackup.com/resource/js/main.js

js ubackup.com collected 2026-09-24 06:23:36 UTC 59,661 bytes, 1,889 lines download raw bytes

1var __gc = {
2  host: window.location.hostname,
3  langs: [
4    "fr",
5    "jp",
6    "de",
7    "it",
8    "pt",
9    "es",
10    "tw",
11    "zh",
12    "en",
13    "ar",
14    "pl",
15    "nl",
16    "ru",
17    "id",
18    "hi",
19    "my",
20    "kr",
21  ],
22  currentLang: "en",
23  currentVat: 0.1,
24  pathname: window.location.pathname,
25  accountingSettins: {
26    symbol: "$",
27    format: "%s%v",
28    decimal: ".",
29    thousand: ",",
30    precision: 2,
31  },
32  currencySettings: {
33    en: {
34      symbol: "$",
35      format: "%s%v",
36      decimal: ".",
37      thousand: ",",
38      precision: 2,
39    },
40    fr: {
41      symbol: "€",
42      format: "%v %s",
43      decimal: ",",
44      thousand: " ",
45      precision: 2,
46    },
47    it: {
48      symbol: "€",
49      format: "%v %s",
50      decimal: ",",
51      thousand: ".",
52      precision: 2,
53    },
54    de: {
55      symbol: "€",
56      format: "%v %s",
57      decimal: ",",
58      thousand: ".",
59      precision: 2,
60    },
61    es: {
62      symbol: "€",
63      format: "%v %s",
64      decimal: ",",
65      thousand: ".",
66      precision: 2,
67    },
68    tw: {
69      symbol: "NT$",
70      format: "%s%v",
71      decimal: ".",
72      thousand: ",",
73      precision: 0,
74    },
75    jp: {
76      symbol: "円",
77      format: "%v%s",
78      decimal: ".",
79      thousand: ",",
80      precision: 0,
81    },
82    pl: {
83      symbol: "€",
84      format: "%v %s",
85      decimal: ",",
86      thousand: ".",
87      precision: 2,
88    },
89    nl: {
90      symbol: "€",
91      format: "%v %s",
92      decimal: ",",
93      thousand: ".",
94      precision: 2,
95    },
96  },
97  thePrefixer: "/",
98  theCookieName: function () {
99    var a = this;
100    return (
101      a.pathname.substring(1).replace(/(\/)/g, "-").replace("_", "-") +
102      "-" +
103      a.currentLang
104    );
105  },
106  validateEmail: function (a) {
107    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,9})+$/.test(a)) {
108      return true;
109    }
110    return false;
111  },
112  getCurrencySettings: function (b) {
113    var a = this;
114    if (!a.currencySettings.hasOwnProperty(b)) {
115      b = "en";
116    }
117    return a.currencySettings[b];
118  },
119  getPrefixer: function (b) {
120    var a = this;
121    a.thePrefixer =
122      (a.host === "www.ubackup.com" ||
123        a.host === "www.disk-partition.com" ||
124        a.host === "localhost") &&
125      b !== "en"
126        ? "/" + b
127        : "/";
128    return a.thePrefixer;
129  },
130  showCurrentLang: function () {
131    var a = this;
132    var b = window.location.pathname.substring(1).split("/")[0];
133    var c = a.langs.indexOf(b) > -1 ? b : "en";
134    if (a.host === "www.aomei.de") {
135      c = "de";
136    } else {
137      if (a.host === "www.aomei.fr") {
138        c = "fr";
139      } else {
140        if (a.host === "www.aomei.jp") {
141          c = "jp";
142        }
143      }
144    }
145    a.currentLang = c;
146    return c;
147  },
148  attrs2String: function (c) {
149    var d = "";
150    if (c.length > 0) {
151      for (var b = 0; b < c.length; b++) {
152        var a = c[b].name;
153        var e = c[b].value;
154        if (a !== "" && e !== "") {
155          d += " " + a + "=" + e;
156        }
157      }
158    }
159    return d;
160  },
161  domainAbbreviation: function () {
162    var a = this;
163    return {
164      "www.ubackup.com": "UBC",
165      "www.disk-partition.com": "DP",
166      "www.backup-utility.com": "BU",
167      "www.diskpart.com": "DPT",
168      "www.aomeitech.com": "AT",
169      "www.aomei.de": "AMDE",
170      "www.aomei.fr": "AMFR",
171      "www.aomei.jp": "AMJP",
172    }[a.host];
173  },
174  json_search: function (b, c) {
175    for (var d in c) {
176      if (c[d] === b || c[parseInt(d)] === b || c[d + ""] === b) {
177        return d;
178      }
179    }
180    return false;
181  },
182  getUrlParam: function (b, a) {
183    var e = a || window.location.search;
184    var c = new RegExp("(^|&)" + b + "=([^&]*)(&|$)");
185    var d = e.substr(1).match(c);
186    if (d != null) {
187      return decodeURIComponent(d[2]);
188    }
189    return null;
190  },
191  amCopy: function (a, b) {
192    a.closest('[data-elem="parent"]').find(".copy-input").select();
193    document.execCommand("copy");
194    setTimeout(function () {
195      window.location.href =
196        b || a.attr("data-redirect") || "/landing/aomei-store.html";
197    }, 1000);
198  },
199  back2Top: function () {
200    var b =
201      '<div id="back2top" class="back2top"><i class="glyphicon glyphicon-menu-up"></i></div>';
202    var c = $(window).height();
203    var a = $(document).height();
204    $("body").append(b);
205
206    function d() {
207      if ($(window).scrollTop() >= c * 0.8) {
208        $("#back2top").fadeIn();
209      } else {
210        $("#back2top").fadeOut();
211      }
212    }
213    if (a > c) {
214      d();
215      $(document).on("click", "#back2top", function () {
216        $("html,body").animate(
217          {
218            scrollTop: 0,
219          },
220          666,
221        );
222        return false;
223      });
224    }
225    $(window).scroll(function () {
226      d();
227    });
228  },
229  device: function (t) {
230    var n = navigator.userAgent.toLowerCase(),
231      o = function (e) {
232        var t = new RegExp(e + "/([^\\s\\_\\-]+)");
233        return ((e = (n.match(t) || [])[1]), e || !1);
234      },
235      r = {
236        os: (function () {
237          return /windows/.test(n)
238            ? "windows"
239            : /linux/.test(n)
240              ? "linux"
241              : /iphone|ipod|ipad|ios/.test(n)
242                ? "ios"
243                : /mac/.test(n)
244                  ? "mac"
245                  : void 0;
246        })(),
247        ie: (function () {
248          return (
249            !!(window.ActiveXObject || "ActiveXObject" in window) &&
250            ((n.match(/msie\s(\d+)/) || [])[1] || "11")
251          );
252        })(),
253        weixin: o("micromessenger"),
254      };
255    return (
256      t && !r[t] && (r[t] = o(t)),
257      (r.android = /android/.test(n)),
258      (r.ios = "ios" === r.os),
259      (r.mobile = !(!r.android && !r.ios)),
260      r
261    );
262  },
263  setEvents: function (b, pos) {
264    var $b = $(b);
265    var href = $b.attr("href");
266    if (href.indexOf(".exe") !== -1) return;
267    if (href && !/^javascript/.test(href)) {
268      var eType = "click";
269      var eCate = href;
270      if (/\.(exe|zip|dmg)$/.test(href)) {
271        eType = "download";
272        eCate = __gc.gaEventCategories[href];
273      } else if (/\/$/.test(href)) {
274        eCate = href + "index.html";
275      }
276      eCate =
277        eCate != undefined ? eCate.replace("https://", "https:\\/\\/") : "";
278      eCate = eCate.split("?")[0].trim();
279      $b.attr(
280        "onclick",
281        "ga('send', 'event', '" + eCate + "', '" + eType + "', '" + pos + "')",
282      );
283    }
284  },
285  setNavEvents: function () {
286    __gc.gaEvents();
287    var _ = this;
288
289    var $header = $("header");
290    var pref = _.showCurrentLang() === "en" ? "" : "/" + _.showCurrentLang();
291    const prepath = window.location.pathname.endsWith("/")
292      ? window.location.pathname + "index.html"
293      : window.location.pathname;
294    $header.find("a[href]").each(function (i, b) {
295      _.setEvents(b, prepath + "_top-navi");
296    });
297    var $footer = $("footer");
298    $footer.find("a[href]").each(function (i, b) {
299      _.setEvents(b, prepath + "_bottom-navi");
300    });
301    var $lanSelect = $(".lan-select");
302    $lanSelect.find("a[href]").each(function (i, b) {
303      var langTxt = $(b)
304        .text()
305        .split("-")[0]
306        .replace(/^\s+|\s+$/gm, "");
307      _.setEvents(b, langTxt);
308    });
309  },
310  gaEvents: function () {
311    $("[data-ga]").each(function (i, it) {
312      var gaDataGaArry = $(it).attr("data-ga").split(",");
313      if (__qt.isArticleEntry()) {
314        var regex = /_(.*)/;
315        var match =
316          gaDataGaArry[2] && typeof gaDataGaArry[2] === "string"
317            ? gaDataGaArry[2].trim().match(regex)
318            : null;
319
320        var sectionMark = match ? match[0] : "";
321        var urlMark = "'" + window.location.pathname + sectionMark;
322
323        if (
324          typeof gaDataGaArry[1] === "string" &&
325          typeof gaDataGaArry[0] === "string"
326        ) {
327          $(it).attr(
328            "onclick",
329            "ga('send', 'event'," +
330              gaDataGaArry[0].trim() +
331              "," +
332              gaDataGaArry[1].trim() +
333              "," +
334              urlMark +
335              ");",
336          );
337        }
338      } else {
339        $(it).attr(
340          "onclick",
341          "ga('send', 'event'," +
342            gaDataGaArry[0].trim() +
343            "," +
344            gaDataGaArry[1].trim() +
345            "," +
346            gaDataGaArry[2].trim() +
347            ");",
348        );
349      }
350    });
351    var isPPC = /(\/ppc\/)/.test(window.location.pathname);
352    isPPC &&
353      $("a[href*='checkout.php']").each(function () {
354        var onclickAttr = $(this).attr("onclick");
355        var href = $(this).attr("href");
356        if (
357          !onclickAttr ||
358          onclickAttr.indexOf("gtag_report_conversion") === -1
359        ) {
360          var newOnclick = onclickAttr || "";
361          newOnclick += "gtag_report_conversion('" + href + "');";
362          $(this).attr("onclick", newOnclick);
363        }
364      });
365  },
366};
367var __qt = {
368  debounce: function (func, wait, immediate) {
369    var timeout;
370    return function () {
371      var context = this,
372        args = arguments;
373      var later = function () {
374        timeout = null;
375        if (!immediate) func.apply(context, args);
376      };
377      var callNow = immediate && !timeout;
378      clearTimeout(timeout);
379      timeout = setTimeout(later, wait);
380      if (callNow) func.apply(context, args);
381    };
382  },
383  webphacks: function () {
384    var isSupportWebp = (function () {
385      try {
386        return (
387          document
388            .createElement("canvas")
389            .toDataURL("image/webp", 0.5)
390            .indexOf("data:image/webp") === 0
391        );
392      } catch (err) {
393        return false;
394      }
395    })();
396    if (!isSupportWebp) {
397      $("body").addClass("notSupportWebp");
398      $("img,picture source").each(function (i, item) {
399        var $imgItem = $(item);
400        var imgSrc = $imgItem.attr("src");
401        var sourceSrcset = $imgItem.attr("srcset");
402        if (/.webp/.test(imgSrc)) {
403          $imgItem.attr("src", imgSrc.replace(".webp", ".png"));
404        }
405        if (/.webp/.test(sourceSrcset)) {
406          $imgItem.attr("srcset", sourceSrcset.replace(".webp", ".png"));
407        }
408      });
409    }
410  },
411  getBrowserInfo: function () {
412    var agent = navigator.userAgent.toLowerCase(),
413      regStr_ie = /msie [\d.]+;/gi,
414      regStr_ff = /firefox\/[\d.]+/gi,
415      regStr_chrome = /chrome\/[\d.]+/gi,
416      regStr_saf = /safari\/[\d.]+/gi;
417    return agent.indexOf("msie") > 0
418      ? agent.match(regStr_ie)
419      : agent.indexOf("firefox") > 0
420        ? agent.match(regStr_ff)
421        : agent.indexOf("safari") > 0 && agent.indexOf("chrome") < 0
422          ? agent.match(regStr_saf)
423          : agent.indexOf("chrome") > 0
424            ? agent.match(regStr_chrome)
425            : void 0;
426  },
427  apperVisualArea: function (dom) {
428    var windowHeigth = $(window).height();
429    var isHidden =
430      dom.getBoundingClientRect().top > 0 &&
431      dom.getBoundingClientRect().top < windowHeigth;
432    return isHidden;
433  },
434  slick: function () {
435    if ($('[data-slick="content"]').length == 0) {
436      return;
437    }
438    $.getScript("/resource/lib/slick.min.js", function () {
439      function __slick($elem) {
440        var $parent = $elem.parents('[data-slick="parent"]');
441        var $selectSlikBtn = $parent.find('[data-slick="closest"]').children();
442        $elem.slick(
443          $elem.data("options")
444            ? new Function("return " + $elem.data("options"))()
445            : {},
446        );
447        $('[data-slick="content"]').on(
448          "beforeChange",
449          function (event, slick, currentSlide, nextSlide) {
450            var $slickWrap = $(event.target);
451            $slickWrap
452              .parents('[data-slick="parent"]')
453              .find('[data-slick="closest"] .item')
454              .eq(nextSlide)
455              .addClass("active")
456              .siblings("")
457              .removeClass("active");
458          },
459        );
460        if ($selectSlikBtn.length > 0) {
461          $selectSlikBtn.click(function () {
462            var $this = $(this);
463            $this
464              .addClass("show fade in active")
465              .siblings()
466              .removeClass("show fade in active");
467            $parent
468              .find('[data-slick="content"]')
469              .slick("slickGoTo", $this.index());
470          });
471          $('[role="presentation"]').on("click", function () {
472            var index = $(this).index();
473            $selectSlikBtn.removeClass("active").eq(index).addClass("active");
474          });
475        }
476      }
477      $('[data-slick="content"]').each(function (i) {
478        var $this;
479        __slick($(this));
480      });
481    });
482  },
483  addAnimate: function () {
484    if (
485      sessionStorage.getItem("__set_Animate_" + window.location.pathname) ==
486        null &&
487      ($(".lottie").length > 0 || $("[data-animate]").length > 0)
488    ) {
489      function add() {
490        var windowHeigth = $(window).height();
491        $("[data-animate]").each(function (i, item) {
492          var itemHeight = $(item).height();
493          var type = $(item).attr("data-animate");
494          if (itemHeight > 0.6 * windowHeigth) {
495            item.getBoundingClientRect().top - 0.5 * itemHeight <
496            windowHeigth * 0.8
497              ? $(item).addClass("animated " + type)
498              : false;
499          } else {
500            item.getBoundingClientRect().top > windowHeigth * 0.15 &&
501            item.getBoundingClientRect().top < windowHeigth * 0.85
502              ? $(item).addClass("animated " + type)
503              : false;
504          }
505        });
506      }
507      add();
508      if ($(window).width() > 1024) {
509        $(window).on("scroll", function () {
510          add();
511        });
512      } else {
513        $("[data-animate]").each(function (i, item) {
514          var type = $(item).attr("data-animate");
515          $(item).addClass("animated " + type);
516        });
517      }
518      $(window).scroll(function () {
519        if (
520          $(window).scrollTop() + $(window).height() >=
521            $(document).height() - 600 &&
522          sessionStorage.getItem("__set_Animate_" + window.location.pathname) ==
523            null
524        ) {
525          __qt.setAnimateSession();
526        }
527      });
528    } else {
529      $("[data-animate='fadeInUp']").css({
530        transform: "none",
531        opacity: 1,
532      });
533    }
534  },
535  setNavIcons: function (transtext) {
536    var notLang = [
537      "pt",
538      "ar",
539      "nl",
540      "id",
541      "ru",
542      "pl",
543      "kr",
544      "hi",
545      "tr",
546      "my",
547      "th",
548      "vn",
549      "en",
550    ];
551    var $navLinks = $("#header-sep").find(".sub-it-tit");
552    var lang = __gc.showCurrentLang();
553    var currentKey = notLang.includes(lang) ? "" : "/" + lang;
554    var currentKeyMult = "en" === lang ? "/" : "/" + lang + "/";
555    var acbnCurrentKey = "";
556    var acbnCurrentKeyMult = "";
557    if (lang == "tw" || lang == "es" || lang == "jp" || lang == "it") {
558      acbnCurrentKey = "";
559      acbnCurrentKeyMult = "/";
560    } else {
561      acbnCurrentKey = "en" === lang ? "" : "/" + lang;
562      acbnCurrentKeyMult = "en" === lang ? "/" : "/" + lang + "/";
563    }
564    var navIconHtml = {
565      0: {
566        el:
567          '<div class="subtitlebox">' +
568          "<a href=\"https://go.ubackup.com/dl/adb/AOMEIBackupperStd.exe\" data-monitor=\"'download','top'\" class=\"subtitle subtitle-bl subtitle-hover\" onclick=\"ga('send','event','Download AB Standard','download','" +
569          "/top-navi');\">" +
570          transtext["+t6"] +
571          "</a></div>",
572      },
573    };
574    var downloadLinksArray = [
575      [
576        {
577          link: "https://go.ubackup.com/dl/adb/ABProTrial.exe",
578          gaEvent:
579            "ga('send','event','Download AB Pro' ,'download','" +
580            currentKeyMult +
581            "top-navi');",
582          monitor: "'download','top'",
583          transtext: "+t5",
584          className: "subtitle-bl",
585        },
586        {
587          link: currentKey + "/buy-ab-pro.html",
588          gaEvent:
589            "ga('send','event','" +
590            currentKeyMult +
591            "buy-ab-pro.html', 'click', '" +
592            currentKeyMult +
593            "top-navi'); ",
594          monitor: "'2buy','top'",
595          transtext: "+t4",
596          className: "subtitle-org",
597        },
598      ],
599      [
600        {
601          link: "https://go.ubackup.com/dl/adb/ABWorkstationTrial.exe",
602          gaEvent:
603            "ga('send','event','Download AB Workstation' ,'download','" +
604            currentKeyMult +
605            "top-navi');",
606          monitor: "'download','top'",
607          transtext: "+t5",
608          className: "subtitle-bl",
609        },
610        {
611          link: currentKey + "/buy-ab-workstation.html",
612          gaEvent:
613            "ga('send','event','" +
614            currentKeyMult +
615            "buy-ab-workstation.html' ,'click','" +
616            currentKeyMult +
617            "top-navi');",
618          monitor: "'2buy','top'",
619          transtext: "+t4",
620          className: "subtitle-org",
621        },
622      ],
623      [
624        {
625          link: "https://go.ubackup.com/dl/adb/ABServerTrial.exe",
626          gaEvent:
627            "ga('send','event','Download AB Server' ,'download','" +
628            currentKeyMult +
629            "top-navi');",
630          monitor: "'download','top'",
631          transtext: "+t5",
632          className: "subtitle-bl",
633        },
634        {
635          link: currentKey + "/buy-ab-server.html",
636          gaEvent:
637            "ga('send','event','" +
638            currentKeyMult +
639            "buy-ab-server.html' ,'click','" +
640            currentKeyMult +
641            "top-navi');",
642          monitor: "'2buy','top'",
643          transtext: "+t4",
644          className: "subtitle-org",
645        },
646      ],
647      [
648        {
649          link: "https://go.ubackup.com/dl/adb/ABTechTrial.exe",
650          gaEvent:
651            "ga('send','event','Download AB Tech' ,'download','" +
652            currentKeyMult +
653            "top-navi');",
654          monitor: "'download','top'",
655          transtext: "+t5",
656          className: "subtitle-bl",
657        },
658        {
659          link: currentKey + "/buy-ab-tech.html",
660          gaEvent:
661            "ga('send','event','" +
662            currentKeyMult +
663            "buy-ab-tech.html' ,'click','" +
664            currentKeyMult +
665            "top-navi');",
666          monitor: "'2buy','top'",
667          transtext: "+t4",
668          className: "subtitle-org",
669        },
670      ],
671      [
672        {
673          link: "https://go.ubackup.com/dl/adb/ABTechPlusTrial.exe",
674          gaEvent:
675            "ga('send','event','Download AB TechPlus' ,'download','" +
676            currentKeyMult +
677            "top-navi');",
678          monitor: "'download','top'",
679          transtext: "+t5",
680          className: "subtitle-bl",
681        },
682        {
683          link: currentKey + "/buy-ab-techplus.html",
684          gaEvent:
685            "ga('send','event','" +
686            currentKeyMult +
687            "buy-ab-techplus.html' ,'click','" +
688            currentKeyMult +
689            "top-navi');",
690          monitor: "'2buy','top'",
691          transtext: "+t4",
692          className: "subtitle-org",
693        },
694      ],
695      [
696        {
697          link: acbnCurrentKey + "/enterprise/download.html",
698          gaEvent:
699            "ga('send','event','" +
700            currentKeyMult +
701            "enterprise/download.html' ,'click','" +
702            currentKeyMult +
703            "top-navi');",
704          monitor: "'2download','top'",
705          transtext: "+t6",
706          className: "subtitle-bl",
707        },
708      ],
709      [
710        {
711          link: acbnCurrentKey + "/enterprise/download-trial.html",
712          gaEvent:
713            "ga('send','event','" +
714            acbnCurrentKeyMult +
715            "enterprise/download-trial.html' ,'download','" +
716            currentKeyMult +
717            "top-navi');",
718          monitor: "'2download','top'",
719          transtext: "+t5",
720          className: "subtitle-bl",
721        },
722        {
723          link: acbnCurrentKey + "/enterprise/buy.html",
724          gaEvent:
725            "ga('send','event','" +
726            acbnCurrentKeyMult +
727            "enterprise/buy.html' ,'click','" +
728            currentKeyMult +
729            "top-navi');",
730          monitor: "'2buy','top'",
731          transtext: "+t4",
732          className: "subtitle-org",
733        },
734      ],
735      [
736        {
737          link: "https://go.ubackup.com/dl/dra/win/MyRecover_Windows_Free.exe",
738          gaEvent:
739            "ga('send','event','Donwload MR Win Free' ,'download','" +
740            currentKeyMult +
741            "top-navi');",
742          monitor: "'download','top'",
743          transtext: "+t6",
744          className: "subtitle-bl",
745        },
746      ],
747      [
748        {
749          link: "https://go.ubackup.com/dl/dra/MyRecover_for_iOS_Setup.exe",
750          gaEvent:
751            "ga('send','event','Download MR iOS' ,'download','" +
752            currentKeyMult +
753            "top-navi');",
754          monitor: "'download','top'",
755          transtext: "+t6",
756          className: "subtitle-bl",
757        },
758      ],
759    ];
760    downloadLinksArray.forEach(function (link, index) {
761      var htmlStr = "";
762      link.forEach(function (linkHtml) {
763        htmlStr +=
764          '<a href="' +
765          linkHtml.link +
766          '" ' +
767          'data-monitor="' +
768          linkHtml.monitor +
769          '"' +
770          'class="subtitle ' +
771          linkHtml.className +
772          ' subtitle-hover" ' +
773          'onclick="' +
774          linkHtml.gaEvent +
775          '">' +
776          transtext[linkHtml.transtext] +
777          "</a>";
778      });
779
780      var allHtml = '<div class="subtitlebox">' + htmlStr + "</div>";
781      navIconHtml[index + 1] = {
782        el: allHtml,
783      };
784    });
785    $navLinks.each(function (i, b) {
786      if (navIconHtml.hasOwnProperty(i + "")) {
787        var currentNavConf = navIconHtml[i + ""];
788        $(b).append(currentNavConf.el);
789      }
790    });
791  },
792  headerNav: function (screenWidth) {
793    var pathname = window.location.pathname;
794    var isPhoneAticles = /phone-backup/.test(pathname);
795    if (!isPhoneAticles) {
796      scroll();
797    }
798
799    $(".dropdown-submenu").mouseenter(function () {
800      $(this)
801        .parents(".dropdown-item")
802        .find(".dropdown-item-tit")
803        .css("text-decoration", "unset");
804    });
805    $(".dropdown-submenu").mouseleave(function () {
806      $(this)
807        .parents(".dropdown-item")
808        .find(".dropdown-item-tit")
809        .removeAttr("style");
810    });
811
812    function open(elem) {
813      var $elem = $(elem);
814      $(".has-drop").removeClass("active");
815      $elem.addClass("active").find(".drop").slideDown();
816      $elem.siblings().removeClass("active").find(".drop").slideUp();
817    }
818
819    function close(elem) {
820      var $elem = $(elem);
821      $elem.removeClass("active").find(".drop").slideUp();
822    }
823
824    var $dropdownItem = $("header .dropdown-item");
825    var $dropdownContent = $("header .dropdown-content");
826    var $navContent = $("header .nav-content");
827
828    function toggleDropdown($element) {
829      $element.parent().siblings().find($dropdownContent).stop().slideUp();
830      $element.siblings($dropdownContent).stop().slideToggle();
831      $element.toggleClass("open");
832
833      $element.parent().siblings().find(".nav-btn").removeClass("open");
834    }
835
836    function toggleSubmenu($element) {
837      if (!$element.hasClass("open")) {
838        $element.addClass("open").siblings().removeClass("open");
839        $element.siblings().find(".dropdown-submenu").stop().slideUp();
840        $element.find(".dropdown-submenu").stop().slideDown();
841      } else {
842        $element.removeClass("open");
843        $element.find(".dropdown-submenu").stop().slideUp();
844      }
845    }
846
847    function burgerChange() {
848      if ($("#burger").is(":checked")) {
849        $navContent.stop().slideDown();
850      } else {
851        $navContent.stop().slideUp();
852      }
853    }
854    $(
855      ".header .has-drop, .footer .has-drop, #burger, header .dropdown-item, header .dropdown .nav-btn, header .dropdown-item-link",
856    ).off();
857    if (screenWidth <= 992) {
858      $(".header .has-drop, .footer .has-drop").on("click", function () {
859        $(this).toggleClass("active");
860        $(this).hasClass("active") ? open(this) : close(this);
861      });
862      $("#burger").on("change", function () {
863        burgerChange();
864      });
865
866      $("header .dropdown .nav-btn").on("click", function () {
867        toggleDropdown($(this));
868      });
869
870      $("header .dropdown-item-link").on("click", function (e) {
871        // 获取 data-index 值
872        const dataIndex = $(this).parent(".dropdown-item").attr("data-index");
873        // 如果 data-index 不是 "1-3",阻止默认行为
874        console.log("点击了");
875        console.log(dataIndex);
876
877        if (dataIndex !== "1-3") {
878          console.log(11111111111);
879
880          e.preventDefault();
881        }
882      });
883
884      $dropdownItem.on("click", function () {
885        toggleSubmenu($(this));
886      });
887    } else {
888      $(".burger").addClass("active").find("input").prop("checked", false);
889      $(".nav-btn").removeClass("open");
890      $dropdownItem.on({
891        mouseenter: function () {
892          $(this).addClass("active");
893          if ($(this).hasClass("dropdown-item-submenu")) {
894            $(this).parent().addClass("open");
895          } else {
896            $(this).parent().removeClass("open");
897          }
898        },
899        mouseleave: function () {
900          $(this).removeClass("active");
901        },
902      });
903
904      $('header [data-menu="1"]').on("mouseleave", function () {
905        $(this).find($dropdownItem).eq(0).addClass("active");
906      });
907
908      $(".virtual-link").hover(
909        function () {
910          $(this).parent().addClass("active");
911        },
912        function () {
913          $(this).parent().removeClass("active");
914        },
915      );
916
917      $("header, footer, .lan-select").find("*").removeAttr("style");
918    }
919  },
920
921  openlLanguage: function (screenWidth) {
922    $(".lan-select .close")
923      .off("click")
924      .on("click", function () {
925        var $this = $(this);
926        $this.parents(".lan-select").hide();
927        $("body").removeClass("ovfh");
928      });
929
930    $('[data-lan="it-tt"], [data-lan="show"]').off("click");
931
932    if (screenWidth <= 992) {
933      $('[data-lan="it-tt"]').on("click", function () {
934        $this = $(this);
935        $parents = $this.parents(".continent-it");
936        $cnt = $parents.find('[data-lan="it-cnt"]');
937        $cnt.slideToggle();
938        $parents.toggleClass("active");
939        $parents
940          .siblings(".continent-it")
941          .find('[data-lan="it-cnt"]')
942          .slideUp();
943        $parents
944          .parents(".col")
945          .siblings()
946          .find('[data-lan="it-cnt"]')
947          .slideUp();
948      });
949    }
950
951    $('[data-lan="show"]').on("click", function () {
952      $(".lan-select").show();
953      $("body").addClass("ovfh");
954    });
955  },
956  headerFunc: function () {
957    var screenWidth = $(window).width();
958
959    function handleResize() {
960      screenWidth = $(window).width();
961      __qt.headerNav(screenWidth);
962      __qt.openlLanguage(screenWidth);
963    }
964
965    $(window).on("resize", handleResize);
966    handleResize();
967    $.getJSON(
968      "/assets/lib/transtext/" +
969        __gc.showCurrentLang() +
970        "/transtext.json?v=1.1",
971      function (transtext) {
972        __qt.setNavIcons(transtext);
973      },
974    );
975  },
976  headerFooterGaEvent: function () {},
977
978  carouselScroll: function () {
979    var $scrollItem = $('[data-roll="carousel-scroll"]');
980    $scrollItem.length > 0 &&
981      $.get("/resource/lib/seamscroll.min.js", function () {
982        $scrollItem.each(function (i) {
983          seamscroll.init({
984            dom: $scrollItem[i],
985            direction: 2,
986            step: 1.5,
987          });
988        });
989      });
990  },
991  aomeiCloud: function () {
992    $("head").append(
993      '<link rel="stylesheet" href="/resource/acloud-pop/pop.css">',
994    );
995    if (typeof $.cookie === "undefined") {
996      $.getScript("/resource/lib/jquery.cookie.js");
997    }
998    $.get("/resource/acloud-pop/jquery.validate.js", function () {
999      $.get("/resource/acloud-pop/pop.js");
1000    });
1001  },
1002  activeJs: function () {
1003    $.getScript("https://static.ubackup.com/lib/ngnr.js", function () {
1004      $.getScript("https://static.ubackup.com/lib/ba.js");
1005    });
1006  },
1007  appendSMT: function () {
1008    if (window.location.pathname !== "") {
1009      var script = document.createElement("script");
1010      script.src = "https://static.ubackup.com/cdn/lib/amt.min.js";
1011      // script.src = "/assets/lib/amt.js";
1012      document.head.appendChild(script);
1013    }
1014  },
1015  toggleTab: function () {
1016    $('[data-tab="btn"]').on("click", function () {
1017      var $this = $(this);
1018      var index = $this.index();
1019      var $parent = $this.parents('[data-tab="parent"]');
1020      var $cnt = $parent.find('[data-tab="it"]');
1021      $this.addClass("active").siblings().removeClass("active");
1022      $cnt.eq(index).addClass("active").siblings().removeClass("active");
1023    });
1024  },
1025  accordion: function () {
1026    $('[data-parent="accordion"] [data-elem="tab-btn"]').click(function (e) {
1027      var $this = $(this);
1028      var $parentBox = $this.parents('[data-parent="accordion"]');
1029      var $itemBox = $this.parents('[data-elem="item"]');
1030      var $tabPanel = $itemBox.find('[data-elem="tab-panel"]');
1031      var isAccordion = $parentBox.data("accordion");
1032      var isOPen = $itemBox.hasClass("active");
1033      if (!$parentBox) return;
1034      if (isAccordion) {
1035        if (isOPen) {
1036          $tabPanel.stop().slideUp();
1037          $tabPanel.parents('[data-elem="item"]').removeClass("active");
1038        } else {
1039          $parentBox
1040            .find('[data-elem="item"]')
1041            .removeClass("active")
1042            .find('[data-elem="tab-panel"]')
1043            .stop()
1044            .slideUp();
1045          $tabPanel
1046            .stop()
1047            .slideDown()
1048            .parent('[data-elem="item"]')
1049            .addClass("active");
1050        }
1051      } else {
1052        isOPen
1053          ? $tabPanel
1054              .stop()
1055              .slideUp()
1056              .parents('[data-elem="item"]')
1057              .removeClass("active")
1058          : $tabPanel
1059              .stop()
1060              .slideDown()
1061              .parents('[data-elem="item"]')
1062              .addClass("active");
1063      }
1064    });
1065  },
1066  isMobile: function (opts) {
1067    const mobileRE =
1068      /(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i;
1069    const tabletRE = /android|ipad|playbook|silk/i;
1070    if (!opts) opts = {};
1071    let ua = opts.ua;
1072    if (!ua && typeof navigator !== "undefined") ua = navigator.userAgent;
1073    if (ua && ua.headers && typeof ua.headers["user-agent"] === "string") {
1074      ua = ua.headers["user-agent"];
1075    }
1076    if (typeof ua !== "string") return false;
1077    let result = mobileRE.test(ua) || (!!opts.tablet && tabletRE.test(ua));
1078    if (
1079      !result &&
1080      opts.tablet &&
1081      opts.featureDetect &&
1082      navigator &&
1083      navigator.maxTouchPoints > 1 &&
1084      ua.indexOf("Macintosh") !== -1 &&
1085      ua.indexOf("Safari") !== -1
1086    ) {
1087      result = true;
1088    }
1089    return result;
1090  },
1091  isPCDevice: function () {
1092    var isPc = "";
1093    isPc =
1094      navigator.userAgent
1095
1096        .toLowerCase()
1097
1098        .match(
1099          /(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i,
1100        ) == null
1101        ? "pc"
1102        : "mobile";
1103
1104    return isPc;
1105  },
1106
1107  getPrefixer: function (lang) {
1108    return lang === "en" ? "" : "/" + lang;
1109  },
1110  // 移动端下载添加流程
1111  addProperty: function () {
1112    if (__qt.isPCDevice() === "pc") {
1113      return;
1114    }
1115    const productHref = {
1116      "ab-std": "https://go.ubackup.com/dl/adb/AOMEIBackupperStd.exe",
1117      "ab-pro": "https://go.ubackup.com/dl/adb/ABProTrial.exe",
1118      "ab-wrk": "https://go.ubackup.com/dl/adb/ABWorkstationTrial.exe",
1119      "ab-srv": "https://go.ubackup.com/dl/adb/ABServerTrial.exe",
1120      "ab-tech": "https://go.ubackup.com/dl/adb/ABTechTrial.exe",
1121      "ab-techplus": "https://go.ubackup.com/dl/adb/ABTechPlusTrial.exe",
1122      abmac: "https://go.ubackup.com/dl/adb/mac/AOMEIBackupper.dmg",
1123      "pa-std": "https://go.ubackup.com/dl/pa/PAssist_Std.exe",
1124      "pa-pro": "https://go.ubackup.com/dl/pa/PAssist_ProDemo.exe",
1125      "pa-srv": "https://go.ubackup.com/dl/pa/PAssist_SrvDemo.exe",
1126      "pa-unl": "https://go.ubackup.com/dl/pa/PAssist_UnlDemo.exe",
1127      "pa-tech": "https://go.ubackup.com/dl/pa/PAssist_TechDemo.exe",
1128      "afr-free": "https://go.ubackup.com/dl/afr/FastRecoveryFree.exe",
1129      "afr-pro": "https://go.ubackup.com/dl/afr/FastRecoveryTrial.exe",
1130      "ar-free": "https://go.ubackup.com/dl/ar/FastRecovery_Windows_Free.exe",
1131      "ar-trial": "https://go.ubackup.com/dl/ar/FastRecovery_Windows_Trial.exe",
1132      "fb-installer": "https://go.ubackup.com/dl/fb/FoneBackupFree_installer.exe",
1133      "fb-free": "https://go.ubackup.com/dl/fb/FoneBackupFree.exe",
1134      "mr-free": "https://go.ubackup.com/dl/dra/win/MyRecover_Windows_Free.exe",
1135      "mr-pro": "https://go.ubackup.com/dl/dra/win/MyRecover_Windows_Trial.exe",
1136      mrios: "https://go.ubackup.com/dl/dra/MyRecover_for_iOS_Setup.exe",
1137      "ft-installer": "https://go.ubackup.com/dl/ftl/FoneTool_free_installer.exe",
1138      "ft-free": "https://go.ubackup.com/dl/ftl/FoneTool_free.exe",
1139
1140      "ac-free": "https://go.ubackup.com/dl/ac/AOMEICloner_Free.exe",
1141      "ac-demo": "https://go.ubackup.com/dl/ac/AOMEICloner.exe",
1142      arios: "https://go.ubackup.com/dl/arios/FastRecovery_iOS.exe",
1143    };
1144    if (
1145      window.location.pathname.indexOf("mobile-download-guidance.html") == -1
1146    ) {
1147      //   $('[href*="https://go.ubackup.com/dl/"]').each(function () {
1148
1149      //     const href = $(this).attr("href").trim();
1150      //     let key = '';
1151      //     $.each(productHref, function(i,it) {
1152      //        if( href.indexOf(it) > -1){
1153      //         return key = i
1154      //        }
1155      //     })
1156
1157      //     if (key) {
1158      //       $(this).attr("data-showdownloadpop", key);
1159      //     }
1160      //   });
1161      //   $("[data-showdownloadpop]").on("click" ,function (e) {
1162      //     e.preventDefault();
1163      //     var productName = $(this).data("showdownloadpop");
1164      //     window.location.href = __qt.getPrefixer(__gc.showCurrentLang()) + "/mobile-download-guidance.html?pd=" + productName;
1165      //   });
1166      $(document).on("click", '[href*="https://go.ubackup.com/dl/"]', function (e) {
1167        const href = $(this).attr("href").trim();
1168        let key = "";
1169        $.each(productHref, function (i, it) {
1170          if (href.indexOf(it) > -1) {
1171            return (key = i);
1172          }
1173        });
1174        if (key) {
1175          e.preventDefault();
1176          window.location.href =
1177            __qt.getPrefixer(__gc.showCurrentLang()) +
1178            "/mobile-download-guidance.html?pd=" +
1179            key;
1180        }
1181      });
1182    }
1183  },
1184  addDownloadPop: function () {
1185    $("[data-showdownloadpop]").length > 0 &&
1186      $.get("/resource/js/download-popup.js");
1187  },
1188  addGa4Ecommerce: function () {
1189    $("[data-product-ga]").length > 0 &&
1190      $.getScript("https://static.aomeisoftware.com/public/ga4Ecommerce.js");
1191  },
1192  addBehavior: function () {
1193    $("meta[name='identification']").attr("content") != "" &&
1194      navigator.cookieEnabled &&
1195      $.getScript(
1196        "https://static.aomeisoftware.com/public/chi.js?rev=cadqwdqdwqvq12",
1197      );
1198  },
1199  flipster: function () {
1200    var $flipster = $(".flipster");
1201    $flipster.length > 0 &&
1202      $.get("/assets/lib/jquery.flipster.js", function () {
1203        $(".flipster").flipster({
1204          itemContainer: "ul",
1205          itemSelector: "li",
1206          style: "carousel",
1207          start: 0,
1208          enableKeyboard: true,
1209          enableMousewheel: false,
1210          enableTouch: true,
1211          enableNav: false,
1212          enableNavButtons: true,
1213          onItemSwitch: function () {},
1214        });
1215      });
1216  },
1217  pagination: function () {
1218    var $box = $("#post-list");
1219    var a = $(".pagination");
1220    $box.length > 0 &&
1221      $(function () {
1222        $.get("/assets/lib/jquery.pagination.js", function (l, k, j) {
1223          if ("success" !== k) {
1224            return !1;
1225          }
1226          var h = $box.find("dd,.newlist li"),
1227            p = h.length;
1228          console.log(p);
1229          var onePageNum = Number($box.attr("data-page")) || 20;
1230          if (p > onePageNum) {
1231            var g = onePageNum;
1232            var m = function (v, s) {
1233              var q = (v - 1) * s + 1 - 1,
1234                x = q + s - 1;
1235              (h.show(),
1236                h.filter(":gt(" + x + ")").hide(),
1237                h.filter(":lt(" + q + ")").hide());
1238              for (var w = q; w <= x; w++) {
1239                var u = $(h[w]).find("dt img");
1240                u.length > 0 && u.data("src") && u.attr("src", u.data("src"));
1241              }
1242            };
1243            a.pagination({
1244              items: p,
1245              itemsOnPage: g,
1246              cssStyle: "light-theme",
1247              prevText: "<",
1248              nextText: ">",
1249              firstText: "<<",
1250              lastText: ">>",
1251              edges: 1,
1252              displayedPages: 4,
1253              useStartEdge: 1,
1254              useEndEdge: 1,
1255              ratioAtEnd: 0,
1256              hrefTextPrefix: "",
1257              useRatio: !1,
1258              onPageClick: function (q, o) {
1259                m(q, g);
1260                var n = $box.offset().top;
1261                return (
1262                  $("html,body").animate(
1263                    {
1264                      scrollTop: n,
1265                    },
1266                    500,
1267                  ),
1268                  !1
1269                );
1270              },
1271              onInit: function () {
1272                m(1, g);
1273              },
1274            });
1275          }
1276        });
1277      });
1278  },
1279  the_cookie_domain: function (a) {
1280    return "." + a.split(".")[1] + "." + a.split(".")[2];
1281  },
1282  setCookie: function (name, value, options = {}) {
1283    const { days = null, path = "/", domain = "" } = options;
1284    let expires = "";
1285    if (days !== null) {
1286      const date = new Date();
1287      date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
1288      expires = `expires=${date.toUTCString()};`;
1289    }
1290    let cookie = `${name}=${encodeURIComponent(value)};${expires}path=${path}`;
1291    if (domain) {
1292      cookie += `;domain=${domain}`;
1293    }
1294    document.cookie = cookie;
1295  },
1296  getCookie: function (name) {
1297    const cookies = document.cookie.split(";");
1298    for (let i = 0; i < cookies.length; i++) {
1299      const cookie = cookies[i].trim();
1300      if (cookie.startsWith(`${name}=`)) {
1301        return decodeURIComponent(cookie.substring(name.length + 1));
1302      }
1303    }
1304    return null;
1305  },
1306  prevod: function () {
1307    var buyPage = [
1308      "/ab/store.html",
1309      "/abnetwork.html",
1310      "/acb-buy.html",
1311      "/buy-ab-pro.html",
1312      "/buy-ab-server.html",
1313      "/buy-ab-tech.html",
1314      "/buy-ab-techplus.html",
1315      "/buy-ab-workstation.html",
1316      "/campaign/clone-hdd-to-ssd.html",
1317      "/free-partition.html",
1318      "/image-deployment-software.html",
1319      "/landing/2023-world-backup-day.html",
1320      "/landing/24hour-flash-sale-a.html",
1321      "/landing/2023-summer-sale.html",
1322      "/landing/aomei-store.html",
1323      "/landing/black-friday.html",
1324      "/landing/halloween-sale.html",
1325      "/onekey/okr-compare.html",
1326      "/onekey-buy.html",
1327      "/onekey-pro.html",
1328      "/standard-upgrade.html",
1329      "/store.html",
1330      "/upgrade.html",
1331      "/server.html",
1332      "/workstation.html",
1333      "/ab-technician.html",
1334      "/ab-technician-plus.html",
1335      "/campaign/upgrade-license.html",
1336      "/landing/yearly-store.html",
1337      "/phone/store.html",
1338      "/phone/download.html",
1339      "/data-recovery/buy-adr-ios.html",
1340      "/data-recovery/campaign/upgrade-aomei-mbackupper-recommended.html",
1341      "/data-recovery/campaign/upgrade-pa-demo.html",
1342      "/data-recovery/landing/store.html",
1343      "/data-recovery/partition-recovery.html",
1344      "/data-recovery/purchase.html",
1345      "/data-recovery/windows-recovery.html",
1346      "/enterprise/aomei-sql-database-backup-buy.html",
1347      "/enterprise/buy.html",
1348      "/enterprise/download-trial.html",
1349      "/enterprise/server-backup.html",
1350      "/enterprise/workstation-backup.html",
1351      "/onekey-pro.html",
1352      "/data-recovery/buy-adr-ios.html",
1353    ];
1354
1355    var _this = this;
1356
1357    $("a").each(function () {
1358      var href = $(this).attr("href");
1359      if (href && !href.startsWith("#")) {
1360        var updatedHref = href
1361          .replace(/([?&])source=[^&]*(&)?/, function (match, p1, p2) {
1362            return p2 ? p1 : "";
1363          })
1364          .replace(/\?$/, "");
1365        $(this).attr("href", updatedHref);
1366      }
1367    });
1368
1369    $("body").on("click", "a", function (e) {
1370      var $this = $(this);
1371      var positionAttr = "";
1372      var href = $this.attr("href");
1373      var currentPathnam = window.location.pathname.replace(".html", "");
1374      currentPathnam.match(/\/$/g) &&
1375        (currentPathnam = currentPathnam + "index");
1376
1377      function getPrefixer(lang) {
1378        var host = window.location.host;
1379        if (
1380          host === "www.aomeitech.com" ||
1381          host === "www.aomei.de" ||
1382          host === "www.aomei.fr" ||
1383          host === "www.aomei.jp"
1384        ) {
1385          return "";
1386        } else {
1387          return lang === "en" ? "" : "/" + lang;
1388        }
1389      }
1390      var aUrl = new URL(href, window.location.href);
1391
1392      if (href && href.match(/^#/)) {
1393        return;
1394      }
1395      if (
1396        !(
1397          $this.attr("data-page") == "activity" ||
1398          buyPage.indexOf(
1399            aUrl.pathname.replace(getPrefixer(__gc.currentLang), ""),
1400          ) > -1
1401        )
1402      ) {
1403        return;
1404      }
1405      e.preventDefault();
1406      positionAttr = $this.attr("data-prevod")
1407        ? ":" + $this.attr("data-prevod")
1408        : "";
1409      var _ll_prevod = currentPathnam + positionAttr;
1410      var domain = _this.the_cookie_domain(window.location.hostname);
1411      _this.setCookie("_ll_prevod", _ll_prevod, {
1412        domain: domain,
1413      });
1414
1415      aUrl.searchParams.set("prevod", _ll_prevod);
1416      var newHref = aUrl.toString();
1417      var jumpType = $this.attr("target");
1418      if (jumpType === "_blank") {
1419        window.open(newHref, jumpType);
1420      } else {
1421        window.location.href = newHref;
1422      }
1423    });
1424    var pmpeHref =
1425      __gc.showCurrentLang() === "en"
1426        ? "/partition-manager-pro-edition.html"
1427        : "/" + __gc.showCurrentLang() + "/partition-manager-pro-edition.html";
1428    var $pmpe = $('[href="' + pmpeHref + '"]');
1429    $pmpe.each(function (i, item) {
1430      var $parents = $(item).parents(".dropdown-menu");
1431      var position = "";
1432      if ($parents.hasClass("dropdown-menu1")) {
1433        position = "for-home";
1434      } else if ($parents.hasClass("dropdown-menu2")) {
1435        position = "for-business";
1436      }
1437      var topNavi =
1438        __gc.showCurrentLang() === "en"
1439          ? "top-navi"
1440          : "/" + __gc.showCurrentLang() + "/top-navi";
1441      var newHref =
1442        $(item).attr("href") +
1443        "?from=" +
1444        __gc.showCurrentLang() +
1445        "_navi-" +
1446        position;
1447      var ga =
1448        "ga('send', 'event','" +
1449        $(item).attr("href") +
1450        "_" +
1451        position +
1452        "', 'click', '" +
1453        topNavi +
1454        "');";
1455      $(item).attr("href", newHref);
1456
1457      $(item).attr("onclick", ga);
1458    });
1459  },
1460  HeaderTabHigHlight: function () {
1461    var $tab = $("header .nav-menu li");
1462    var acbn = $tab.eq(2);
1463    var ft = $tab.eq(3);
1464    var mr = $tab.eq(4);
1465    if (__gc.showCurrentLang() == "en") {
1466      if (
1467        window.location.pathname.indexOf("phone") != "-1" ||
1468        window.location.pathname.indexOf("phone-backup") != "-1"
1469      ) {
1470        return ft.find(".nav-a").addClass("header-pitch");
1471      }
1472      if (window.location.pathname.indexOf("data-recovery") != "-1") {
1473        return mr.find(".nav-a").addClass("header-pitch");
1474      }
1475    }
1476  },
1477  isArticleEntry: function () {
1478    var isArticlePage_ub = $('[data-category="post"]').length > 0;
1479    var isArticlePage_dp =
1480      $(".js-toc-box").length > 0 ||
1481      $(".article-banner+.article-content-box").length > 0 ||
1482      ($("#post-main-column").length > 0 &&
1483        $("#post-main-column").hasClass("main-content"));
1484    var isArticlePage_at = $(".article-banner").length > 0;
1485    return isArticlePage_ub || isArticlePage_dp || isArticlePage_at;
1486  },
1487  loadFeedbackModule: function () {
1488    var lang = __gc.showCurrentLang(),
1489      postUrl =
1490        window.location.protocol +
1491        "//" +
1492        window.location.host +
1493        window.location.pathname,
1494      site = window.location.protocol + "//" + window.location.host,
1495      author = $("meta[name='author']").attr("content"),
1496      handleFeedbackUrl = "https://www.ubackup.com/ss/post/feedback";
1497    if (!__gc.langs.includes(lang)) lang = "en";
1498    var mainContent = "";
1499    // if ($("#template-v2").length > 0) {
1500    //   if (window.location.pathname.indexOf("help/") == -1) {
1501    //     mainContent = $(".ctt-wrap").first();
1502    //   } else {
1503    //     mainContent = $(".main");
1504    //   }
1505    // } else {
1506    //   mainContent = $(".ctt-wrap").first();
1507    // }
1508    if (
1509      window.location.pathname.indexOf("help/") != -1 ||
1510      window.location.pathname.indexOf("troubleshooting/") != -1
1511    ) {
1512      mainContent = $(".main .container");
1513    } else {
1514      mainContent = $(".ctt-wrap").first();
1515    }
1516    if (__qt.isArticleEntry() && postUrl.indexOf("--tmp") == -1) {
1517      $.getScript("/assets/js/feedback-content.js", function () {
1518        mainContent.after(__feedbackHtml[lang].title);
1519        var feedbackTitle = $("#feedback-title");
1520        feedbackTitle.after(__feedbackHtml[lang].btnList);
1521        var loading = '<div id="feedback-loading"></div>';
1522        $(document).on("click", "#useful-btn", function () {
1523          $(".helpful-btn-list").remove();
1524          feedbackTitle.html("");
1525          $.ajax({
1526            url: handleFeedbackUrl,
1527            type: "post",
1528            data: {
1529              full_path: postUrl,
1530              is_helpful: 1,
1531              site: site,
1532              author: author,
1533              lang: lang,
1534            },
1535            beforeSend: function () {
1536              if ($(".feedback .container #feedback-loading").length < 1) {
1537                feedbackTitle.css("display", "none");
1538                $(".feedback .container").append(loading);
1539              }
1540            },
1541            success: function (res) {
1542              feedbackTitle.css("display", "inline-block");
1543              if (res.code != 429) {
1544                // feedbackTitle.addClass("gou");
1545                // feedbackTitle.html(__feedbackHtml[lang].thankNotice);
1546
1547                if (!$(".preferred-google").length) {
1548                  feedbackTitle.addClass("gou");
1549                  feedbackTitle.html(__feedbackHtml[lang].thankNotice);
1550                } else {
1551                  var preferredGoogle = __feedbackHtml[lang].preferredGoogle;
1552                  $(".feedback .container").html(preferredGoogle);
1553                  var currentGa = `ga('send', 'event', 'https:\/\/www.google.com/preferences/source?q=ubackup.com', 'click', '${window.location.pathname}_feedback');`;
1554                  $(".feedback .clickYes .am-btn").attr("onclick", currentGa);
1555                }
1556              } else {
1557                feedbackTitle.html(__feedbackHtml[lang].rateLimit);
1558              }
1559            },
1560            complete: function () {
1561              $("body #feedback-loading").remove();
1562            },
1563          });
1564        });
1565        $(document).on("click", "#unuseful-btn", function () {
1566          $(".feedback .box").css("flex-direction", "column");
1567          $(".feedback .container").addClass("clickNo");
1568          $(".helpful-btn-list").remove();
1569          var feedbackForm = __feedbackHtml[lang].form;
1570          if (
1571            window.location.pathname.indexOf("phone-backup") != -1 &&
1572            window.location.pathname.indexOf("phone-backup-tips") === -1
1573          ) {
1574            feedbackForm = feedbackForm.replaceAll(
1575              "[email protected]",
1576              "[email protected]",
1577            );
1578          }
1579          if (window.location.pathname.indexOf("enterprise-backup") != -1) {
1580            feedbackForm = feedbackForm.replaceAll(
1581              "[email protected]",
1582              "[email protected]",
1583            );
1584          }
1585          $("#feedback-title")
1586            .html(__feedbackHtml[lang].formTitle)
1587            .after(feedbackForm);
1588          $(".feedback")
1589            .css("padding-top", "45px")
1590            .css("padding-bottom", "55px");
1591          var maxNumber = 200;
1592          $("#feedback-txt").on("input propertychange", function () {
1593            var $this = $(this),
1594              _val = $this.val(),
1595              count = "";
1596            if (_val.length > maxNumber) {
1597              $("#character-counter").css("color", "#ff5454");
1598              $("#feedback-txt").css("border-color", "#ff5454");
1599              $("#feedback-notice")
1600                .css("display", "block")
1601                .html(__feedbackHtml[lang].maxLimit);
1602              $("#feedback-submit")
1603                .css("cursor", "not-allowed")
1604                .css("background-color", "#bdbdbd")
1605                .attr("disabled", true);
1606            } else {
1607              $("#character-counter").css("color", "#7d7d7d");
1608              $("#feedback-txt").css("border-color", "#cacfd3");
1609              $("#feedback-notice").css("display", "none");
1610              $("#feedback-submit")
1611                .css("cursor", "pointer")
1612                .css("background-color", "#137df5")
1613                .removeAttr("disabled");
1614            }
1615            count = maxNumber - $this.val().length;
1616            $("#left-character").text(count);
1617          });
1618          $(document).on("click", "#feedback-submit", function () {
1619            feedbackTitle.html("");
1620            $.ajax({
1621              url: handleFeedbackUrl,
1622              type: "post",
1623              data: {
1624                full_path: postUrl,
1625                is_helpful: 0,
1626                feedback_no: $("#feedback-txt").val(),
1627                site: site,
1628                author: author,
1629                lang: lang,
1630              },
1631              beforeSend: function () {
1632                if ($(".feedback .container #feedback-loading").length < 1) {
1633                  feedbackTitle.css("display", "none");
1634                  $(".feedback .container").append(loading);
1635                }
1636              },
1637              success: function (res) {
1638                feedbackTitle.css("display", "inline-block");
1639                if (res.code == 429) {
1640                  $("#feedback-title").html(__feedbackHtml[lang].rateLimit);
1641                } else {
1642                  console.log("submited");
1643                  feedbackTitle.addClass("gou");
1644                  $("#feedback-title").html(__feedbackHtml[lang].thankNotice);
1645                }
1646              },
1647              complete: function () {
1648                $("body #feedback-loading").remove();
1649              },
1650            });
1651            $("#feedback-form").remove();
1652          });
1653          $(document).on("click", "#feedback-cancel", function () {
1654            $(".feedback .box").css("flex-direction", "row");
1655            feedbackTitle.html(__feedbackHtml[lang].titleWithoutTag);
1656            $(".feedback .container").removeClass("clickNo");
1657            $("#feedback-form").remove();
1658            $(".helpful-btn-list").length < 1 &&
1659              feedbackTitle.after(__feedbackHtml[lang].btnList);
1660          });
1661        });
1662      });
1663    }
1664  },
1665  setAnimateSession: function () {
1666    console.log(321);
1667    sessionStorage.setItem(
1668      "__set_Animate_" + window.location.pathname,
1669      "animated",
1670    );
1671  },
1672  addAcbnImgBorder: function () {
1673    var addBorder =
1674      /(\/enterprise-backup\/)|(\/enterprise\/)|(\/enterprise-help\/)/.test(
1675        window.location.pathname,
1676      );
1677    if (addBorder && $('[data-category="post"]').length > 0) {
1678      $(".container-box a").each(function () {
1679        if ($(this).attr("href").indexOf("screenshot") != -1) {
1680          $(this).find("img").css("border", "1px solid rgb(0, 0, 0,0.5)");
1681        }
1682      });
1683    }
1684  },
1685  // 测试分配购物平台
1686  replacePlatform: function () {
1687    // 是否参加
1688    function isReplace() {
1689      let param = false;
1690      // var lang = __gc.showCurrentLang();
1691      var currentPage = window.location.pathname;
1692      var hasPages = [
1693        "/upgrade-now.html",
1694        "/upgrade-pro-trial.html",
1695        // "/campaign/thanks-install-ab-trial.html", // ver=pro_trial7.3.3 / ver=offstd2pro / 参数为空
1696        // "/campaign/uninstall-discount.html", // edition=pro / 参数为空
1697        "/thanks-install-ab-standard.html",
1698      ];
1699      if (currentPage.indexOf("/campaign/thanks-install-ab-trial.html") > -1) {
1700        var ver = __gc.getUrlParam("ver");
1701        (!ver || /pro_trial|offstd2pro|offstd2protrial/.test(ver)) &&
1702          (param = true);
1703      } else if (
1704        currentPage.indexOf("/campaign/uninstall-discount.html") > -1
1705      ) {
1706        var edition = __gc.getUrlParam("edition");
1707        (!edition || /pro|protrial|std|stdtrial/.test(edition)) &&
1708          (param = true);
1709      } else {
1710        $.each(hasPages, function (i, page) {
1711          var currentPage = window.location.pathname;
1712          currentPage.indexOf(page) > -1 && (param = true);
1713        });
1714      }
1715      return param;
1716    }
1717    if (isReplace()) {
1718      var xid = __gc.getUrlParam("xid");
1719      var qid = xid ? xid.split("!")[1] : "";
1720      if (/1070|1068/.test(qid)) {
1721        //跳转2co平台
1722        $('[href*="https://go.ubackup.com/buy"]').click(function (e) {
1723          e.preventDefault();
1724          e.preventDefault();
1725          var $this = $(this);
1726          var href = $this.attr("href");
1727          if (/264|265|266|267|268|482|486/.test(href)) {
1728            window.location.href = href;
1729            return;
1730          }
1731          href =
1732            href.replace("&ep=cb", "").replace("&ep=si&an=1", "") + "&ep=vf";
1733          window.location.href = href;
1734        });
1735        $('[href*="https://go.ubackup.com/buy"]').on("contextmenu", function (event) {
1736          // event.preventDefault(); // 阻止默认的右键菜单
1737          var $this = $(this);
1738          var href = $this.attr("href");
1739          if (/264|265|266|267|268|482|486/.test(href)) {
1740            window.location.href = href;
1741            return;
1742          }
1743          href =
1744            href.replace("&ep=cb", "").replace("&ep=si&an=1", "") + "&ep=vf";
1745          $this.attr("href", href);
1746        });
1747      } else if (/1072|1073/.test(qid)) {
1748        // 跳转cb平台
1749        $('[href*="https://go.ubackup.com/buy"]').click(function (e) {
1750          e.preventDefault();
1751          e.preventDefault();
1752          var $this = $(this);
1753          var href = $this.attr("href");
1754          if (/264|265|266|267|268|482|486/.test(href)) {
1755            window.location.href = href;
1756            return;
1757          }
1758          href = href.replace("&ep=si&an=1", "") + "&ep=cb";
1759          window.location.href = href;
1760        });
1761        $('[href*="https://go.ubackup.com/buy"]').on("contextmenu", function (event) {
1762          // event.preventDefault(); // 阻止默认的右键菜单
1763          var $this = $(this);
1764          var href = $this.attr("href");
1765          if (/264|265|266|267|268|482|486/.test(href)) {
1766            window.location.href = href;
1767            return;
1768          }
1769          href = href.replace("&ep=si&an=1", "") + "&ep=cb";
1770          $this.attr("href", href);
1771        });
1772      }
1773    }
1774  },
1775};
1776__qt.loadFeedbackModule();
1777__qt.flipster();
1778__qt.webphacks();
1779$(function () {
1780  __qt.HeaderTabHigHlight();
1781  __gc.setNavEvents();
1782  __qt.slick();
1783  __qt.addAnimate();
1784  // __qt.addGa4Ecommerce();
1785  __qt.headerFunc();
1786  // __gc.gaEvents();
1787  __qt.aomeiCloud();
1788  __qt.carouselScroll();
1789  __qt.activeJs();
1790  // __qt.appendSMT();
1791  __qt.toggleTab();
1792  __qt.addProperty();
1793
1794  __qt.accordion();
1795  __qt.pagination();
1796  __qt.prevod();
1797  // __qt.addAcbnImgBorder()
1798  var $pricingBox = $('[data-elem="pricing-box"]');
1799  if ($pricingBox.length > 0) {
1800    $.get("/assets/lib/accounting.min.js", function () {
1801      $.getScript(
1802        "/assets/lib/transtext/" + __gc.showCurrentLang() + "/pricing-data.js",
1803        function () {
1804          __gc.showCurrentLang() == "jp"
1805            ? $.getScript("/assets/lib/pricing-vat.js").done(
1806                function (script, textStatus) {
1807                  $(".prd-it-add").addClass("isload");
1808                },
1809              )
1810            : $.getScript("/assets/lib/pricing.js").done(
1811                function (script, textStatus) {
1812                  $(".prd-it-add").addClass("isload");
1813                },
1814              );
1815        },
1816      );
1817    });
1818  }
1819  if (__gc.showCurrentLang() == "en") {
1820    let noSite =
1821      /(\/data-recovery\/)|(\/data-recovery-disk\/)|(\/data-recovery-phone\/)|(\/data-recovery-questions\/)/.test(
1822        window.location.pathname,
1823      );
1824    let text = $("header .nav-li").eq(4).find(".nav-a").text();
1825    !noSite && text == "Data Recovery" && $("header .nav-li").eq(4).hide();
1826  } else if (__gc.showCurrentLang() == "jp") {
1827    $("header")
1828      .not(".header-ft,.header-afb")
1829      .find(".nav-li")
1830      .eq(0)
1831      .find("a")
1832      .attr({
1833        href: "/jp/ab/store.html",
1834        onclick:
1835          "ga('send', 'event', '/jp/ab/store.html', 'click', '/jp/top-navi')",
1836      });
1837  }
1838});
1839
1840$(document).ready(function () {
1841  var downloadLinks = [
1842    "https://go.ubackup.com/dl/adb/AOMEIBackupperStd.exe",
1843    "https://go.ubackup.com/dl/adb/AOMEIBackupperStd.exe",
1844    "https://go.ubackup.com/dl/adb/ABProTrial.exe",
1845    "https://go.ubackup.com/dl/adb/ABProTrial.exe",
1846    "https://go.ubackup.com/dl/pa/PAssist_Std.exe",
1847    "https://go.diskpart.com/dl/pa/PAssist_Std.exe",
1848    "https://go.ubackup.com/dl/pa/PAssist_ProDemo.exe",
1849    "https://go.diskpart.com/dl/pa/PAssist_ProDemo.exe",
1850  ];
1851  var customAttributes = {
1852    "https://go.ubackup.com/dl/pa/PAssist_ProDemo.exe": "pa-pro",
1853    "https://go.diskpart.com/dl/pa/PAssist_ProDemo.exe": "pa-pro",
1854    "https://go.ubackup.com/dl/pa/PAssist_Std.exe": "pa-std",
1855    "https://go.diskpart.com/dl/pa/PAssist_Std.exe": "pa-std",
1856    "https://go.ubackup.com/dl/adb/ABProTrial.exe": "ab-pro",
1857    "https://go.ubackup.com/dl/adb/ABProTrial.exe": "ab-pro",
1858    "https://go.ubackup.com/dl/adb/AOMEIBackupperStd.exe": "ab-std",
1859    "https://go.ubackup.com/dl/adb/AOMEIBackupperStd.exe": "ab-std",
1860  };
1861  var shouldLoadScriptAndCss = false;
1862
1863  $("a").each(function () {
1864    var href = $(this).attr("href");
1865    if (downloadLinks.includes(href)) {
1866      shouldLoadScriptAndCss = true;
1867      // 添加自定义属性
1868      if (!$(this).attr("data-showdownloadpop") && customAttributes[href]) {
1869        $(this).attr("data-showdownloadpop", customAttributes[href]);
1870      }
1871      return false; // 退出循环
1872    }
1873  });
1874  var shouldLoadScriptAndCss = false; //暂时不要弹窗
1875  if (shouldLoadScriptAndCss) {
1876    // console.log("进入了");
1877    var script = document.createElement("script");
1878    script.src = "/resource/js/popupload.js";
1879    document.head.appendChild(script);
1880
1881    var link = document.createElement("link");
1882    link.rel = "stylesheet";
1883    link.href = "/resource/css/popupload.css";
1884    document.head.appendChild(link);
1885  } else {
1886    // console.log("没进入");
1887  }
1888});
1889__qt.replacePlatform();

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.