From 761da3aa476ff15733d9821dac141e761a878bba Mon Sep 17 00:00:00 2001 From: Jianhuan Liu Date: Mon, 1 Feb 2021 21:01:29 +0800 Subject: [PATCH 1/2] Update myscript.js --- scripts/myscript.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/myscript.js b/scripts/myscript.js index 2c64d04..58adb49 100644 --- a/scripts/myscript.js +++ b/scripts/myscript.js @@ -9,7 +9,7 @@ obox1.style.display = "none"; obox1.setAttribute("class", "movie") var obox2 = document.createElement("div") -obox2.innerHTML = ''; +obox2.innerHTML = ''; obox2.style.position = "fixed"; obox2.style.bottom = "0px"; obox2.style.left = "0px"; @@ -22,13 +22,13 @@ sbox.appendChild(obox1); var rand = Math.random(); console.log(rand); -if (rand > 1) { +if (rand > 0.5) { sbox.appendChild(obox2); setTimeout(function(){ obox2.style.display = "block"; setTimeout(function(){ obox2.style.display = "none"; - }, 10000) + }, 30000) }, 5000) } From 93da31c90383d9110dc6a57ea758b53b0b2e4f75 Mon Sep 17 00:00:00 2001 From: Jianhuan Liu Date: Mon, 1 Feb 2021 21:02:37 +0800 Subject: [PATCH 2/2] Update myscript.js --- scripts/myscript.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/myscript.js b/scripts/myscript.js index 58adb49..57b1a35 100644 --- a/scripts/myscript.js +++ b/scripts/myscript.js @@ -15,6 +15,7 @@ obox2.style.bottom = "0px"; obox2.style.left = "0px"; obox2.style.zIndex = "9999"; obox2.style.display = "none"; +obox2.setAttribute("class", "movie") var sbox = document.getElementsByTagName("body")[0]; sbox.appendChild(obox1);