summaryrefslogtreecommitdiff
path: root/searx/static/themes/simple/src/js/main/search.js
AgeCommit message (Collapse)Author
2025-02-28[web-client] simple theme: move sources to client/simple/srcMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-12-16[refactor] webapp.py: reuse get_client_settings() method to unify preference ↵Bnyro
handling before render
2024-12-16[fix] settings: javascript crash when entering due to missing search formBnyro
2024-11-29[chore] search.js: remove leftovers from shift to multiselect categories PRBnyro
2024-11-29[feat] search: shift/ctrl click a category to select multiple categoriesBnyro
2024-08-15[fix] search box: clear button don't appear on mouse-copyMarkus Heiser
You have to copy and paste the query without using the keyboard to replicate the issue. As soon as you press the keyboard the cross appears. [1] - [1] https://github.com/searxng/searxng/issues/3725#issuecomment-2282655272 Reported-by: @Immortality-IMT in [1] Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-13[fix] search.js: crash on homepage when setting form listenersBnyro
2023-09-18[feat] search on category select without JSBnyro
Co-authored-by: Alexandre Flament <alex@al-f.net>
2023-04-15[mod] Ignore autocomplete_min on queries that include '!' (!bang)Markus Heiser
Closes: https://github.com/searxng/searxng/issues/1566 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-04-10[mod] Update input when selecting by TABMarkus Heiser
When the user press [TAB] the input form should be filled with the highlighted item from the autocomplete list, but not release a search / with other words: what we now have by pressing once on [ENTER] should be mapped to the [TAB] key and pressing [ENTER] once should release a search query. [1] [1] https://github.com/searxng/searxng/issues/778#issuecomment-1016593816 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-04-10[mod] Update input when selecting autocomplete prediction with keyboardrinagorsha
- Update input when selecting autocomplete prediction with keyboard - Search immediately by pressing enter key - Search immediately by clicking on an autocomplete suggestion Related: - https://github.com/searxng/searxng/issues/778
2022-08-27Theme: fix autocompletion with the POST methodAlexandre FLAMENT
With the POST method, autocomplete.js does not URL encode the values. For example "1+1" is sent as "1+1" which is read as "1 1" since space are URL encoded with a plus. There is no clean way to fix the bug since autocomplete.js seems abandoned. The commit monkey patches the ajax function of autocomplete.js Related to #1695
2022-06-13UX fix: when the user clicks on the search input, don't move the cursor at ↵Alexandre Flament
the end Related to https://github.com/searxng/searxng/pull/1153#issuecomment-1154247988
2022-06-02Theme: enable autofocus of #q only on the index page and when the width > 50emAlexandre FLAMENT
Related to #1270
2022-05-07[mod] add setting: search.autocomplete_minMarkus Heiser
Minimun characters to type before autocompleter starts. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-05-07[mod] client_settings: pass settings from server to JS clientMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-24[simple theme] refactor search formMonty
* update search input form params; inspiried by whoogle * remove autofocus from result page input form (JS impl. as well as input param) -> autofocus on landing page still works only on desktop and tablet with JS impl. * update landing page margins on mobile * rework border and radius for search form to 0.8rem and outline * remove positioning from autocomplete JS lib and use CSS impl. * match search box and autocomplete width * rework search form to a google like design on mobile * fix settings icon display withg RTL on mobile on result page when search input is empty
2022-03-19simple theme: JS version: the reset button clear the textAlexandre Flament
The <input type="reset"> introduced in the PR 894, restores the default value. It works in the index page, but it doesn't work in the /search page: the reset button restore the initial query. This PR: * fix the JS version: the reset button clear the text * keep the clear button in the / page * hide the clear button in the /search page
2022-01-10[fix] autocomple.js: register li.onmousedown instead li.onclickMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-14[fix] eslint --fixMarkus Heiser
automatically fix some of the problems reported by eslint rules:: $ ./manage nvm.bash nvm-env$ npm --prefix searx/static/themes/simple run eslint-fix Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-05[fix] simple theme: make autocomplete-js CSP compliantMarkus Heiser
The CSP issue is, that the `_Position` function in the autocomplete-js set the style attributes by `setAttribute("style", ...)`. Using `setAttribute` to set the style attribute invokes the HTML parser and CSP is triggered [1]. This patch overwrite the `_Position` function of autocomplete-js. BTW: remove trailing whitespace [1] https://stackoverflow.com/a/57633533 Closes: https://github.com/searxng/searxng/issues/352 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-11-21[simple theme] rework select; add safesearch to search and replace / with ↵mrpaulblack
› in article url * rework selection UI in pref (fix based on: https://github.com/twelsby/searx/commit/78643e9f43a103c523f112e9f3ce26a5c7bb3a0f) * moved search filters underneath categories * cut params from url and replace / with › * make h3 and url in article bigger * add safe search select to search filter (this will not override settings and only be valid while on result page in a session) * make search form button not overlap each other when js is disabled * 1rem padding around preview image and thumbnail in default article template
2021-11-05[mod] SearXNG: remove "searx" from the searx*.js file names.Alexandre Flament