base_href as a data attr

This commit is contained in:
Shish
2024-01-28 21:24:21 +00:00
parent bc7adaffe8
commit e5828b0810
4 changed files with 33 additions and 24 deletions

View File

@ -42,7 +42,7 @@ function updateCompletions(element) {
}
else {
element.completer_timeout = setTimeout(() => {
fetch(base_href + '/api/internal/autocomplete?s=' + word).then(
fetch(document.body.getAttribute("data-base-href") + '/api/internal/autocomplete?s=' + word).then(
(response) => response.json()
).then((json) => {
if(element.selected_completion !== -1) {