[Project_owners] Context menu

Ramiro Aparicio frisco82 at gmail.com
Wed Feb 1 14:32:13 EST 2006

First of all I would like to thank you for the help with extension
descriptrion localization it works perfectly now.

Now I have a different problem, I have an option in the context menu that
must be hidden most of the time but if you are in some domains it will
appear. Thanks quite usual so I have seen a lot of code that does this, but
for some reason I can not make it work properly even after copying pasting
other extensions code.

This is my overlay.xul:

<?xml version="1.0"?>
<!DOCTYPE overlay SYSTEM "chrome://foxgame/locale/foxgame.dtd">
<overlay id="FoxGameOverlay"

<script type="application/x-javascript"
<script type="application/x-javascript"
src="chrome://foxgame/content/foxgameCommon.js" />
<script type="application/x-javascript"
src="chrome://foxgame/content/foxgame.js" />
<script type="application/x-javascript"
src="chrome://foxgame/content/dateLibrary.js" />
<popup id="contentAreaContextMenu" >
<menuitem id="foxgame-config-menu" label="&foxgame.menu.configure;"
oncommand="configureFoxGame();" />


And the relevant functions in the .js:

function foxgame_initPopupMenu(event) {
    try {
        if (event.target.id != "contentAreaContextMenu") return;

        var fgMenu = document.getElementById("foxgame-config-menu");
    fgMenu.hidden = !isOGameDomain(window._content.document.location.href);
    fgMenu.collapsed =
    } catch (e){

foxgame_initPopupMenu, false);

The debug function shows an alert but it is not called so no exceptcion is
found. I have tried adding the even listener to window also, also listening
to "popupshown", giving a menu element father to the menu item...
And the funniest thing as you can see I added dumps to console and that
shows that hidden is set correctly (false when it must be false) but for
some reason it does not show the option.

I also tried disabling al extension and nothing but I have my extension
active adblock+ options are not shown.

Can somebody give me an idea about what I am doing wrong?.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20060201/cd6b6afd/attachment.htm

More information about the Project_owners mailing list