diff --git a/firefox/content.js b/firefox/content.js
index 93e9f92..06394d9 100644
--- a/firefox/content.js
+++ b/firefox/content.js
@@ -84,7 +84,8 @@ $(document).ready(() => {
function populateOmniFilter(actions) {
isFiltered = true;
$("#omni-extension #omni-list").html("");
- actions.forEach((action, index) => {
+ const renderRow = (index) => {
+ const action = actions[index]
var keys = "";
if (action.keycheck) {
keys = "
";
@@ -93,17 +94,23 @@ $(document).ready(() => {
});
keys += "
";
}
- var img = "
";
+ var img = "
";
if (action.emoji) {
img = ""+action.emojiChar+""
}
if (index != 0) {
- $("#omni-extension #omni-list").append(""+img+"
"+action.title+"
"+action.url+"
"+keys+"
Select ⏎
");
+ return $(""+img+"
"+action.title+"
"+action.url+"
"+keys+"
Select ⏎
")[0]
} else {
- $("#omni-extension #omni-list").append(""+img+"
"+action.title+"
"+action.url+"
"+keys+"
Select ⏎
");
+ return $(""+img+"
"+action.title+"
"+action.url+"
"+keys+"
Select ⏎
")[0]
}
- })
- $(".omni-extension #omni-results").html(actions.length+" results");
+ }
+ actions.length && new VirtualizedList.default($("#omni-extension #omni-list")[0], {
+ height: 400,
+ rowHeight: 60,
+ rowCount: actions.length,
+ renderRow,
+ onMount: () => $(".omni-extension #omni-results").html(actions.length+" results"),
+ });
}
// Open the omni
diff --git a/firefox/manifest.json b/firefox/manifest.json
index e8a8beb..f4a2574 100644
--- a/firefox/manifest.json
+++ b/firefox/manifest.json
@@ -33,7 +33,7 @@
""
],
"run_at": "document_end",
- "js": ["focus.js", "jquery.js", "content.js"],
+ "js": ["focus.js", "jquery.js", "content.js", "virtualized-list.min.js"],
"css": ["content.css"]
}
],
diff --git a/firefox/newtab.html b/firefox/newtab.html
index 06a4289..3086923 100644
--- a/firefox/newtab.html
+++ b/firefox/newtab.html
@@ -14,5 +14,6 @@
+