1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 11:58:00 +01:00

Fix :bmarks completion

This commit is contained in:
Kris Maglione
2008-10-10 17:29:40 +00:00
parent 9d6bd1f9e4
commit 3c28cbf9f6

View File

@@ -1264,7 +1264,7 @@ liberator.ItemList = function (id) //{{{
doc.body.addEventListener("DOMSubtreeModified", autoSize, true); doc.body.addEventListener("DOMSubtreeModified", autoSize, true);
// TODO: temporary, to be changed/removed // TODO: temporary, to be changed/removed
function createRow(b, c, a, dom) function createRow([b, c, a], dom)
{ {
/* Obviously, ItemList shouldn't know or care about this. */ /* Obviously, ItemList shouldn't know or care about this. */
let filter = liberator.completion.filterString; let filter = liberator.completion.filterString;
@@ -1311,14 +1311,14 @@ liberator.ItemList = function (id) //{{{
if (diff == 1) /* Scroll down */ if (diff == 1) /* Scroll down */
{ {
let item = completions[endIndex - 1]; let item = completions[endIndex - 1];
let row = createRow(item[0], item[1], item[2], true); let row = createRow(item, true);
tbody.removeChild(tbody.firstChild); tbody.removeChild(tbody.firstChild);
tbody.appendChild(row); tbody.appendChild(row);
} }
else /* Scroll up */ else /* Scroll up */
{ {
let item = completions[offset]; let item = completions[offset];
let row = createRow(item[0], item[1], item[2], true); let row = createRow(item, true);
tbody.removeChild(tbody.lastChild); tbody.removeChild(tbody.lastChild);
tbody.insertBefore(row, tbody.firstChild); tbody.insertBefore(row, tbody.firstChild);
} }
@@ -1335,7 +1335,7 @@ liberator.ItemList = function (id) //{{{
let tbody = div.div; let tbody = div.div;
for (let i in liberator.util.range(offset, endIndex)) for (let i in liberator.util.range(offset, endIndex))
tbody.* += createRow.apply(null, completions[i]); tbody.* += createRow(completions[i]);
div.* += div.* +=
<div class="completion-items"> <div class="completion-items">