mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added logging of icon searches
This commit is contained in:
parent
6ad24784cc
commit
8de8da222f
@ -9,8 +9,8 @@
|
|||||||
"assets/stylesheets/main.css.map": "assets/stylesheets/main.45122f27.min.css.map",
|
"assets/stylesheets/main.css.map": "assets/stylesheets/main.45122f27.min.css.map",
|
||||||
"assets/stylesheets/palette.css": "assets/stylesheets/palette.e03a20ad.min.css",
|
"assets/stylesheets/palette.css": "assets/stylesheets/palette.e03a20ad.min.css",
|
||||||
"assets/stylesheets/palette.css.map": "assets/stylesheets/palette.e03a20ad.min.css.map",
|
"assets/stylesheets/palette.css.map": "assets/stylesheets/palette.e03a20ad.min.css.map",
|
||||||
"overrides/assets/javascripts/bundle.js": "overrides/assets/javascripts/bundle.0f7341a3.min.js",
|
"overrides/assets/javascripts/bundle.js": "overrides/assets/javascripts/bundle.e5217812.min.js",
|
||||||
"overrides/assets/javascripts/bundle.js.map": "overrides/assets/javascripts/bundle.0f7341a3.min.js.map",
|
"overrides/assets/javascripts/bundle.js.map": "overrides/assets/javascripts/bundle.e5217812.min.js.map",
|
||||||
"overrides/assets/stylesheets/main.css": "overrides/assets/stylesheets/main.c2cc92d1.min.css",
|
"overrides/assets/stylesheets/main.css": "overrides/assets/stylesheets/main.c2cc92d1.min.css",
|
||||||
"overrides/assets/stylesheets/main.css.map": "overrides/assets/stylesheets/main.c2cc92d1.min.css.map"
|
"overrides/assets/stylesheets/main.css.map": "overrides/assets/stylesheets/main.c2cc92d1.min.css.map"
|
||||||
}
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -53,5 +53,5 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script src="{{ 'overrides/assets/javascripts/bundle.0f7341a3.min.js' | url }}"></script>
|
<script src="{{ 'overrides/assets/javascripts/bundle.e5217812.min.js' | url }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -24,8 +24,10 @@ import { Observable, combineLatest, fromEvent, merge } from "rxjs"
|
|||||||
import {
|
import {
|
||||||
delay,
|
delay,
|
||||||
distinctUntilChanged,
|
distinctUntilChanged,
|
||||||
|
filter,
|
||||||
map,
|
map,
|
||||||
startWith
|
startWith,
|
||||||
|
withLatestFrom
|
||||||
} from "rxjs/operators"
|
} from "rxjs/operators"
|
||||||
|
|
||||||
import { watchElementFocus } from "~/browser"
|
import { watchElementFocus } from "~/browser"
|
||||||
@ -71,6 +73,17 @@ export function mountIconSearchQuery(
|
|||||||
distinctUntilChanged()
|
distinctUntilChanged()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/* Log search on blur */
|
||||||
|
focus$
|
||||||
|
.pipe(
|
||||||
|
filter(active => !active),
|
||||||
|
withLatestFrom(value$)
|
||||||
|
)
|
||||||
|
.subscribe(([, value]) => {
|
||||||
|
const path = document.location.pathname
|
||||||
|
ga("send", "pageview", `${path}?q=[icon]+${value}`)
|
||||||
|
})
|
||||||
|
|
||||||
/* Combine into single observable */
|
/* Combine into single observable */
|
||||||
return combineLatest([value$, focus$])
|
return combineLatest([value$, focus$])
|
||||||
.pipe(
|
.pipe(
|
||||||
|
Loading…
Reference in New Issue
Block a user