Update: BBCode 0.4.1 released (May 15th 2005)

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
Sobotnik
Posts: 3
Joined: March 29th, 2007, 1:59 pm

Post by Sobotnik »

Hi,

sorry for this big quote:
~gargoyle wrote:I am have a problem, in that I am getting a double listing of my custom codes.
Image

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.
Image


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
User avatar
Philip Chee
Posts: 6475
Joined: March 1st, 2005, 3:03 pm
Contact:

Post by Philip Chee »

Yes, nodelists are now live so deleting a childNode shuffles the remaining childNodes around immediately.

Phil
User avatar
mai9
Posts: 1619
Joined: January 15th, 2003, 3:41 pm
Location: Barcelona
Contact:

Post by mai9 »

What happened to this extension? it's not on addons.mozilla.org and the website (posted on the first page) is dead.

and can somebody make a xpi with the above problem solved?
Peter P. Schifferli
Posts: 462
Joined: December 10th, 2004, 7:59 pm

Post by Peter P. Schifferli »

There is also BBCode 0.4.1.6 3D Center Special Edition:
http://www.sephiroth-j.de/1/mozilla/

Pete
:)
Win 8.1, Fx 77.0.1, Tb 68.8.1
User avatar
mai9
Posts: 1619
Joined: January 15th, 2003, 3:41 pm
Location: Barcelona
Contact:

Post by mai9 »

I finally have a nice working .xpi file of this extension. I grabbed the version 0.4.2 from mozilla.org, then I applied the code Sobotnik posted last April to solve the repetition of submenus, then I also placed the custom menu on top (because it's the one I use most), and I also shortened the menus strings because it means less mouse traveling.

In case you want it, here it is (I had to use tinyurl because mozillazine didn't like the original link).

Also, thanks for those who suggested other extensions instead of BBCode, but I still prefer the original BBCode.
Post Reply