Prompts:
1 make a "the matrix" kind of moving background
2 make a text input box to write the right password "trythis"
3 if the correct password is typed, then display this image https://www.telegraph.co.uk/content/dam/films/2021/09/09/unnamed_trans_NvBQzQNjv4Bqi42G8AkSNAnhxk6tBN6ZQoJMtjt4LtnbqRf1zh2-BA8.png
(later I changed the "trythis" code to are more suitable password, directly in this page embedded code)
/* make a "the matrix" kind of moving background */
var matrix = document.createElement('div');
matrix.style.position = 'absolute';
matrix.style.top = '0px';
matrix.style.left = '0px';
matrix.style.width = '100%';
matrix.style.height = '100%';
matrix.style.backgroundColor = 'black';
matrix.style.color = 'green';
matrix.style.fontFamily = 'monospace';
matrix.style.fontSize = '12px';
matrix.style.overflow = 'hidden';
document.body.appendChild(matrix);
var matrixLines = [];
var matrixLineCount = 100;
var matrixLineHeight = 12;
var matrixLineWidth = 1200;
var matrixLineSpeed = 5;
for (var i = 0; i < matrixLineCount; i++) {
var matrixLine = document.createElement('div');
matrixLine.style.position = 'absolute';
matrixLine.style.top = (i * matrixLineHeight) + 'px';
matrixLine.style.left = '0px';
matrixLine.style.width = matrixLineWidth + 'px';
matrixLine.style.height = matrixLineHeight + 'px';
matrixLine.style.overflow = 'hidden';
matrix.appendChild(matrixLine);
matrixLines.push(matrixLine);
}
var matrixCharacters = '01';
function matrixUpdate() {
for (var i = 0; i < matrixLineCount; i++) {
var matrixLine = matrixLines[i];
var matrixLineLeft = parseInt(matrixLine.style.left);
matrixLineLeft -= matrixLineSpeed;
if (matrixLineLeft < -matrixLineWidth) {
matrixLineLeft += matrixLineWidth;
}
matrixLine.style.left = matrixLineLeft + 'px';
var matrixLineText = '';
for (var j = 0; j < matrixLineWidth; j++) {
matrixLineText += matrixCharacters.charAt(Math.floor(Math.random() * matrixCharacters.length));
}
matrixLine.innerHTML = matrixLineText;
}
}
setInterval(matrixUpdate, 50);
/* make a text input box to write the right password "trythis" */
var password = document.createElement('input');
password.type = 'text';
password.style.position = 'absolute';
password.style.top = '0px';
password.style.left = '0px';
password.style.width = '100%';
password.style.height = '100%';
password.style.fontSize = '100px';
password.style.textAlign = 'center';
password.style.backgroundColor = 'transparent';
password.style.color = 'white';
password.style.border = 'none';
password.style.outline = 'none';
password.style.zIndex = '1';
password.onkeyup = function() {
if (password.value == 'trythis') {
alert('You win!');
}
};
document.body.appendChild(password);
/* if the correct password is typed, then display this image https://www.telegraph.co.uk/content/dam/films/2021/09/09/unnamed_trans_NvBQzQNjv4Bqi42G8AkSNAnhxk6tBN6ZQoJMtjt4LtnbqRf1zh2-BA8.png */
var image = document.createElement('img');
image.src = 'https://www.telegraph.co.uk/content/dam/films/2021/09/09/unnamed_trans_NvBQzQNjv4Bqi42G8AkSNAnhxk6tBN6ZQoJMtjt4LtnbqRf1zh2-BA8.png';
image.style.position = 'absolute';
image.style.top = '0px';
image.style.left = '0px';
image.style.width = '100%';
image.style.height = '100%';
image.style.zIndex = '2';
image.style.display = 'none';
document.body.appendChild(image);
password.onkeyup = function() {
if (password.value == 'trythis') {
image.style.display = 'block';
}
};