fikosoftware

Untitled

Jul 1st, 2025 (edited)
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function () {
  2.   const whatsappLinkRegex = /https:\/\/chat\.whatsapp\.com\/[a-zA-Z0-9]+/g;
  3.   const foundLinks = new Set();
  4.  
  5.   // Create download button
  6.   const button = document.createElement("button");
  7.   button.textContent = "📥 Download WhatsApp Links (0)";
  8.   button.style.position = "fixed";
  9.   button.style.top = "20px";
  10.   button.style.right = "20px";
  11.   button.style.zIndex = "9999";
  12.   button.style.padding = "10px 15px";
  13.   button.style.backgroundColor = "#25D366";
  14.   button.style.color = "#fff";
  15.   button.style.border = "none";
  16.   button.style.borderRadius = "5px";
  17.   button.style.cursor = "pointer";
  18.   button.style.fontSize = "14px";
  19.   document.body.appendChild(button);
  20.  
  21.   // Function to update button text with count
  22.   const updateButtonText = () => {
  23.     button.textContent = `📥 Download WhatsApp Links (${foundLinks.size})`;
  24.   };
  25.  
  26.   // Check and collect new links every 2 seconds
  27.   const checkForLinks = () => {
  28.     const html = document.documentElement.innerHTML;
  29.     const matches = html.match(whatsappLinkRegex) || [];
  30.  
  31.     matches.forEach(link => {
  32.       if (!foundLinks.has(link)) {
  33.         foundLinks.add(link);
  34.         console.log("🟢 New WhatsApp Link:", link);
  35.         updateButtonText();
  36.       }
  37.     });
  38.   };
  39.  
  40.   setInterval(checkForLinks, 2000);
  41.  
  42.   console.log("🔍 Watching for new WhatsApp links as you scroll...");
  43.  
  44.   // Download links on button click
  45.   button.addEventListener("click", () => {
  46.     const blob = new Blob([Array.from(foundLinks).join("\n")], { type: "text/plain" });
  47.     const url = URL.createObjectURL(blob);
  48.     const a = document.createElement("a");
  49.     a.href = url;
  50.     a.download = "whatsapp_links.txt";
  51.     a.click();
  52.     URL.revokeObjectURL(url);
  53.   });
  54. })();
Advertisement
Add Comment
Please, Sign In to add comment