diff options
author | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-13 16:09:07 +0200 |
---|---|---|
committer | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-13 16:09:07 +0200 |
commit | 4bd4895ea131541190a5154c5f0de0380ef38842 (patch) | |
tree | 93e3ea95e08313a0e6f9a91892ff36c91d08282b | |
parent | 511e0d45c6baf716557bd8cc4e0f1ba0de67953f (diff) | |
download | fileup-4bd4895ea131541190a5154c5f0de0380ef38842.tar.gz |
can no longer drag around the fucking trashcan
-rw-r--r-- | loggedin.js | 6 |
1 files changed, 5 insertions, 1 deletions
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(); }; |