|
|
|
@ -890,24 +890,33 @@ let kara = new Vue({
@@ -890,24 +890,33 @@ let kara = new Vue({
|
|
|
|
|
this.updateStorage(); |
|
|
|
|
}, |
|
|
|
|
includesOneOf(keywords, wordsToSearch) { |
|
|
|
|
let lowerCasedKeywords = []; |
|
|
|
|
keywords.forEach((keyword) => { |
|
|
|
|
lowerCasedKeywords.push(keyword.toLowerCase()); |
|
|
|
|
}); |
|
|
|
|
let includes = false; |
|
|
|
|
|
|
|
|
|
wordsToSearch.forEach((searchWord) => { |
|
|
|
|
if (keywords.includes(searchWord)) { |
|
|
|
|
if (lowerCasedKeywords.includes(searchWord)) { |
|
|
|
|
includes = true; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return includes; |
|
|
|
|
}, |
|
|
|
|
includesAllOf(keywords, wordsToSearch) { |
|
|
|
|
let lowerCasedKeywords = []; |
|
|
|
|
keywords.forEach((keyword) => { |
|
|
|
|
lowerCasedKeywords.push(keyword.toLowerCase()); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
let includesAllkeywords = true; |
|
|
|
|
|
|
|
|
|
wordsToSearch.forEach((searchWord) => { |
|
|
|
|
if (!keywords.includes(searchWord)) { |
|
|
|
|
if (!lowerCasedKeywords.includes(searchWord)) { |
|
|
|
|
includesAllkeywords = false; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return includesAllkeywords; |
|
|
|
|
}, |
|
|
|
|