You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB
JavaScript

var tech = ["./img/2.jpg","./img/3.jpg","./img/4.jpg","./img/5.jpg","./img/6.jpg","./img/7.jpg","./img/8.jpg","./img/9.jpg","./img/10.jpg","./img/11.jpg","./img/12.jpg","./img/13.jpg","./img/35.jpg"];
var memo = ["./img/1.jpg","./img/15.jpg","./img/16.jpg","./img/17.jpg","./img/18.jpg","./img/19.JPG","./img/20.jpg","./img/21.jpg","./img/22.jpg","./img/24.jpg","./img/25.jpg","./img/26.jpg", "./img/31.jpg"];
function randomInt(){
return Math.ceil(Math.random() * 13);
}
function setPageM() {
var num1 = randomInt();
var num2 = randomInt();
document.body.background = memo[randomInt()];
document.body.style.backgroundRepeat = "repeat";
document.getElementById("img1").src = memo[randomInt()];
}
function setPageT() {
var num1 = randomInt();
var num2 = randomInt();
document.body.background = tech[randomInt()];
document.body.style.backgroundRepeat = "repeat";
document.getElementById("img1").src = tech[randomInt()];
}
let videoSrc = ['https://www.youtube.com/embed/7e9Q7HnvaM8','https://www.youtube.com/embed/sNQp1rJE26s'];
function setvideo() {
var num = Math.floor(Math.random() * 2);
document.getElementById("vid").src = videoSrc[num];
}