Skip to content

Commit

Permalink
Fixed localsearch integration
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Mar 1, 2021
1 parent 1081002 commit eb35ab9
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 23 deletions.

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions material/assets/javascripts/bundle.52a6371e.min.js.map

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions material/assets/javascripts/bundle.ca5457b8.min.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion material/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h1>{{ page.title | d(config.site_name, true)}}</h1>
</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 %}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion material/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
10 changes: 5 additions & 5 deletions src/assets/javascripts/browser/element/_/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 0 additions & 4 deletions src/assets/javascripts/components/search/_/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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$)

Expand Down

0 comments on commit eb35ab9

Please sign in to comment.