Removed debug log. Renamed scal global variable to g_scale.

This commit is contained in:
Alexander Andreev 2022-01-21 23:28:19 +04:00
parent 3dda0eedb5
commit 34357f361c
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -3,18 +3,17 @@ const audio_formats = ["mp3", "flac", "opus", "ogg", "m4a"];
const image_formats = ["jpg", "jpeg", "gif", "png", "bmp", "webp"]; const image_formats = ["jpg", "jpeg", "gif", "png", "bmp", "webp"];
const overlay = document.getElementById("overlay"); const overlay = document.getElementById("overlay");
let scale = 1; let g_scale = 1;
let g_volume = 1.0; let g_volume = 1.0;
function mousescroll(e) { function mousescroll(e) {
e.preventDefault(); e.preventDefault();
scale = Math.min(Math.max(0.25, scale + (e.deltaY * -0.001)), 4); g_scale = Math.min(Math.max(0.25, g_scale + (e.deltaY * -0.001)), 4);
e.target.style.transform = `scale(${scale})`; e.target.style.transform = `scale(${g_scale})`;
} }
function onvolumechange(e) { function onvolumechange(e) {
g_volume = e.target.volume; g_volume = e.target.volume;
console.log("new ", e);
} }
const ext_filter = (ext, pathname) => pathname.toLowerCase().endsWith(ext); 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.firstChild.remove(); e.target.firstChild.remove();
e.target.style.visibility = "hidden"; 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); const file_links = Array.from(document.getElementsByTagName('tr')).slice(2).filter(e => e.lastChild.innerHTML != "DIR").map(l => l.firstChild.firstChild);