summaryrefslogtreecommitdiff
path: root/data/extensions/spyblock@gnu.org/chrome/content/ui/sidebar.xul
blob: 208389ded2ea6079fbb381a15392e88d2b9e04b5 (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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0"?>

<!--
  - This file is part of Adblock Plus <https://adblockplus.org/>,
  - Copyright (C) 2006-2015 Eyeo GmbH
  -
  - Adblock Plus is free software: you can redistribute it and/or modify
  - it under the terms of the GNU General Public License version 3 as
  - published by the Free Software Foundation.
  -
  - Adblock Plus is distributed in the hope that it will be useful,
  - but WITHOUT ANY WARRANTY; without even the implied warranty of
  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  - GNU General Public License for more details.
  -
  - You should have received a copy of the GNU General Public License
  - along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>.
  -->

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://adblockplus/skin/sidebar.css" type="text/css"?>

<!DOCTYPE page SYSTEM "chrome://adblockplus/locale/sidebar.dtd">

<page
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  id="abp-sidebar"
  onload="init()"
  onunload="cleanUp()"
  docDomainThirdParty="&docDomain.thirdParty;"
  docDomainFirstParty="&docDomain.firstParty;">

  <script type="application/x-javascript;version=1.7" src="utils.js"/>
  <script type="application/x-javascript;version=1.7" src="sidebar.js"/>
  <script type="application/x-javascript;version=1.7" src="flasher.js"/>

  <keyset id="sidebarKeys">
    <key id="block-key" keycode="VK_ENTER"/>
    <key id="copy-key" modifiers="accel" key="C" command="copy-command"/>
    <key id="selectAll-key" modifiers="accel" key="A" command="selectAll-command"/>
  </keyset>

  <commandset id="sidebarCommands">
    <command id="copy-command" oncommand="copyToClipboard()" disabled="true"/>
    <command id="selectAll-command" oncommand="selectAll()"/>
  </commandset>

  <popupset id="sidebarPopups">
    <tooltip id="tooltip" orient="vertical" onpopupshowing="fillInTooltip(event);">
      <description id="tooltipDummy"/>
      <hbox id="tooltipPreviewBox" pack="start">
        <image id="tooltipPreview" validate="never"/>
      </hbox>
      <grid>
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        <rows>
          <row id="tooltipAddressRow" align="top">
            <label value="&tooltip.address.label;"/>
            <vbox id="tooltipAddress"/>
          </row>
          <row id="tooltipTypeRow">
            <label value="&tooltip.type.label;"/>
            <description id="tooltipType" filtered="&tooltip.type.blocked;" whitelisted="&tooltip.type.whitelisted;"/>
          </row>
          <row id="tooltipSizeRow">
            <label value="&tooltip.size.label;"/>
            <description id="tooltipSize"/>
          </row>
          <row id="tooltipDocDomainRow">
            <label value="&tooltip.docDomain.label;"/>
            <description id="tooltipDocDomain"/>
          </row>
          <row id="tooltipFilterRow" align="top">
            <label value="&tooltip.filter.label;"/>
            <vbox id="tooltipFilter" disabledText="&tooltip.filter.disabled;"/>
          </row>
          <row id="tooltipFilterSourceRow" align="top">
            <label value="&tooltip.filterSource.label;"/>
            <vbox id="tooltipFilterSource"/>
          </row>
        </rows>
      </grid>
    </tooltip>

    <menupopup id="context" onpopupshowing="return fillInContext(event)">
      <menuitem id="contextBlock" label="&context.block.label;…" oncommand="doBlock()" key="block-key"/>
      <menuitem id="contextWhitelist" label="&context.whitelist.label;…" oncommand="doBlock()" key="block-key"/>
      <menuitem id="contextEditFilter" label="&context.editfilter.label;…" oncommand="editFilter()"/>
      <menuitem id="contextDisableFilter" labeltempl="&context.disablefilter.label;" oncommand="enableFilter(treeView.getSelectedItem().filter, false)"/>
      <menuitem id="contextEnableFilter" labeltempl="&context.enablefilter.label;" oncommand="enableFilter(treeView.getSelectedItem().filter, true)"/>
      <menuitem id="contextDisableOnSite" labeltempl="&context.disablefilteronsite.label;" oncommand="disableOnSite()"/>
      <menuseparator id="contextOpenSep"/>
      <menuitem id="contextOpen" label="&context.open.label;" oncommand="openInTab(null, event)"/>
      <menuitem id="contextFlash" label="&context.flash.label;" oncommand="onSelectionChange()"/>
      <menuitem id="contextCopy" label="&context.copy.label;" command="copy-command" key="copy-key"/>
      <menuitem id="contextCopyFilter" label="&context.copyFilter.label;" oncommand="copyFilter()"/>
      <menuseparator id="contextSelectSep"/>
      <menuitem id="contextSelectAll" label="&context.selectAll.label;" command="selectAll-command" key="selectAll-key"/>
    </menupopup>
  </popupset>

  <hbox>
    <hbox align="center" flex="1">
      <label value="&search.label;" control="searchField"/>
      <textbox id="searchField" flex="1" type="search" oncommand="treeView.setFilter(this.value)"/>
    </hbox>
    <description id="detachButton" value="&detach.label;" onclick="detach(true)"/>
    <description id="reattachButton" value="&reattach.label;" onclick="if (this.getAttribute('disabled') != 'true') detach(false)" hidden="true"/>
  </hbox>

  <tree id="list" context="context" flex="1" seltype="multiple" enableColumnDrag="true"
        defaultSort="state descending" persist="defaultSort"
        onkeypress="if (event.keyCode == event.DOM_VK_RETURN || event.keyCode == event.DOM_VK_ENTER) doBlock()">
    <treecols>
      <treecol id="address" label="&address.label;" flex="2" crop="center" persist="width ordinal sortDirection hidden"/>
      <splitter class="tree-splitter"/>
      <treecol id="filter" label="&filter.label;" flex="1" persist="width ordinal sortDirection hidden"/>
      <splitter class="tree-splitter"/>
      <treecol id="type" label="&type.label;" width="80" persist="width ordinal sortDirection hidden"/>
      <splitter class="tree-splitter"/>
      <treecol id="state" label="&state.label;" width="16" persist="width ordinal sortDirection hidden"/>
      <splitter class="tree-splitter"/>
      <treecol id="size" label="&size.label;" width="60" hidden="true" persist="width ordinal sortDirection hidden"/>
      <splitter class="tree-splitter"/>
      <treecol id="docDomain" label="&docDomain.label;" width="100" hidden="true" persist="width ordinal sortDirection hidden"/>
      <splitter class="tree-splitter"/>
      <treecol id="filterSource" label="&filterSource.label;" width="100" hidden="true" persist="width ordinal sortDirection hidden"/>
    </treecols>
    <treechildren id="treechildren"
                  tooltip="tooltip"
                  onclick="handleClick(event)"
                  ondblclick="handleDblClick(event)"
                  noitemslabel="&noitems.label;"
                  whitelistedlabel="&whitelisted.label;"/>
  </tree>
</page>