diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-19 09:34:40 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-19 09:34:40 +0900 |
commit | 4be04628e19392d8da9688d538cc3374e91005d8 (patch) | |
tree | 5c2299f6b85bf96dc9df65ddd7c27aef01b0ed69 /src/content/focuses.ts | |
parent | e0c4182f14f908d13c8c814c7bc2b48a1791f881 (diff) |
Remove unused components
Diffstat (limited to 'src/content/focuses.ts')
-rw-r--r-- | src/content/focuses.ts | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/content/focuses.ts b/src/content/focuses.ts deleted file mode 100644 index 8f53881..0000000 --- a/src/content/focuses.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as doms from '../shared/utils/dom'; - -const focusInput = (): void => { - let inputTypes = ['email', 'number', 'search', 'tel', 'text', 'url']; - let inputSelector = inputTypes.map(type => `input[type=${type}]`).join(','); - let targets = window.document.querySelectorAll(inputSelector + ',textarea'); - let target = Array.from(targets).find(doms.isVisible); - if (target instanceof HTMLInputElement) { - target.focus(); - } else if (target instanceof HTMLTextAreaElement) { - target.focus(); - } -}; - -export { focusInput }; |