Fixed localsearch integration

This commit is contained in:
squidfunk 2021-03-01 20:08:59 +01:00
parent 108100277c
commit eb35ab949c
9 changed files with 19 additions and 23 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -217,7 +217,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.ca5457b8.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.52a6371e.min.js' | url }}"></script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}

View File

@ -15,5 +15,5 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
//# sourceMappingURL=bundle.32b3ebe8.min.js.map
//# sourceMappingURL=bundle.cf78cd63.min.js.map

View File

@ -53,5 +53,5 @@
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{ 'overrides/assets/javascripts/bundle.32b3ebe8.min.js' | url }}"></script>
<script src="{{ 'overrides/assets/javascripts/bundle.cf78cd63.min.js' | url }}"></script>
{% endblock %}

View File

@ -130,13 +130,13 @@ export function createElement<T extends keyof HTMLElementTagNameMap>(
}
/**
* Replace an element with another element
* Replace an element with the given list of nodes
*
* @param source - Source element
* @param target - Target element
* @param el - Element
* @param nodes - Replacement nodes
*/
export function replaceElement(
source: HTMLElement, target: Node
el: HTMLElement, ...nodes: Node[]
): void {
source.replaceWith(target)
el.replaceWith(...nodes)
}

View File

@ -84,10 +84,6 @@ interface MountOptions {
export function mountSearch(
el: HTMLElement, { index$, keyboard$ }: MountOptions
): Observable<Component<Search>> {
if (location.protocol === "file:")
return NEVER
/* Set up search worker */
const config = configuration()
const worker = setupSearchWorker(config.search, index$)