added info cookie to map script

This commit is contained in:
Václav Šmejkal 2023-05-31 09:56:38 +02:00
parent 628f04043a
commit 68d9ccb943
Signed by: ENGO150
GPG Key ID: F6D6DF86242C5A59

View File

@ -1,5 +1,5 @@
const points = const points =
[//2 - 1; 2 [
[87.6, 78.4, "1;2", 9, 16], [87.6, 78.4, "1;2", 9, 16],
[86.2, 69.9, "27"], [86.2, 69.9, "27"],
[86.5, 68.55, "26"], [86.5, 68.55, "26"],
@ -48,8 +48,19 @@ const points =
const tolerance_x = 0.2; const tolerance_x = 0.2;
const tolerance_y = 0.3; const tolerance_y = 0.3;
function info()
{
if (!document.cookie.includes("opened"))
{
document.cookie = "opened";
alert("Můžete klikat na červené tečky pro otevření panoramat.");
}
}
window.onload = function() window.onload = function()
{ {
info();
let img = document.querySelector("img"); let img = document.querySelector("img");
img.onclick = (e) => img.onclick = (e) =>
{ {