<?xml version="1.0"?>
<?xml-stylesheet href="chrome://torbutton/skin/torbutton.css" type="text/css"?> 
<?xul-overlay href="chrome://torbutton/content/popup.xul"?>

<!DOCTYPE overlay SYSTEM "chrome://torbutton/locale/torbutton.dtd">

<overlay id="torbutton-overlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

    <!-- SAFECACHE -->
    <script src="chrome://torbutton/content/stanford-safecache.js" />

    <script type="application/x-javascript" src="chrome://torbutton/content/torbutton_util.js" />
    <script type="application/x-javascript" src="chrome://torbutton/content/torbutton.js" />
    <script language="JavaScript">
        //onLoad Hander
        try{window.addEventListener("load", torbutton_init, false);}catch(e){}
    </script>

    <stringbundleset id="torbutton-stringbundleset">
        <stringbundle id="torbutton-bundle" src="chrome://torbutton/locale/torbutton.properties"/>
    </stringbundleset>

    <!-- Place the context menu in the nav bar, so that the lack
         of the status bar on FF4 doesn't make it invisible -->
    <toolbar id="nav-bar">
        <menupopup id="torbutton-context-menu"/>
    </toolbar>

    <toolbarpalette id="BrowserToolbarPalette">
        <toolbarbutton 
            id="torbutton-button"
            class="toolbarbutton-1 chromeclass-toolbar-additional"
            label="Torbutton"
            tooltiptext="&torbutton.button.tooltip;"
            menu="torbutton-context-menu"
            context="torbutton-context-menu"/>
    </toolbarpalette>
    <!--
    <commandset id="mainCommandSet">
        <command id="torbutton-toggle-cmd" oncommand="torbutton_toggle(false);"/>
    </commandset>

    <keyset id="mainKeyset">
        <key id="torbutton-toggle-key" modifiers="control" key="2"
             command="torbutton-toggle-cmd"/>
    </keyset>
    -->
    <statusbar id="status-bar">
        <statusbarpanel id="torbutton-panel"
            insertbefore="statusbar-updates"
                        menu="torbutton-context-menu"
                        context="torbutton-context-menu" />
<!--        <statusbarpanel context="clipmenu" class="statusbarpanel-iconic" id="plugins-status" tooltip="plugin-tooltip" onclick="torbutton_toggle_plugins();"/> -->
   </statusbar>
   <popup id="contentAreaContextMenu">
			<menuitem 
					id="torcontext-copyurl"
					label="&torbutton.context_menu.copyTor;" 
					accesskey="&torbutton.context_menu.copyTor.key;"
					insertafter="context-copylink"
					oncommand="torbutton_copy_link();"/>  
			    <menuitem 
					id="torcontext-opentortab"
					label="&torbutton.context_menu.openTorTab;" 
					accesskey="&torbutton.context_menu.openTorTab.key;" 
					insertafter="context-openlinkintab"					
					oncommand="torbutton_open_link_as_tor(true);"/>
					<menuitem 
					id="torcontext-opentorwin"
					label="&torbutton.context_menu.openTorWindow;" 
					accesskey="&torbutton.context_menu.openTorWindow.key;" 
					insertafter="context-openlinkintab"					
					oncommand="torbutton_open_link_as_tor(false);"/>
					
  </popup>
</overlay>
