From 4bd4895ea131541190a5154c5f0de0380ef38842 Mon Sep 17 00:00:00 2001 From: Alex Vitkov Date: Sat, 13 Feb 2021 16:09:07 +0200 Subject: can no longer drag around the fucking trashcan --- loggedin.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/loggedin.js b/loggedin.js index de0f915..8de7c2b 100644 --- a/loggedin.js +++ b/loggedin.js @@ -104,7 +104,7 @@ function openfile_nondir() { xhr.open('POST', '/php/readfile.php', true); - focus.filecontents.innerText = "Loading..."; + focus.filecontents.innerText = ""; focus.filecontents.style.display = 'block'; focus.foldercontents.style.display = 'none'; @@ -457,6 +457,10 @@ function add_file_visuals(fileview) { } visuals.ondragstart = (e) => { + if (focus.pwd.length == 0 && fileview.filename == "trash") { + e.preventDefault(); + return; + } begin_drag_fileview(e, fileview); e.preventDefault(); }; -- cgit v1.2.3