Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title> chatango view ?</title>
- <script>
- window.onload = start;
- function rand(min, max) {
- return Math.floor(Math.random() * (max - min)) + min;
- }
- function start() {
- let name;
- let cookie = document.cookie;
- try {
- let found = cookie.match("id.chatango.com=(.*?);");
- let user = found ? found[1] : null;
- name = user;
- } catch {
- name = "Anon" + rand(1000, 9999);
- }
- document.getElementById("user").textContent = name;
- }
- </script>
- </head>
- <body>
- <h1>Hello, <span id="user"></span>!</h1>
- </body>
- </html>
Add Comment
Please, Sign In to add comment