Re: Replacing XUL file within comm.jar

Chris I <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpinstall
Organization http://mozillachampions.mozdev.org/
Message-ID <[email protected]>
Will Levine spoke thusly:
> Chris I wrote:
> 
>>Many Netscape 7.1 users have complained about "Open link in new window"
>>being before "Open link in new tab" in the link context menu. This can
>>be changed via editing the file
>>\content\communicator\contentAreaContextOverlay.xul in comm.jar.
>>
>>I would like to make an XPI that will replace that file with the new
>>one. There was nothing added to the file, nothing subtracted. I just
>>switched the order of those two entries.
>>
>>How should I go about this? Is it possible to replace a file within
>>comm.jar via XPI? Can I create a separate JAR file that will override
>>that one overlay file? I definitely want to install it
>>'installation-wide' rather than per profile.
> 
> I think the preferred way to do this would be to use JavaScript to move
> the elements around instead of replacing whole files.  Maybe something
> like (I haven't tested this)
> 
> newwindow = document.getElementById("context-openlink");
> newtab = document.getElementById("context-openlinkintab");
> 
> document.documentElement.insertBefore("newtab", "newwindow");

Would this be added to the install.js, or as a separate js file?
-- 
[email protected] - Mozilla Champion
Netscape Links <http://ilias.ca>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.