We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d25266b commit c75b840Copy full SHA for c75b840
src/main.ts
@@ -33,7 +33,14 @@ const ui = {
33
const filterButtonList = (list: HTMLDivElement, string: string) => {
34
for (const button of Array.from(list.children)) {
35
if (!(button instanceof HTMLButtonElement)) continue;
36
- if (!button.textContent.toLowerCase().includes(string)) {
+ const formatIndex = button.getAttribute("format-index");
37
+ let hasExtension = false;
38
+ if (formatIndex) {
39
+ const format = allOptions[parseInt(formatIndex)];
40
+ hasExtension = format?.format.extension.toLowerCase().includes(string);
41
+ }
42
+ const hasText = button.textContent.toLowerCase().includes(string);
43
+ if (!hasExtension && !hasText) {
44
button.style.display = "none";
45
} else {
46
button.style.display = "";
0 commit comments