PageSourceSearch

https://app.winninghunter.com/js/main.js?v=159

js winninghunter.com collected 2026-09-24 12:49:21 UTC 3,965 bytes, 126 lines download raw bytes

1const clickUpgradeBox = function () {
2  gmodal = $("#generic-upgrade-modal");
3  let basicplanbox;
4  let standardplanbox;
5  let premiumplanbox;
6
7  let mypriority = document.querySelector("#priority") ? document.querySelector("#priority").value : null;
8  let cheapestupgradableplan = mypriority != null ? Number(mypriority) + 1 : null;
9
10  gmodal.find("[data-upgrade-box]").each(function () {
11    plan = $(this).data("upgrade-box");
12
13    if (plan == 1) {
14      basicplanbox = $(this);
15    } else if (plan == 2) {
16      standardplanbox = $(this);
17    } else if (plan == 3) {
18      premiumplanbox = $(this);
19    }
20  });
21
22  return { mypriority, cheapestupgradableplan, basicplanbox, standardplanbox, premiumplanbox };
23};
24
25const scrollToTopAndDisableScrollForSecond = () => {
26  window.scrollTo(0, 0);
27  $("body").css("overflow-y", "hidden");
28
29  setTimeout(function () {
30    $("body").css("overflow-y", "auto");
31  }, 1000);
32};
33
34$(".upgrade-btn-navbar").on("click", () => {
35  gmodal = $("#generic-upgrade-modal");
36  // Clear any stale inline display:none that a previous close handler
37  // may have applied (see closeTutorialModal in footer.php). Without
38  // this, the modal would stay invisible even after removing `out`.
39  gmodal.css("display", "");
40  gmodal.removeClass("out");
41  $(".generic-upgrade-modal-plan-name").text(`bigger plan`);
42  $(".upgrade_to_plan_name_class").text(`bigger plan`);
43  $(".upgrade-to-plan-text").text(`Choose a bigger plan below to upgrade to.`);
44  $(".upgrade-modal-headline").text("Upgrade Below!");
45  scrollToTopAndDisableScrollForSecond();
46
47  let billingDefault = "quarterly";
48  try {
49    if (typeof window.applyUpgradeModalBillingDefaultFromFlag === "function") {
50      billingDefault = window.applyUpgradeModalBillingDefaultFromFlag();
51    }
52  } catch (e) {}
53  
54  // Track upgrade modal viewed
55  try {
56    if (typeof posthog !== 'undefined' && posthog) {
57      posthog.capture('upgrade_modal_viewed', {
58        trigger: 'navbar',
59        modal_type: 'generic',
60        subscription_status: window.userSubscriptionStatus || 'unknown',
61        is_free_trial: window.isFreeTrial || false,
62        billing_period_default: billingDefault,
63        $feature_flag: 'upgrade-modal-billing-default'
64      });
65    }
66  } catch (e) {
67    console.error('PostHog tracking error:', e);
68  }
69
70  const { mypriority, cheapestupgradableplan, basicplanbox, standardplanbox, premiumplanbox } = clickUpgradeBox() || {};
71  if (mypriority != null && mypriority != 3) {
72    if (cheapestupgradableplan == 1 && basicplanbox) {
73      standardplanbox.click();
74    } else if (cheapestupgradableplan == 2 && standardplanbox) {
75      standardplanbox.click();
76    } else if (cheapestupgradableplan == 3 && premiumplanbox) {
77      premiumplanbox.click();
78    }
79  }
80});
81
82$(".get-trial-btn-navbar").on("click", function () {
83  try {
84    if (typeof posthog !== "undefined" && posthog) {
85      const $el = $(this);
86      posthog.capture($el.attr("data-ph-capture") || "navbar_get_trial_clicked", {
87        source: $el.attr("data-ph-source") || "dashboard_navbar",
88        subscription_status: window.userSubscriptionStatus || "unknown",
89        is_free_trial: window.isFreeTrial || false,
90      });
91    }
92  } catch (e) {
93    console.error("PostHog tracking error:", e);
94  }
95});
96
97function abbreviateNumber(number) {
98  var SI_SYMBOL = ["", "k", "M", "G", "T", "P", "E"];
99  // what tier? (determines SI symbol)
100  var tier = (Math.log10(Math.abs(number)) / 3) | 0;
101
102  // if zero, we don't need a suffix
103  if (tier == 0) return number;
104
105  // get suffix and determine scale
106  var suffix = SI_SYMBOL[tier];
107  var scale = Math.pow(10, tier * 3);
108
109  // scale the number
110  var scaled = number / scale;
111
112  // format number and add suffix
113  return scaled.toFixed(1) + suffix;
114}
115
116function checkUrl(string) {
117  let givenURL;
118  try {
119    givenURL = new URL(string);
120    return givenURL.hostname;
121  } catch (error) {
122    console.log("error is", error);
123    return false;
124  }
125  return true;
126}

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.