From 087a14a6a03917de8982fadce8f529b8f9a96d30 Mon Sep 17 00:00:00 2001 From: Ju1-js <40339350+Ju1-js@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:49:33 -0700 Subject: [PATCH] Workaround for popup blocking --- index.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 0dbd17c..9bc901c 100644 --- a/index.html +++ b/index.html @@ -313,7 +313,7 @@

An Untitled Goose Game

player.aspectRatio('16:9'); player.muted(true); player.autoplay('true'); - var cookieConsent = document.querySelector('#cookie-consent'); + // var cookieConsent = document.querySelector('#cookie-consent'); var sidenav = document.querySelector('#sidenav'); var textsunglasses = document.querySelector('#textsunglasses'); var postdescription = document.querySelector('#post-description'); @@ -321,7 +321,11 @@

An Untitled Goose Game

var goosecontent = document.querySelector('.goose-content'); var githubbutton = document.querySelector('#downloads'); - cookieConsent.addEventListener('click', () => { + //cookieConsent.addEventListener('click', () => { + document.addEventListener('click', interaction); + document.addEventListener('keydown', interaction); + + function interaction(event) { cookieConsent.classList.add('hidden'); playVideo("assets/videos/Rick-Astley-Never-Gonna-Give-You-Up-1080p60-60fps.mp4", 'video/mp4'); videojs('video-player1', {}, function() { @@ -338,8 +342,8 @@

An Untitled Goose Game

}); }); - }); - + } + function sleep(milliseconds) { const date = Date.now(); let currentDate = null;