mirror of
https://github.com/visortelle/haskell-spotlight.git
synced 2024-09-11 03:55:54 +03:00
Fix browser extension for Firefox
This commit is contained in:
parent
c39f9c5ff0
commit
7b4b9027be
@ -4,7 +4,7 @@
|
||||
"short_name": "Haskell Spotlight",
|
||||
"description": "Search on Hackage, Hoogle and more soon.",
|
||||
"homepage_url": "https://github.com/visortelle/hackage-ui",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"icons": { "192": "images/icon-192.png" },
|
||||
"content_scripts": [
|
||||
{
|
||||
@ -24,5 +24,11 @@
|
||||
"default_title": "Haskell title",
|
||||
"default_popup": "popup.html"
|
||||
},
|
||||
"permissions": ["storage", "unlimitedStorage", "webRequest"]
|
||||
"permissions": [
|
||||
"storage",
|
||||
"unlimitedStorage",
|
||||
"webRequest",
|
||||
"tabs",
|
||||
"https://hackage-ui.vercel.app/api/*"
|
||||
]
|
||||
}
|
||||
|
@ -5,6 +5,32 @@ import normalizeStyles from '../../styles/normalize.css';
|
||||
import globalsStyles from '../../styles/globals.css';
|
||||
import fontsStyles from '../../styles/fonts.css';
|
||||
|
||||
export type KeybindingToStorage = {
|
||||
key: string,
|
||||
modifier: string
|
||||
}
|
||||
|
||||
export type KeybindingsToStorage = Record<string, KeybindingToStorage>
|
||||
|
||||
const keybindingsToStorage: KeybindingsToStorage = {
|
||||
toggleSpotlight: {
|
||||
key: 'haskell-spotlight-toggle-spotlight-key',
|
||||
modifier: 'haskell-spotlight-toggle-spotlight-modifier',
|
||||
}
|
||||
}
|
||||
|
||||
type Keybinding = {
|
||||
key: string,
|
||||
modifier: 'shiftKey' | 'ctrlKey' | 'altKey' | 'metaKey'
|
||||
}
|
||||
|
||||
const defaultKeyBindings: Record<string, Keybinding> = {
|
||||
toggleSpotlight: {
|
||||
key: '',
|
||||
modifier: 'ctrlKey'
|
||||
}
|
||||
}
|
||||
|
||||
export default () => {
|
||||
useEffect(() => {
|
||||
normalizeStyles.use();
|
||||
|
Loading…
Reference in New Issue
Block a user