From 64b090ee058953aed2246967332c7f0b6623cd8f Mon Sep 17 00:00:00 2001 From: lolcat Date: Tue, 17 Oct 2023 17:58:08 -0400 Subject: fix cookie big --- static/client.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'static') diff --git a/static/client.js b/static/client.js index a53cdb6..2e691f8 100644 --- a/static/client.js +++ b/static/client.js @@ -767,7 +767,12 @@ if(searchbox_wrapper.length !== 0){ // make sure we dont fetch same thing twice autocomplete_cache[curvalue] = []; - var res = await fetch("/api/v1/ac?s=" + encodeURIComponent(curvalue) + ac_req_appendix); + var res = await fetch("/api/v1/ac?s=" + (encodeURIComponent(curvalue).replaceAll("%20", "+")) + ac_req_appendix); + if(!res.ok){ + + return; + } + var json = await res.json(); autocomplete_cache[curvalue] = json[1]; @@ -802,7 +807,7 @@ if(searchbox_wrapper.length !== 0){ ac_func = null; getac(); // get results after 100ms of no keystroke resolve(); - }, 300); + }, 200); }); } -- cgit v1.2.3