From f185a2793c6fb35d6d0c9d78f326949d8ca701f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Sat, 1 Apr 2023 21:02:51 +0200 Subject: [PATCH] fix some stuff --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index d272743..ca2f3bf 100644 --- a/index.js +++ b/index.js @@ -192,7 +192,7 @@ function showImages() { $(".originalplace").on("click", function(e){ let targetElement = $(this); if (targetElement.hasClass("imageholderak")){ - let [emptyindex, idcko] = getEmptyIndex($(".finalimageplace"), this); + let [emptyindex, idcko] = getEmptyIndex($(".finalimageplace")); if (emptyindex > -1){ let changingelement = $("#" + idcko); changingelement.html(targetElement.html()); @@ -202,7 +202,7 @@ function showImages() { } if (targetElement.hasClass("letterholderak")){ - let [emptyindex, idcko] = getEmptyIndex($(".finalletterplace"), this); + let [emptyindex, idcko] = getEmptyIndex($(".finalletterplace")); if (emptyindex > -1){ let changingelement = $("#" + idcko); umami.trackEvent('Clicked letter', { type: 'clickletter', datacode: targetElement.attr("datacode") }); @@ -263,6 +263,7 @@ function generateItem(word){ $(".itemholderak").each(function(){ $(this).on("click", function (e){ let datacode = $(this).attr("datacode"); + umami.trackEvent('Listened to image', { type: 'listenimage', datacode: $(this).attr("datacode") }); document.getElementById("audplayitem"+ datacode).play(); }) }); @@ -290,7 +291,6 @@ $(function() { $("#verify").on("click", checkAnswers); $("#trashcan").on("click", cleanup); - umami.trackEvent('Page loaded', { type: 'load' }); });