<?xml version="1.0"?>
<!-- 
Toolbar button needs to be extended to show a counter for the number of
rulesets applied, and this can be done using XBL. 

See: https://developer.mozilla.org/en-US/docs/XBL
-->
<bindings xmlns="http://www.mozilla.org/xbl"
    xmlns:xbl="http://www.mozilla.org/xbl"
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <binding id="https-everywhere-binding">
    <content>
      <!-- ruleset counter (rscounter) and rulesets applied (rsapplied) -->
      <xul:stack id="rscounter">
        <xul:label id="rsapplied" xbl:inherits="value=rulesetsApplied" />
      </xul:stack>

      <!-- 
      Https everywhere toolbar button is already defined; just use its settings. 
      TODO: Look into any issues with oncommand/oncontext.
      -->
      <xul:toolbarbutton 
          class="https-everywhere-button toolbarbutton-1 chromeclass-toolbar-additional"
          flex="1" 
          allowevents="true"
          xbl:inherits="type,crop,image,label,accesskey,command,align,dir,pack,orient">

        <children includes="menupopup" />
      </xul:toolbarbutton>
    </content>
  </binding>
</bindings>
