Skip to content

Instantly share code, notes, and snippets.

@Chappie74
Created September 30, 2023 09:31
Show Gist options
  • Save Chappie74/c3e4074b375c3465799ae17dc86dd744 to your computer and use it in GitHub Desktop.
Save Chappie74/c3e4074b375c3465799ae17dc86dd744 to your computer and use it in GitHub Desktop.
function getRandomColor() {
const letters = "0123456789ABCDEF";
let color = "#";
for (let i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
setTimeout(()=>{
const logo = document.getElementsByClassName('top-right-logo')[0]
logo.innerHTML = '<img alt="" height="500" width="500" src="https://awsadmin.japantimes.co.jp/wp-content/uploads/2015/05/p9-shoji-chappie-a-20150521.jpg">';
}, 100);
const left = document.getElementsByClassName('left-top-logo-div')[0]
const right = document.getElementsByClassName('right-div')[0]
setInterval(()=>{
const newDiv = document.createElement('div');
let randomColor = getRandomColor();
newDiv.innerHTML = `<p style="color: ${randomColor}"><b>I got you with XSS! 😊</b></p>`
left.appendChild(newDiv);
}, 1000);
setInterval(()=>{
const newDiv = document.createElement('div');
newDiv.className = 'left-top-logo-div';
newDiv.style.display = "block";
let randomColor = getRandomColor();
newDiv.innerHTML = `<p style="color: ${randomColor}"><b>Sean was here...</b></p><br>`
right.prepend(newDiv);
}, 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment