PageSourceSearch

https://useinfluence.co/js/custom.js

js useinfluence.co collected 2026-09-24 19:50:28 UTC 12,606 bytes, 452 lines download raw bytes

1$(document).ready(function () {
2  // plan animate
3
4
5
6
7  $("#largerPlanBtn").click(function () {
8    $("#priceSlider").toggleClass("active");
9    $("#largerPlanContainer").removeClass("hide");
10
11    const classname = $("#priceSlider").attr("class");
12
13    const innerWidth = $("#priceSlider").parent().innerWidth();
14    const outerWidth = $("#priceSlider").parent().outerWidth();
15    if (classname === "active") {
16      $(this).text("Hide Plans");
17      $("#priceSlider").animate({
18        left: 0,
19      });
20    } else {
21      $(this).text("See Mega Plans");
22      $("#priceSlider").animate(
23        {
24          left: -1500,
25        },
26        () => {
27          $("#largerPlanContainer").addClass("hide");
28        }
29      );
30    }
31  });
32
33
34
35
36  // landing page email form
37  $("#wf-form-Subscribe-home").submit(function (e) {
38    e.preventDefault();
39    console.log("clicked btn-----------");
40    document.getElementById("signupModal").style.display = "block";
41
42    // const email = $("#email-2").val();
43    // window.open(`https://app.useinfluence.co/signup?email=${email}`, '_self');
44    // console.log("email", email);
45  });
46  // landing page email form (bottom part)
47  $("#wf-form-Subscribe-bottom").submit(function () {
48    const email = $("#email-21").val();
49    window.open(`https://app.useinfluence.co/signup?email=${email}`, "_self");
50    // console.log("email", email);
51  });
52
53
54  $(".openmodal").click(function (e) {
55    e.preventDefault();
56    $(".modal").addClass("opened");
57    $(".modal").removeClass("hidden");
58  });
59  $(".closemodal").click(function (e) {
60    e.preventDefault();
61     $(".modal").addClass("hidden");
62    $(".modal").removeClass("opened");
63  });
64
65  $("#phone").intlTelInput({
66    initialCountry: "auto",
67    geoIpLookup: function (callback) {
68      $.get(
69        "https://extreme-ip-lookup.com/json/?key=UTiXVnrYntPf6s0qokOK",
70        function () {},
71        "json"
72      ).always(function (resp) {
73        var countryCode = resp && resp.countryCode ? resp.countryCode : "";
74        callback(countryCode);
75      });
76    },
77    utilsScript:
78      "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/8.4.6/js/utils.js",
79  });
80
81
82
83  $("#home-submit2").click(function (e) {
84    e.preventDefault();
85    console.log("clicked btn-----------");
86    document.getElementById("emailModal").style.display = "block";
87    // document.getElementById('loaderModal').style.display = 'block'
88    // const email = $("#email-21").val();
89    // window.location.href = `https://app.useinfluence.co/signup?email=${email}`;
90    // window.open(`https://app.useinfluence.co/signup?email=${email}`);
91    // console.log("email", email);
92  });
93
94  $("#abt-submit").click(function () {
95    const email = $("#email-3").val();
96    // window.location.href = `https://app.useinfluence.co/signup?email=${email}`;
97    window.open(`https://app.useinfluence.co/signup?email=${email}`);
98    // console.log("email", email);
99  });
100
101
102  // --------------------------------------------
103// --------------- PPC SCRIPT-------------------------------
104
105  $("#phone-input-ppc").intlTelInput({
106    initialCountry: "auto",
107    geoIpLookup: function (callback) {
108      $.get(
109        "https://extreme-ip-lookup.com/json/?key=UTiXVnrYntPf6s0qokOK",
110        function () {},
111        "json"
112      ).always(function (resp) {
113        var countryCode = resp && resp.countryCode ? resp.countryCode : "";
114        callback(countryCode);
115      });
116    },
117    utilsScript:
118      "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/8.4.6/js/utils.js",
119  });
120
121
122  $('#ppc-signup-form').submit(function(e){
123    e.preventDefault();
124    document.getElementById("funnel1-progress").style.display = "block";
125    document.getElementById("modal-signup-form-submit").style.display = "none";
126    const email = $("#email-input-funnel-1").val();
127    const name = $("#fullName-input-funnel-1").val();
128    const phone = $("#phone-input-ppc").val();
129    const websiteUrl = $("#websiteUrl-input-funnel-1").val();
130
131    // var url = websiteUrl;
132    // var host = url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, "").split("/")[0];
133
134    var code = $("#phone-input-ppc").intlTelInput("getSelectedCountryData").dialCode
135    var phoneNumber = "+" + code + "-" + phone;
136
137    fetch("https://api.useinfluence.co/auth/local/bookACall",{
138      method:'POST',
139      body:JSON.stringify({
140        email,
141        name,
142        phoneNumber,
143        websiteUrl
144      }),
145      headers:{
146        "Content-type": "application/json; charset=UTF-8",
147      }
148    }).then(res=>{
149      document.getElementById("funnel1-progress").style.display = "none";
150      document.getElementById("modal-signup-form-submit").style.display = "block";  
151      $(".modal").removeClass("opened");
152    })
153  })
154});
155
156$('.bar-close-button').click(function(){
157  console.log(' fadsf asdf assd fasf');
158  document.getElementById('top-bar-message-55').style.display='none'
159  
160})
161
162
163// $.get('https://extreme-ip-lookup.com/json/?key=UTiXVnrYntPf6s0qokOK', function() {}, "json").always(function(resp) {
164//   console.log( "Load was performed. old ", resp );
165// });
166var infoObj
167
168$.get( "https://extreme-ip-lookup.com/json/?key=UTiXVnrYntPf6s0qokOK", function( data ) {
169   infoObj = data 
170  console.log( "Load was performed. out ", data );
171});
172
173
174
175const freePlanRegister = () => {
176 
177
178  document.getElementById('progress').style.display = 'block'
179  document.getElementById('home-submit-fsp').style.display = 'none'
180  const email = $("#email-2").val();
181  const password = $("#password").val();
182  // const fullname = $("#fullname").val();
183  const phone = $("#phone").val();
184  var websiteUrl = $("#websiteUrl").val();
185
186  checkURL(websiteUrl)
187
188  var url = websiteUrl;
189	var host= url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, "").split('/')[0];
190
191  // const firstName = fullname.split(" ")[0]
192  // const lastName = fullname.split(" ").slice(1,).join(" ")
193  var code = $("#phone").intlTelInput("getSelectedCountryData").dialCode;
194  var phoneNumber = "+" + code + "-" + phone
195
196  // $.get( "https://extreme-ip-lookup.com/json/?key=UTiXVnrYntPf6s0qokOK", function( data ) {
197    
198  //   console.log( "Load was performed.", data );
199  // });
200
201  // ------------------------------------------------------
202
203    fetch('https://api.useinfluence.co/auth/local/register', { 
204      
205    // Adding method type 
206    method: "POST", 
207      
208    // Adding body or contents to send 
209    body: JSON.stringify({ 
210        email: email,
211        password: password,
212        // firstName : firstName,
213        // lastName : lastName,
214        phoneNumber : phoneNumber,
215        websiteUrl : host,
216        plan: "freePlan",
217        infoObj: infoObj,
218        username: email.split('@')[0],
219        source: document.location.href || 'Null'
220    }), 
221      
222    // Adding headers to the request 
223    headers: { 
224        "Content-type": "application/json; charset=UTF-8"
225    } 
226  }) 
227
228// Converting to JSON 
229.then(response => response.json()) 
230
231// Displaying results to console 
232.then(json => {
233  
234
235  fetch('https://api.useinfluence.co/payment/freePlan', { 
236    
237  // Adding method type 
238  method: "POST", 
239    
240  // Adding body or contents to send 
241  body: JSON.stringify({ 
242      user:json.user,
243      plan:{
244          currency:"usd",
245          free_quantity:0,
246          id:"price_1HHRfQCkWzi7OrXWqa85Hhvi",
247          invoice_name:"Free Forever Plan",
248          name:"Free Forever Plan",
249          object:"plan",
250          interval_count:1,
251          interval:"month",
252          amount:0,
253          status:true,
254          description:1000,
255          teammateQouta:1,
256          trial_period:null
257     }
258  }),
259    
260  // Adding headers to the request 
261  headers: { 
262      "Content-type": "application/json; charset=UTF-8"
263  } 
264})
265   
266    .then(response => response.json()) 
267
268    .then(obj => {
269
270    //new
271      fetch('https://api.useinfluence.co/auth/local', { 
272      
273    // Adding method type 
274    method: "POST", 
275      
276    // Adding body or contents to send 
277    body: JSON.stringify({ 
278        identifier: email,
279        password: password,
280        
281    }),
282      
283    // Adding headers to the request 
284    headers: { 
285        "Content-type": "application/json; charset=UTF-8"
286    } 
287  })
288    //new
289    .then(response => response.json()) 
290
291    .then(obj2 => {
292         // window.open(`https://app.useinfluence.co/login?identifier=${email}&password=${password}`);
293          //store jwt token
294          //window.sessionStorage.setItem("token",obj.jwt)
295          //window.location.assign(`https://app.useinfluence.co/getting-started`)
296          //window.location.assign(`http://localhost:3000/getting-started?auth_token=${obj2.jwt}`);
297          window.location.assign(`https://app.useinfluence.co/getting-started?auth_token=${obj2.jwt}`);
298          document.getElementById('progress').style.display = 'none'
299          document.getElementById('home-submit').style.display = 'block'
300
301});
302
303// -----------------------------------------
304  
305
306});
307
308
309
310}); 
311
312
313
314  
315
316
317
318}
319
320
321// -----------------------------User Form validation---------------------------
322
323const uselessUrls = [
324  "http://instagram.com",
325  "http://google.com",
326  "http://facebook.com",
327  "http://whatsapp.com"
328]
329
330const websiteUrlInput = document.getElementById("websiteUrl")
331
332
333
334function checkURL(abc) {
335  // var string = abc.value;
336  // if (!~string.indexOf("http")) {
337  //   string = "http://" + string;
338  // }
339  // abc.value = string;
340
341  if (uselessUrls.includes(abc.value)){
342    websiteUrlInput.setCustomValidity("Enter Your Website URL")
343  }else{
344    websiteUrlInput.setCustomValidity("")
345  }
346
347  // return abc
348  
349}
350
351
352// ---------------- PPC SCRIPT -------------------
353
354
355
356
357
358const bookCallHandler = () =>{
359  e.preventDefault();
360  document.getElementById("funnel1-progress").style.display = "block";
361  document.getElementById("modal-signup-form-submit").style.display = "none";
362  const email = $("#email-input-funnel-1").val();
363  const name = $("#fullName-input-funnel-1").val();
364  const phone = $("#phone-input-funnel-1").val();
365  const websiteUrl = $("#websiteUrl-input-funnel-1").val();
366
367  // var url = websiteUrl;
368  // var host = url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, "").split("/")[0];
369
370  var phoneNumber = "+" + "91" + "-" + phone;
371
372  fetch("https://api.useinfluence.co/auth/local/bookACall",{
373    method:'POST',
374    body:JSON.stringify({
375      email,
376      name,
377      phoneNumber,
378      websiteUrl
379    }),
380    headers:{
381      "Content-type": "application/json; charset=UTF-8",
382    }
383  }).then(res=>{
384    $(".modal").removeClass("opened");
385  })
386}
387
388  // only email signup form
389
390  $("#only-email-signup-form-ppc").submit(function (e) {
391    e.preventDefault();
392    document.getElementById("funnel1-progress-fsp").style.display = "block";
393    document.getElementById("modal-signup-form-submit-fsp").style.display = "none";
394    const email = $("#email-input-funnel-1-fsp").val();
395    const userName = email.split('@')[0] || "User"
396    let responseJWT
397
398    fetch("https://api.useinfluence.co/auth/local/register", {
399      method: "POST",
400      body: JSON.stringify({
401        email,
402        username: userName,
403        firstName: userName,
404        // source: document.location.href || "Null",
405        signupType: "funnel1"
406      }),
407      headers: {
408        "Content-type": "application/json; charset=UTF-8",
409      },
410    })
411      .then((response) => response.json())
412      .then((json) => {
413        responseJWT = json.jwt
414        console.log('jst--', json.jwt)
415        console.log('response--', responseJWT)
416        window.location.assign(
417          `https://app.useinfluence.co/checkout?auth_token=${json.jwt}`
418        );
419      });
420  });
421
422  $("#only-email-signup-form-ppc2").submit(function (e) {
423    e.preventDefault();
424    document.getElementById("funnel1-progress-fsp").style.display = "block";
425    document.getElementById("modal-signup-form-submit-fsp").style.display = "none";
426    const email = $("#email-input-funnel-1-fsp2").val();
427    const userName = email.split('@')[0] || "User"
428    let responseJWT
429
430    fetch("https://api.useinfluence.co/auth/local/register", {
431      method: "POST",
432      body: JSON.stringify({
433        email,
434        username: userName,
435        firstName: userName,
436        // source: document.location.href || "Null",
437        signupType: "funnel1"
438      }),
439      headers: {
440        "Content-type": "application/json; charset=UTF-8",
441      },
442    })
443      .then((response) => response.json())
444      .then((json) => {
445        responseJWT = json.jwt
446        console.log('jst--', json.jwt)
447        console.log('response--', responseJWT)
448        window.location.assign(
449          `https://app.useinfluence.co/checkout?auth_token=${json.jwt}`
450        );
451      });
452  });

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.