aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-05-30 22:10:39 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-05-30 22:10:39 +0900
commit0f3ad23085c8e2fd7c350590b3ee87cac6ade945 (patch)
treeab0de48e909cf229437a2ff85720c69bd616ed89 /src
parent68fa80e1a300c3fe9504d51e166b64964189736d (diff)
Ignore cases for tab filtering
Diffstat (limited to 'src')
-rw-r--r--src/background/shared/tabs.js3
1 files changed, 2 insertions, 1 deletions
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);
});