diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-02 14:08:51 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-05 23:59:59 +0900 |
commit | d01db82c0dca352de2d7644c383d388fc3ec0366 (patch) | |
tree | ff09ebc545ce00192dff9e1119b0c9e2cf92fdef /src/content/urls.ts | |
parent | 992b3ac65d7fe86ac7bc3b560960c8bcf86bec69 (diff) |
Types src/content
Diffstat (limited to 'src/content/urls.ts')
-rw-r--r-- | src/content/urls.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/content/urls.ts b/src/content/urls.ts index 6e7ea31..390efde 100644 --- a/src/content/urls.ts +++ b/src/content/urls.ts @@ -1,7 +1,7 @@ -import messages from 'shared/messages'; +import * as messages from '../shared/messages'; import * as urls from '../shared/urls'; -const yank = (win) => { +const yank = (win: Window) => { let input = win.document.createElement('input'); win.document.body.append(input); @@ -15,7 +15,7 @@ const yank = (win) => { input.remove(); }; -const paste = (win, newTab, searchSettings) => { +const paste = (win: Window, newTab: boolean, searchSettings: any) => { let textarea = win.document.createElement('textarea'); win.document.body.append(textarea); @@ -25,7 +25,7 @@ const paste = (win, newTab, searchSettings) => { textarea.focus(); if (win.document.execCommand('paste')) { - let value = textarea.textContent; + let value = textarea.textContent as string; let url = urls.searchUrl(value, searchSettings); browser.runtime.sendMessage({ type: messages.OPEN_URL, |