sorry for this big quote:
~gargoyle wrote:I am have a problem, in that I am getting a double listing of my custom codes.
The first time I use BBcode it works ok and only the 10 items are list however the second time I use it the list is now doubled entries.
Any idea as to what is going on?
I think we found the reason for this (earlier mentioned) strange behaviour. The "ClearMenu"-method in chrome\content\bbcode\bbcode.js (bbcode.jar) must be changed from:
Code: Select all
ClearMenu: function(aParent) {
var children = aParent.childNodes;
for (i = 0; i < children.length; i++) {
var index = children[i].getAttribute("index");
if (index)
aParent.removeChild(children[i]);
}
},
into:
Code: Select all
ClearMenu: function(aParent) {
var children = aParent.childNodes;
for (i = children.length - 1; i > -1; i--) {
var index = children[i].getAttribute("index");
if (index)
aParent.removeChild(children[i]);
}
},
With this change the function browses the collection of menuentries backwards (see "for (i = children.length - 1; i > -1; i--) {") and deletes them -> no buggy shifting of "i" anymore.
Look at german firefox-forum for more details: http://www.firefox-browser.de/forum/vie ... hp?t=35078