From c60d0e7392fc708e961614d6b756a045de74f458 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 30 Apr 2019 14:00:07 +0900 Subject: Rename .js/.jsx to .ts/.tsx --- src/content/focuses.js | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 src/content/focuses.js (limited to 'src/content/focuses.js') diff --git a/src/content/focuses.js b/src/content/focuses.js deleted file mode 100644 index a6f6cc8..0000000 --- a/src/content/focuses.js +++ /dev/null @@ -1,13 +0,0 @@ -import * as doms from 'shared/utils/dom'; - -const focusInput = () => { - 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) { - target.focus(); - } -}; - -export { focusInput }; -- cgit v1.2.3