summaryrefslogtreecommitdiff
path: root/data/extensions/https-everywhere-eff@eff.org/chrome/content/toolbar_button.xul
blob: 58eb69b65c9569dd746f8a4c8d3fb9e62926eca1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://https-everywhere/skin/https-everywhere.css" type="text/css"?>

<!DOCTYPE overlay SYSTEM "chrome://https-everywhere/locale/https-everywhere.dtd">

<!-- helpful docs at 
     https://developer.mozilla.org/en/XUL/PopupGuide/PopupEvents -->

<overlay id="https-everywhere-button-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script type="application/x-javascript" src="chrome://https-everywhere/content/toolbar_button.js"/>
  <script type="application/x-javascript" src="chrome://https-everywhere/content/ruleset-tests.js"/>
  
    <stringbundleset id="stringbundleset">
        <stringbundle id="HttpsEverywhereStrings"
      src="chrome://https-everywhere/locale/https-everywhere.properties" />
    </stringbundleset>

  <!-- this works in Firefox, we need a Seamonkey version too... -->
  <menupopup id="menu_ToolsPopup" onpopupshowing="stitch_context_menu()">
    <menu id="https-everywhere-menu" label="&https-everywhere.about.ext_name;"> 
      <!-- "https-everywhere-context" below gets .cloneNode()ed in here -->
    </menu>
  </menupopup>

  <menupopup id="toolsPopup" onpopupshowing="stitch_context_menu2()">
    <menu id="https-everywhere-menu2" label="&https-everywhere.about.ext_name;">
      <!-- "https-everywhere-context" below gets .cloneNode()ed in here -->
    </menu>
  </menupopup>
  
  <toolbarpalette id="BrowserToolbarPalette">
    <toolbarbutton 
      id="https-everywhere-button"
      tooltiptext="&https-everywhere.about.ext_name;"
      label="&https-everywhere.about.ext_name;"
      context="https-everywhere-context-menu"
      oncontextmenu="this.open = true;"
      oncommand="this.open = true;"
      buttonstyle="pictures"
      state="inactive"
      type="menu"
      rulesetsApplied="0">

      <menupopup id="https-everywhere-context" onpopupshowing="show_applicable_list(this)">
        <!-- entries will be written here by ApplicableList.populate_menu() -->
        <menuseparator class="hide-on-disable"/>
        <menuitem label="&https-everywhere.prefs.reset_defaults;"
          command="https-everywhere-menuitem-resetToDefaults" class="hide-on-disable"/>
        <menuitem label="&https-everywhere.menu.viewAllRules;"
          command="https-everywhere-menuitem-viewAllRules" class="hide-on-disable" />
        <menuitem type="checkbox" id="http-nowhere-item" label="&https-everywhere.menu.blockUnencryptedRequests;" 
          oncommand="httpsEverywhere.toolbarButton.toggleHttpNowhere()" class="hide-on-disable"/>
        <menuseparator class="hide-on-disable"/>
        <menuitem type="checkbox" id="https-everywhere-counter-item" label="&https-everywhere.menu.showCounter;" 
          oncommand="httpsEverywhere.toolbarButton.toggleShowCounter()" class="hide-on-disable"/>
        <menuseparator />
        <menuitem label="&https-everywhere.menu.donate_eff_imperative;" command="https-everywhere-menuitem-donate-eff-imperative" />
        <menuitem label="&https-everywhere.menu.observatory;" command="https-everywhere-menuitem-observatory" />
        <menuitem label="&https-everywhere.menu.about;" command="https-everywhere-menuitem-about" />
      </menupopup>
    </toolbarbutton>
  </toolbarpalette>
  <commandset>
    <command id="https-everywhere-menuitem-rule-toggle-template"
      oncommand="toggle_rule(event.target.attributes['data-id'].value)" />
    <command id="https-everywhere-menuitem-resetToDefaults"
      oncommand="httpsEverywhere.toolbarButton.resetToDefaults()" />
    <command id="https-everywhere-menuitem-globalEnableToggle"
      oncommand="toggleEnabledState();" />
    <command id="https-everywhere-menuitem-viewAllRules"
      oncommand="open_in_tab('https://www.eff.org/https-everywhere/atlas/');" />
    <command id="https-everywhere-menuitem-donate-eff-imperative"
      oncommand="open_in_tab('https://supporters.eff.org/donate/support-https-everywhere');" />
    <command id="https-everywhere-menuitem-about"
      oncommand="httpse_chrome_opener('chrome://https-everywhere/content/about.xul');" />
    <command id="https-everywhere-menuitem-observatory"
      oncommand="httpse_chrome_opener('chrome://https-everywhere/content/observatory-preferences.xul', 'chrome,centerscreen,resizable=yes');" />
    <command id="https-everywhere-menuitem-donate-eff"
      oncommand="open_in_tab('https://supporters.eff.org/donate/support-https-everywhere');" />
    <command id="https-everywhere-menuitem-donate-tor"
      oncommand="open_in_tab('https://www.torproject.org/donate');" />
    <command id="https-everywhere-menuitem-ruleset-tests"
      oncommand="openStatus();" />
  </commandset>
</overlay>