From c8b182b5fe310bf1a5abc51625226a2e0d48f313 Mon Sep 17 00:00:00 2001 From: "axel%pike.org" Date: Fri, 27 Apr 2001 09:20:59 +0000 Subject: [PATCH] not part of the build; make buster start up twice as fast, r=sicking@bigfoot.com; thanx to sicking for XUL update of the search button git-svn-id: svn://10.0.0.236/trunk@93259 18797224-902f-48f8-a5cc-f745e15eee43 --- .../resources/buster/xulTxTools.js | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/mozilla/extensions/transformiix/resources/buster/xulTxTools.js b/mozilla/extensions/transformiix/resources/buster/xulTxTools.js index 5b925616937..e6f969c168b 100644 --- a/mozilla/extensions/transformiix/resources/buster/xulTxTools.js +++ b/mozilla/extensions/transformiix/resources/buster/xulTxTools.js @@ -68,22 +68,28 @@ var view = ({ this.selection.toggleSelect(index); }, swallow : function(initial) { + var startt = new Date(); this.rowCount = initial.length; - this.content = initial; this.success = new Array(this.rowCount); this.names = new Array(this.rowCount); this.purps = new Array(this.rowCount); this.comms = new Array(this.rowCount); - for (k=0;k1) - this.purps[k] = cur.childNodes.item(1).firstChild.nodeValue; - if (cur.childNodes.length>3) - this.comms[k] = cur.childNodes.item(3).firstChild.nodeValue; + var cur = initial.item(0); + var k = 0; + while (cur.nextSibling) { + if (cur.nodeType==Node.ELEMENT_NODE) { + this.names[k] = cur.getAttribute("file"); + if (cur.childNodes.length>1) + this.purps[k] = cur.childNodes.item(1).firstChild.nodeValue; + if (cur.childNodes.length>3) + this.comms[k] = cur.childNodes.item(3).firstChild.nodeValue; + k = k+1; + } + cur = cur.nextSibling; } netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); this.outliner.rowCountChanged(0,this.rowCount); + //dump((new Date()-startt)/1000+" secs in swallow for "+k+" items\n"); }, remove : function(first,last){ last = Math.min(this.rowCount,last); @@ -194,7 +200,7 @@ function hide_checked(yes){ function select(){ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); - var searchField = matchFieldTag.getAttribute("data"); + var searchField = matchFieldTag.getAttribute("value"); var matchRE = new RegExp(matchNameTag.value); for (k=0;k