Help › Website plugin 1.1

All the search options

Every option ScriptureTips.search takes. The element options give the search a place on the page: use element, or input and results together.

OptionDoes
elementThe container that gets the field with its results under it.
input, resultsThe field and the results in two elements.
translationsTranslations to search, by id, in order of preference. Only those that may be shown on other sites are searched. About Widget Translations
kindsreference, text, original.
limitVerses fetched at a time, up to 50.
morescroll (default), button (a Show more button) or none: how a long list of results goes on.
placeholderWords in the empty field.
suggestSuggestions as the visitor types. On unless false.
searchOnTypeSearch as typing pauses, instead of waiting for Enter. Off by default (data-search-on-type="true" in markup).
onSelectWhat picking a result does, instead of opening the reader (more).
stringsReplace any of the search's words, to translate them.
nameThe search's name for ScriptureTipsSearch.get(name).
apiThe data server's API; where the script came from if left out.

Matching your site's look

The search and the reader take the same CSS variables as the passage tooltip (--st-accent, --st-ink, --st-muted, --st-rule, --st-paper, --st-radius, --st-font), and --st-search-hit for matched words. Matching your site's look has the table and an example.

What it sends

Only the words typed and the passages picked, to the data server, with no cookies and nothing stored in the visitor's browser. Allow the data server in your content security policy's script-src and connect-src.