PageSourceSearch

https://jaybro.net/script.js

js jaybro.net collected 2026-10-02 02:01:31 UTC 1,697 bytes, 53 lines download raw bytes

1function copyEmail(e) {
2  e.preventDefault();
3  
4  // We break the email apart so bots can't read it
5  const user = "jayashankar.jay10";
6  const domain = "gmail.com";
7  const safeEmail = user + "@" + domain;
8
9  // The function that changes the button text
10  function showSuccess() {
11    const btn = document.getElementById("contactBtn");
12    btn.textContent = "Email Copied! ✅";
13    setTimeout(() => btn.textContent = "Contact Me", 2500);
14  }
15
16  // Try the modern way first (works on live HTTPS websites)
17  if (navigator.clipboard && window.isSecureContext) {
18    navigator.clipboard.writeText(safeEmail).then(() => {
19      showSuccess();
20    });
21  } else {
22    // Fallback way (works when testing locally on your computer)
23    const textArea = document.createElement("textarea");
24    textArea.value = safeEmail;
25    textArea.style.position = "fixed"; // Keep it hidden
26    textArea.style.left = "-9999px";
27    document.body.appendChild(textArea);
28    textArea.select();
29    try {
30      document.execCommand('copy');
31      showSuccess();
32    } catch (err) {
33      console.error('Fallback failed', err);
34    }
35    document.body.removeChild(textArea);
36  }
37}
38
39// Accordion Logic for Main Content Sections
40const toggleTitles = document.querySelectorAll(".toggle-title");
41
42toggleTitles.forEach(title => {
43  title.addEventListener("click", function() {
44    // Toggle active class on title to spin the arrow icon
45    this.classList.toggle("active");
46    
47    // Find the next sibling which is the accordion-wrapper and toggle it
48    const wrapper = this.nextElementSibling;
49    if (wrapper && wrapper.classList.contains("accordion-wrapper")) {
50      wrapper.classList.toggle("active");
51    }
52  });
53});

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.