Skip to content

Commit

Permalink
chore: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Feb 27, 2023
1 parent d902767 commit d322e19
Showing 1 changed file with 0 additions and 6 deletions.
Expand Up @@ -20,7 +20,6 @@ export const useDocsearch = (props): Docsearch => {
// hit the hotkey to invoke it.
const loading = ref(false)
const loaded = ref(false)
const metaKey = ref(`'Meta'`)

// resolve docsearch options for current locale
const optionsLocale = computed(() => ({
Expand Down Expand Up @@ -80,11 +79,6 @@ export const useDocsearch = (props): Docsearch => {
onMounted(() => {
preconnectAlgolia()

// meta key detect (same logic as in @docsearch/js)
metaKey.value = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)
? `'⌘'`
: `'Ctrl'`

const handleSearchHotKey = (e: KeyboardEvent): void => {
if (e.key === 'k' && (e.ctrlKey || e.metaKey)) {
e.preventDefault()
Expand Down

0 comments on commit d322e19

Please sign in to comment.