From d7b98a76e3871746f5b2dda93906a4294ec49f47 Mon Sep 17 00:00:00 2001 From: kawamataryo Date: Mon, 3 Jan 2022 19:36:29 +0900 Subject: [PATCH] [from now] 2022/01/03 19:36:29 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/scripts/prepare.ts b/scripts/prepare.ts index 5c78c0c..edce3e7 100644 --- a/scripts/prepare.ts +++ b/scripts/prepare.ts @@ -9,7 +9,6 @@ import { r, port, isDev, log } from './utils' */ async function stubIndexHtml() { const views = [ - 'options', 'popup', 'background', ] diff --git a/src/background/main.ts b/src/background/main.ts index 5691cbd..a25cf11 100644 --- a/src/background/main.ts +++ b/src/background/main.ts @@ -9,7 +9,6 @@ if (import.meta.hot) { import('./contentScriptHMR') } -// タイトルの重複する削除した履歴を返す const removeDuplicates = (histories: History.HistoryItem[]) => { return Array.from( histories @@ -21,7 +20,7 @@ const removeDuplicates = (histories: History.HistoryItem[]) => { ) } -const addHost = (histories: History.HistoryItem[]) => { +const addHostname = (histories: History.HistoryItem[]) => { return histories.map((item) => { const url = new URL(item.url!) return { @@ -44,7 +43,7 @@ browser.commands.onCommand.addListener(async() => { await sendMessage( 'history-search', - { result: JSON.stringify(addHost(removeDuplicates(result))) }, + { result: JSON.stringify(addHostname(removeDuplicates(result))) }, { context: 'content-script', tabId: tab.id!, diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index e666f57..1ecee06 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -2,7 +2,7 @@