rickroll part2
This commit is contained in:
parent
8e3b2018d4
commit
a13899ad1e
2 changed files with 32 additions and 0 deletions
|
|
@ -55,6 +55,10 @@
|
||||||
<img id="image-collegue-animee" style="z-index:1; position: absolute;
|
<img id="image-collegue-animee" style="z-index:1; position: absolute;
|
||||||
top: 20px; left:35%">
|
top: 20px; left:35%">
|
||||||
|
|
||||||
|
<!-- RickRoll-->
|
||||||
|
<video controls id="never" style="z-index:1; position: absolute; left:0%; top: 0%;" hidden>
|
||||||
|
</video>
|
||||||
|
<button id="close_rick" type="button" style="z-index: 2; position: absolute; left:0%; top: 0%;" hidden>X</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
28
js/main.js
28
js/main.js
|
|
@ -289,12 +289,40 @@ function augmenterScorePassivement(){
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var i=0
|
||||||
function leBoostDuProf(){
|
function leBoostDuProf(){
|
||||||
|
if (i === 0){
|
||||||
|
rickRoll()
|
||||||
|
i+=1
|
||||||
|
}else{
|
||||||
score += 1000000000
|
score += 1000000000
|
||||||
majAffichageScore()
|
majAffichageScore()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let rickroll = document.getElementById("never")
|
||||||
|
let close_roll = document.getElementById("close_rick")
|
||||||
|
function rickRoll(){
|
||||||
|
// affichage de la video
|
||||||
|
rickroll.setAttribute("src","./img/never_gonna_give_you_up.mp4")
|
||||||
|
rickroll.setAttribute("type","video/mp4")
|
||||||
|
rickroll.removeAttribute("hidden")
|
||||||
|
rickroll.autoplay=true
|
||||||
|
|
||||||
|
// affichage du bouton de fermeture
|
||||||
|
close_roll.removeAttribute("hidden")
|
||||||
|
close_roll.addEventListener("click",function(){
|
||||||
|
rickroll.hidden=true
|
||||||
|
rickroll.pause();
|
||||||
|
|
||||||
|
close_roll.hidden=true
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// fonction qui va creer plein d'elements confetti
|
// fonction qui va creer plein d'elements confetti
|
||||||
function genererConfetti() {
|
function genererConfetti() {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue