开发者

Firefox extension to display image in status bar

开发者 https://www.devze.com 2023-01-20 01:21 出处:网络
I am trying to write my first \"hello world\" extension for Firefox. It\'s working fine, but I also want to display an image in the status bar & the image is not displaying.

I am trying to write my first "hello world" extension for Firefox.

It's working fine, but I also want to display an image in the status bar & the image is not displaying.

My folder structure are as follows:

  helloworld
            chrome.manifest
            icon.png
            install.rdf
            ->chrome
                    ->content
                      sample.xul
                     ->icons
                       hpsched18.png

-> shows folder in above example

My XUL code:

<?xml version="1.0"?>
                  <overlay id="sample" 
                  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
            <statusbar id="status-bar">
           <statusbarpanel id="my-panel" label="Hello, World"  
            src="chrome://sample/chrome/content/icons/hpsched18.png"
            tooltiptext="Hello Word Tool Tip"
            />
           <statusbarpanel label="Left panel"
           tooltiptext="Sample status bar Left panel"
       开发者_JAVA技巧     />
           <spacer flex="1"/>
             <progressmeter mode="determined" value="82"/>
            <statusbarpanel label="Right panel"/>
         </statusbar>
        </overlay>

Everything works fine... status bar, messages, tool tip... Only the image, which is in the helloworld\chrome\icons folder does not display on the status bar.

Any help for that? Maybe I am writing wrong code or path etc. but application name is sample.

Thanks.


Try:

src="chrome://sample/content/icons/hpsched18.png" tooltiptext="Hello Word Tool Tip" />
0

精彩评论

暂无评论...
验证码 换一张
取 消