

Macromedia News Firefox Extension for 1.5 Beta / Update
source link: http://www.mikechambers.com/blog/2005/12/05/macromedia-news-firefox-extension-for-15-beta-update/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Macromedia News Firefox Extension for 1.5 Beta / Update
Monday, December 5, 2005
I have uploaded a beta version of the soon to be renamed Macromedia News Firefox extension that (kind of) works with Firefox 1.5.
There are some significant known issues with this build, so I am not adding it to the main extension page. You can only download it from here.
Download Macromedia News Firefox Extension Beta
I had hoped to fix all of the issues before posting it, but decided to post it for two reasons:
- Tons of people have been asking me to update it
- I am having trouble fixing one of the issues, and maybe by releasing it, someone might have an idea of what is going on
Here is the main issue. Something in Firefox 1.5 changed, so that when I call MenuPopup.childNodes, some of the nodes are now null, where as they used to contain the nodes of the menu. Because of this, the menu cannot clear itself (since I can’t remove the nodes that come through as null), before it is rebuilt. The odd thing is that the the childNodes length is correct, but that some of the node references within it are just null.
You can reproduce this with the following steps:
- Install the extension, and restart Firefox
- Open the preferences, and change the “View Items” setting to “Chronologically”
- Save the settings
- View the menu
Notice that the menu is all messed up. Basically, the clearMenu function was not able to remove some of the menu items because it could not get a reference to them.
If you restart Firefox, then everything will draw correctly with the new preferences.
If you are interested in looking at the code, simply rename the extension file to .zip and unzip it. The code is in:
chrome\macromedianews\content\macromedianews\macromediaNewsOverlay.js
You can also look at and modify the installed extension within the Firefox install by looking at
\Mozilla\Firefox\Profiles\ACTIVEPROFILE\extensions\{1d6fc8a9-d399-4629-ade8-c4013c2e5c0f}
which on Windows is found in the Application Settings directory. Changes to this code will be run once you restart Firefox. Finally, you can find info on developing and debugging Firefox extensions here.
The bug manifests itself in the clearMenu call, although that is not where it originates. Here is a modified clearMenu function that dumps / alerts the nodes and shows that some are null:
function clearMenu()
{
var cNodes = newsMenuPopup.childNodes;
var cLen = cNodes.length;
var node;
var val;
for(var i = 0; i < cLen; i++)
{
node = cNodes[i];
dump("Node : " + i + " : " + node);
alert("Node : " + i + " : " + node);
if(node.getAttribute("isNewsItem") == "true")
{
val = node.getAttribute("value");
if(val.length > 0)
{
oldMenuHash[val] = (node.getAttribute("isNew") == "true");
}
newsMenuPopup.removeChild(node);
}
else if(node.getAttribute("isNewsItemHeader") == "true")
{
newsMenuPopup.removeChild(node);
}
else if(node.getAttribute("isNewsItemSeperator") == "true")
{
newsMenuPopup.removeChild(node);
}
}
}
I am going to keep working on it and try to figure out what is going on (or what changed in Firefox 1.5 that broke this). If anyone has any ideas / thoughts about what is going on, or questions about the code, then post them in the comments.
Recommend
-
9
Macromedia News Firefox Extension Updated Tuesday, January 24, 2006 I have uploaded a new version of the Macromedia News Firefox extension. This version adds s...
-
13
Macromedia News Firefox Extension Fixed! Tuesday, January 24, 2006 Just a quick fyi, but I just fixed the issue...
-
14
Macromedia News Firefox Extension and Firefox 1.5 Tuesday, November 29, 2005 As Christian mentioned, Firefox 1.5 was released tod...
-
10
Macromedia News Firefox Extension Updates Thursday, October 20, 2005 I just did a minor update to the Macromedia News Firefox Extension. The new version is 0.9...
-
14
Macromedia XML News Aggregator Public Beta Tuesday, April 5, 2005 As Christian Cantrell posted earlier, we have just released a public beta of the next ve...
-
18
New Version of Macromedia News Extension Tuesday, December 14, 2004 I have just posted a new version of the Macromedia News Extension for FireFox and ThunderBird...
-
8
Updated Macromedia News FireFox Extension Soon Friday, December 10, 2004 Just quick fyi : I should have an updated version of my Macromedia News FireFox extension
-
14
Macromedia News FireFox Extension Preferences Thursday, December 9, 2004 As I posted the other day, I have built an
-
8
Macromedia News FireFox Extension Tuesday, December 7, 2004 I have put together a simple extension for FireFox which mak...
-
11
Beta Macromedia Resource RSS Feed Update Wednesday, February 12, 2003 As I noted here, I am testing an RSS version of the...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK