From 27d0a7f37d24a0ad68a8ccb7dee18fc1d00eea58 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 7 May 2019 20:50:19 +0900 Subject: Use search settings on paster --- src/content/urls.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/content/urls.ts') diff --git a/src/content/urls.ts b/src/content/urls.ts index 390efde..035b9bb 100644 --- a/src/content/urls.ts +++ b/src/content/urls.ts @@ -1,5 +1,6 @@ import * as messages from '../shared/messages'; import * as urls from '../shared/urls'; +import { Search } from '../shared/Settings'; const yank = (win: Window) => { let input = win.document.createElement('input'); @@ -15,7 +16,7 @@ const yank = (win: Window) => { input.remove(); }; -const paste = (win: Window, newTab: boolean, searchSettings: any) => { +const paste = (win: Window, newTab: boolean, search: Search) => { let textarea = win.document.createElement('textarea'); win.document.body.append(textarea); @@ -26,7 +27,7 @@ const paste = (win: Window, newTab: boolean, searchSettings: any) => { if (win.document.execCommand('paste')) { let value = textarea.textContent as string; - let url = urls.searchUrl(value, searchSettings); + let url = urls.searchUrl(value, search); browser.runtime.sendMessage({ type: messages.OPEN_URL, url, -- cgit v1.2.3