mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
fix bug
This commit is contained in:
parent
5adefd6ba9
commit
698bdb7da8
@ -167,7 +167,8 @@ function deleteEvent(event) {
|
||||
buttons.delete.changeToDone(request.status != 204, html);
|
||||
}
|
||||
}
|
||||
r.send();
|
||||
|
||||
request.send();
|
||||
});
|
||||
|
||||
return false;
|
||||
@ -212,8 +213,14 @@ function searchEvent(event) {
|
||||
box.innerHTML = '';
|
||||
search.classList.add('ongoing');
|
||||
|
||||
let url = window.location.host + window.location.pathname;
|
||||
|
||||
if (document.getElementById("editor")) {
|
||||
url = removeLastDirectoryPartOf(url);
|
||||
}
|
||||
|
||||
if (supported && user.AllowCommands) {
|
||||
let conn = new WebSocket('ws://' + window.location.host + window.location.pathname + '?command=true');
|
||||
let conn = new WebSocket(`ws://${url}?command=true`);
|
||||
|
||||
conn.onopen = function() {
|
||||
conn.send(value);
|
||||
@ -235,7 +242,7 @@ function searchEvent(event) {
|
||||
box.innerHTML = '<ul></ul>';
|
||||
|
||||
let ul = box.querySelector('ul'),
|
||||
conn = new WebSocket('ws://' + window.location.host + window.location.pathname + '?search=true');
|
||||
conn = new WebSocket(`ws://${url}?search=true`);
|
||||
|
||||
conn.onopen = function() {
|
||||
conn.send(value);
|
||||
|
Loading…
Reference in New Issue
Block a user