From 393be62cde7f2a21639093f150c3ff6e942ad254 Mon Sep 17 00:00:00 2001 From: poni Date: Thu, 8 Apr 2021 17:05:15 +0200 Subject: [PATCH] -_top- --- canvas.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/canvas.js b/canvas.js index 1afa0d0..17a1b99 100644 --- a/canvas.js +++ b/canvas.js @@ -7,7 +7,7 @@ return Math.floor(Math.random() * (max - min) + min); }; function openWindow(c) { - window.open(`http://www.google.com/maps/place/${c}`, "_self"); + window.open(`http://www.google.com/maps/place/${c}`,'_top'); } var x = randomNumber(null,5); @@ -20,7 +20,7 @@ console.log(x) function preload() { - footsteps = document.getElementById("footsteps");//walking +footsteps = document.getElementById("footsteps");//walking PNF1 = document.getElementById("PNF1"); PNF2 = document.getElementById("PNF2"); LOBS1 = document.getElementById("LOBS1"); @@ -253,6 +253,8 @@ function mouseReleased(){ capture = false; } + + function mouseClicked(){ // console.log('mouseClicked'); } @@ -471,13 +473,15 @@ function pong() { textSize(width/17); text(coord , width/2, height/2); fill(0); + + if(mouseReleased){ - setTimeout(function() { + setTimeout(function() { openWindow(coord); - }, 5000 ); + }, 3000 ); } }