PageSourceSearch

https://www.bunked.ai/js/front-page.js

js bunked.ai collected 2026-09-24 09:44:45 UTC 2,223 bytes, 74 lines download raw bytes

1// CHANGE CHECKBOX VALUE
2const checkbox = document.getElementById("signupSendUpdates");
3checkbox.addEventListener("change", function() {
4  if (!this.checked) {
5    this.value = "0";
6    console.log("0");
7  } else {
8    this.value = "1";
9    console.log("1");
10  }
11});
12
13
14// COLLECT SIGNUP INFO
15function sendSignup() {
16  fetch(
17    "https://ddb2jbeybj.execute-api.us-east-1.amazonaws.com/default/bunked_signup_form",
18    {
19      method: "POST",
20      mode: "no-cors",
21      headers: {
22        Accept: "application/json",
23        "Content-Type": "application/json",
24      },
25      body: JSON.stringify({
26        email: document.getElementById("signupEmail").value,
27        affiliation: document.getElementById("signupAffiliation").value,
28        send_updates: document.getElementById("signupSendUpdates").value
29      }),
30    }
31  )
32  alert("Thank you for signing up!");
33  document.getElementById("signup-form").reset();
34  document.getElementById("signupSendUpdates").value = "1";
35}
36
37const sign_up = document.getElementById("signup-form");
38sign_up.addEventListener("submit", sendSignup);
39//
40
41
42// Function to debounce scroll events
43function debounce(func, delay) {
44  let timeoutId;
45  return function() {
46    const context = this;
47    const args = arguments;
48    clearTimeout(timeoutId);
49    timeoutId = setTimeout(function() {
50      func.apply(context, args);
51    }, delay);
52  };
53}
54
55document.addEventListener('DOMContentLoaded', function() {
56  // Code inside this function will run after the DOM is fully loaded
57  
58  // Debounced scroll event handler
59  const debouncedScroll = debounce(function() {
60    if (window.innerWidth > 1200) {
61      var yOffset = window.scrollY;
62      var parallaxEffect = yOffset * -0.5; // Adjust the multiplier to control the parallax effect
63      var floatingDiv = document.querySelector('.floating-div');
64      floatingDiv.style.transform = 'translate(-50%, calc(-50% + ' + parallaxEffect + 'px))';
65    } else {
66      var floatingDiv = document.querySelector('.floating-div');
67      floatingDiv.style.transform = 'none';
68    }
69  }, 10); // Adjust the delay as needed
70
71  window.addEventListener('scroll', debouncedScroll);
72  window.addEventListener('resize', debouncedScroll);
73  debouncedScroll();
74});

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.