From 0f3ad23085c8e2fd7c350590b3ee87cac6ade945 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 30 May 2018 22:10:39 +0900 Subject: [PATCH] Ignore cases for tab filtering --- src/background/shared/tabs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/background/shared/tabs.js b/src/background/shared/tabs.js index 6b171a3..62e26ac 100644 --- a/src/background/shared/tabs.js +++ b/src/background/shared/tabs.js @@ -15,7 +15,8 @@ const closeTabForce = (id) => { const queryByKeyword = (keyword, excludePinned = false) => { return browser.tabs.query({ currentWindow: true }).then((tabs) => { return tabs.filter((t) => { - return t.url.includes(keyword) || t.title && t.title.includes(keyword); + return t.url.toLowerCase().includes(keyword.toLowerCase()) || + t.title && t.title.toLowerCase().includes(keyword.toLowerCase()); }).filter((t) => { return !(excludePinned && t.pinned); });