From 34357f361c20b16f38a591d5c3feb07d6275cf52 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 21 Jan 2022 23:28:19 +0400 Subject: [PATCH] Removed debug log. Renamed scal global variable to g_scale. --- files/static/assets/js/main.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/files/static/assets/js/main.js b/files/static/assets/js/main.js index f735943..2779545 100644 --- a/files/static/assets/js/main.js +++ b/files/static/assets/js/main.js @@ -3,18 +3,17 @@ const audio_formats = ["mp3", "flac", "opus", "ogg", "m4a"]; const image_formats = ["jpg", "jpeg", "gif", "png", "bmp", "webp"]; const overlay = document.getElementById("overlay"); -let scale = 1; +let g_scale = 1; let g_volume = 1.0; function mousescroll(e) { e.preventDefault(); - scale = Math.min(Math.max(0.25, scale + (e.deltaY * -0.001)), 4); - e.target.style.transform = `scale(${scale})`; + g_scale = Math.min(Math.max(0.25, g_scale + (e.deltaY * -0.001)), 4); + e.target.style.transform = `scale(${g_scale})`; } function onvolumechange(e) { g_volume = e.target.volume; - console.log("new ", e); } const ext_filter = (ext, pathname) => pathname.toLowerCase().endsWith(ext); @@ -39,7 +38,7 @@ document.getElementById("overlay").addEventListener("click", e => { e.target.firstChild.remove(); e.target.firstChild.remove(); e.target.style.visibility = "hidden"; - scale = 1; + g_scale = 1; }); const file_links = Array.from(document.getElementsByTagName('tr')).slice(2).filter(e => e.lastChild.innerHTML != "DIR").map(l => l.firstChild.firstChild);