Tubuu

Untitled

May 24th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.66 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <title> chatango view ?</title>
  5.   <script>
  6.     window.onload = start;
  7.  
  8.     function rand(min, max) {
  9.       return Math.floor(Math.random() * (max - min)) + min;
  10.     }
  11.  
  12.     function start() {
  13.       let name;
  14.       let cookie = document.cookie;
  15.  
  16.       try {
  17.           let found = cookie.match("id.chatango.com=(.*?);");
  18.           let user = found ? found[1] : null;
  19.           name = user;
  20.         } catch {
  21.           name = "Anon" + rand(1000, 9999);
  22.         }
  23.  
  24.       document.getElementById("user").textContent = name;
  25.     }
  26.   </script>
  27. </head>
  28. <body>
  29.   <h1>Hello, <span id="user"></span>!</h1>
  30. </body>
  31. </html>
  32.  
Add Comment
Please, Sign In to add comment