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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
<?xml version="1.0"?>
<!--
- CookieKeeper - a Mozilla add-on
- (c) 2013-2016 Yvon TANGUY
-
- ==================================================================
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
- ==================================================================
- Original code from Mozilla Firefox 24.0
- Main CookieKeeper window.
-->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://cookiekeeper/skin/widgets.css" type="text/css"?>
<?xml-stylesheet href="chrome://cookiekeeper/skin/cookies_window_common.css" type="text/css"?>
<?xml-stylesheet href="chrome://cookiekeeper_os/skin/cookies_window.css" type="text/css"?>
<!DOCTYPE dialog [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % cookieKeeperDTD SYSTEM "chrome://cookiekeeper/locale/cookiekeeper.dtd" >
%brandDTD;
%cookieKeeperDTD;
]>
<window id="cookieKeeperWindow" windowtype="Browser:Cookies"
class="windowDialog" title="&cookiekeeper.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="gCookieKeeper.init();"
onunload="gCookieKeeper.uninit();"
sizemode="normal"
toggletoolbar="true"
persist="width height"
onkeypress="gCookieKeeper.onWindowKeyPress(event);">
<stringbundle id="bundleCookieKeeper" src="chrome://cookiekeeper/locale/cookiekeeper.properties" />
<script type="application/x-javascript">
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/osfile.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Task.jsm");
Components.utils.import("resource://gre/modules/Sqlite.jsm");
Components.utils.import("resource://gre/modules/NetUtil.jsm");
Components.utils.import("resource://gre/modules/FileUtils.jsm");
Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
Components.utils.import("resource://cookiekeeper/cookiekeeper.jsm");
</script>
<script src="chrome://cookiekeeper/content/common.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.permissions.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.test_prefs.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.treeview.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.observer.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.import_export.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.dom_storage.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.cookies.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.local_shared_object.js" type="application/x-javascript" />
<script src="chrome://cookiekeeper/content/ck.main.js" type="application/x-javascript" />
<keyset>
<key key="&windowClose.key;" modifiers="accel" oncommand="window.close();" />
<key key="&focusSearch1.key;" modifiers="accel" oncommand="gCookieKeeper.focusFilterBox();" />
<key key="&focusSearch2.key;" modifiers="accel" oncommand="gCookieKeeper.focusFilterBox();" />
<!-- Access keys for ibuttons do not work, use this workaround -->
<key key="&mainmenu.accesskey;" modifiers="alt" oncommand="var btn=document.getElementById('buttonMainMenu'); btn.focus(); btn.open = true;" />
<key id="keySortCol0" modifiers="alt" key="1" oncommand="gCookieKeeper.onSortByColNumber(0);" />
<key id="keySortCol1" modifiers="alt" key="2" oncommand="gCookieKeeper.onSortByColNumber(1);" />
<key id="keySortCol2" modifiers="alt" key="3" oncommand="gCookieKeeper.onSortByColNumber(2);" />
<key id="keySortCol3" modifiers="alt" key="4" oncommand="gCookieKeeper.onSortByColNumber(3);" />
<key id="keySortCol4" modifiers="alt" key="5" oncommand="gCookieKeeper.onSortByColNumber(4);" />
<key id="keySortCol5" modifiers="alt" key="6" oncommand="gCookieKeeper.onSortByColNumber(5);" />
<key id="keySortCol6" modifiers="alt" key="7" oncommand="gCookieKeeper.onSortByColNumber(6);" />
<key id="keySortCol7" modifiers="alt" key="8" oncommand="gCookieKeeper.onSortByColNumber(7);" />
<key id="keySortCol8" modifiers="alt" key="9" oncommand="gCookieKeeper.onSortByColNumber(8);" />
</keyset>
<popupset>
<menupopup id="menu-popup-cookie-context" onpopupshowing="gCookieKeeper.onShowContextCookieMenu(event);" accessibleType="100F" >
<menu id="mpcc-perms" label="&mpcc.perms;">
<menupopup onpopupshowing="gCookieKeeper.onShowContextCookiePerms();" accessibleType="100F">
<!-- Param values from nsICookiePermission.idl -->
<menuitem id="mpcc-perm-default" label="&mpcc.perm.default;" type="checkbox"
oncommand="gCookieKeeper.onContextMenuPermission(MOZ_COOKIE_PERM_DEFAULT);" accessibleType="100E" />
<menuitem id="mpcc-perm-allow" label="&mpcc.perm.allow;" type="checkbox"
oncommand="gCookieKeeper.onContextMenuPermission(MOZ_COOKIE_PERM_ALLOW);" accessibleType="100E" />
<menuitem id="mpcc-perm-deny" label="&mpcc.perm.deny;" type="checkbox"
oncommand="gCookieKeeper.onContextMenuPermission(MOZ_COOKIE_PERM_DENY);" accessibleType="100E" />
<menuitem id="mpcc-perm-session" label="&mpcc.perm.session;" type="checkbox"
oncommand="gCookieKeeper.onContextMenuPermission(MOZ_COOKIE_PERM_SESSION);" accessibleType="100E" />
<!-- Do not seems to work: -->
<!--
<menuitem id="mpcc-perm-first" label="&mpcc.perm.first;" type="checkbox"
oncommand="gCookieKeeper.onContextMenuPermission(9);" />
<menuitem id="mpcc-perm-third" label="&mpcc.perm.third;" type="checkbox"
oncommand="gCookieKeeper.onContextMenuPermission(10);" />
-->
</menupopup>
</menu>
<menuseparator id="mpcc-sep-perm" accessibleType="1010" />
<menuitem id="mpcc-protect" label="&button.protectcookie.label;"
oncommand="gCookieKeeper.onProtectUnprotectItems(event);" accessibleType="100E" />
<menuitem id="mpcc-edit" label="&button.edit.label;"
oncommand="gCookieKeeper.onShowEditor();" accessibleType="100E" />
<menuitem id="mpcc-delete" label="&mpcc.delete.label;"
oncommand="gCookieKeeper.onDeleteCookie(false);" accessibleType="100E" />
<menuitem id="mpcc-delete-and-block" label="&mpcc.delete_and_block.label;"
oncommand="gCookieKeeper.onDeleteCookie(true);" accessibleType="100E" />
<menuseparator id="mpcc-sep-copy" accessibleType="1010" />
<menuitem id="mpcc-copy-domain" label="&mpcc.copy_domain.label;"
oncommand="gCookieKeeper.onContextMenuCopy('domain');" accessibleType="100E" />
<menuitem id="mpcc-copy-name" label="&mpcc.copy_name.label;"
oncommand="gCookieKeeper.onContextMenuCopy('name');" accessibleType="100E" />
<menuitem id="mpcc-copy-value" label="&mpcc.copy_value.label;"
oncommand="gCookieKeeper.onContextMenuCopy('value');" accessibleType="100E" />
</menupopup>
</popupset>
<vbox flex="1" class="contentPane">
<notificationbox id="notificationBox">
<notification id="notifyBrowserPref" hidden="true" label="&warn_moz_pref.label;"
type="warning" image="chrome://cookiekeeper/skin/warning16.png" accessibleType="1001">
<button id="buttonFixPrefClear" oncommand="gTestMozPrefs.onShowPrefs(event, CK_PREFPANE_BROWSER);" accessibleType="1002"
label="&preferences.label;" tooltiptext="&warn_moz_pref.tooltip;" />
</notification>
</notificationbox>
<hbox id="hboxToolbar" align="center">
<label id="labelFilter" accesskey="&filter.accesskey;" control="textBoxSearch">&filter.label;</label>
<textbox type="search" id="textBoxSearch" flex="1"
aria-label="&filter.label;" accessibleType="101B"
oncommand="gCookieKeeper.onFilter();" />
<ibuttoniconmenu id="buttonMainMenu" accessibleType="1002"
class="tabbable" orient="horizontal" tabIndex="1"
accesskey="&mainmenu.accesskey;" tooltiptext="&mainmenu.tooltiptext;">
<menupopup id="menupopupImportExport" accessibleType="100F" position="bottomright topright">
<menuitem id="menuitemImport" accessibleType="100E"
oncommand="gImportExport.onImport();"
label="&import.label;" accesskey="&import.accesskey;" />
<menuseparator accessibleType="1010" />
<menuitem id="menuitemExportProtList" accessibleType="100E"
oncommand="gImportExport.onExportProtectionList();"
label="&saveprot_list.label;" accesskey="&saveprot_list.accesskey;" />
<menuitem id="menuitemExportPerm" accessibleType="100E"
oncommand="gImportExport.onExportPermissions();"
label="&saveperm_list.label;" accesskey="&saveperm_list.accesskey;" />
<menuseparator accessibleType="1010" />
<menuitem id="menuitemExportProtected" accessibleType="100E"
oncommand="gImportExport.onExportProtected();"
label="&exportprot.label;" accesskey="&exportprot.accesskey;" />
<menuitem id="menuitemExportSelected" accessibleType="100E"
oncommand="gImportExport.onExportSelected();"
label="&exportselected.label;" accesskey="&exportselected.accesskey;" />
<menuitem id="menuitemExportAll" accessibleType="100E"
oncommand="gImportExport.onExportAll();"
label="&exportall.label;" accesskey="&exportall.accesskey;" />
<menuseparator accessibleType="1010"/>
<menuitem id="menuitemPreferences" accessibleType="100E" class="menuitem-iconic"
oncommand="gTestMozPrefs.onShowPrefs(event, null);"
label="&preferences.label;" accesskey="&preferences.accesskey;" />
<menuseparator id="menuseparatorProtectBookmarkedCookies" accessibleType="1010"/>
<menuitem id="menuitemProtectBookmarkedCookies" accessibleType="100E" class="menuitem-iconic"
oncommand="gCookieKeeper.onProtectUnprotectItems(event);"
label="&menuitem.protBCookies.label;" accesskey="&menuitem.protBCookies.accesskey;" />
</menupopup>
</ibuttoniconmenu>
</hbox>
<separator class="thin" />
<hbox>
<label id="labelProtectionFilter" control="value" value="&cookiesonsystem.label;" />
<spacer flex="1" />
<iradiogroup accessibleType="1016" orient="horizontal" class="tabbable">
<iradio id="radioShowAllCookies" accessibleType="1015" selected="true" position="first"
tooltiptext="&filter.all.tooltip;" oncommand="gCookieKeeper.onProtectionFilter('all');" />
<separator class="thin" orient="vertical" style="background-color: ThreeDShadow; max-width: 1px;" />
<iradio id="radioShowProtCookies" accessibleType="1015" position="middle"
tooltiptext="&filter.protected.tooltip;" oncommand="gCookieKeeper.onProtectionFilter('protected');" />
<separator class="thin" orient="vertical" style="background-color: ThreeDShadow; max-width: 1px;" />
<iradio id="radioShowUnprotCookies" accessibleType="1015" position="last"
tooltiptext="&filter.unprotected.tooltip;" oncommand="gCookieKeeper.onProtectionFilter('unprotected');" />
</iradiogroup>
<separator class="thin" orient="vertical" />
</hbox>
<separator class="thin" />
<tree id="cookiesTree" flex="1" accessibleType="101D" seltype="single"
onselect="gCookieKeeper.onItemSelected(event);"
onkeypress="gCookieKeeper.onCookieKeyPress(event)">
<treecols id="cookiesTreeCols" accessibleType="101E">
<treecol id="domainCol" label="&col.domain.label;" flex="3" primary="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.HOST);" persist="width" />
<splitter class="tree-splitter" />
<treecol id="nameCol" label="&col.name.label;" flex="2"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.NAME);" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol id="protectedCol" label="&col.protected.label;" flex="1"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.PROTECTED);" persist="width hidden" />
<!-- Default invisible columns: -->
<splitter class="tree-splitter" />
<treecol id="valueCol" label="&col.value.label;" flex="1" hidden="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.VALUE);" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol id="pathCol" label="&col.path.label;" flex="1" hidden="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.PATH);" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol id="httpCol" label="&col.http.label;" flex="1" hidden="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.HTTP);" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol id="secureCol" label="&col.secure.label;" flex="1" hidden="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.SECURE);" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol id="sessionCol" label="&col.session.label;" flex="1" hidden="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.SESSION);" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol id="expiresCol" label="&col.expires.label;" flex="1" hidden="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.EXPIRES);" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol id="creationCol" label="&col.creation.label;" flex="1" hidden="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.CREATION);" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol id="lastAccessedCol" label="&col.lastaccessed.label;" flex="1" hidden="true"
onclick="gCookieKeeper.onSort(event, SORT_INFOS.LAST_ACCESSED);" persist="width hidden" />
</treecols>
<!-- protected cookie icon with css: use cookieTreeChildrens -->
<treechildren id="cookiesChildren"
context="menu-popup-cookie-context"
oncontextmenu="gCookieKeeper.onContextMenu(event);"
ondblclick="gCookieKeeper.onCookieDBLClick(event);" />
</tree>
<hbox id="itemInfoBox">
<deck id="itemDeck" flex="1">
<grid flex="1" id="cookieInfoGrid">
<columns>
<column/>
<column flex="1" />
</columns>
<rows>
<row align="center">
<hbox pack="end"><label id="labelCookieDomain" control="tbCookieHost" value="&props.domain.label;" /></hbox>
<textbox id="tbCookieHost" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelCookiePath" control="tbCookiePath" value="&props.path.label;" /></hbox>
<textbox id="tbCookiePath" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelCookieIsSecure" control="tbCookieIsSecure" value="&props.secure.label;" /></hbox>
<textbox id="tbCookieIsSecure" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelCookieExpires" control="tbCookieExpires" value="&props.expires.label;" /></hbox>
<textbox id="tbCookieExpires" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelCookieIsProtected" control="tbCookieIsProtected" value="&props.protected.label;" /></hbox>
<hbox>
<image id="imgCookieIsProtectedWarnSession" hidden="true"
src="chrome://cookiekeeper/skin/warning16.png" tooltiptext="&img.sess_cookie_prot.tooltip;" />
<textbox id="tbCookieIsProtected" readonly="true" class="plain" accessibleType="101B" />
</hbox>
</row>
<row align="center">
<hbox pack="end"><label id="labelCookieName" control="tbCookieName" value="&props.name.label;" /></hbox>
<textbox id="tbCookieName" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelCookieValue" control="tbCookieValue" value="&props.value.label;" /></hbox>
<textbox id="tbCookieValue" readonly="true" class="plain" accessibleType="101B" />
</row>
</rows>
</grid>
<grid flex="1" id="domStorageInfoGrid">
<columns>
<column/>
<column flex="1" />
</columns>
<rows>
<row align="center">
<hbox pack="end"><label id="labelDomHost" control="tbDomHost" value="&props.domain.label;" /></hbox>
<textbox id="tbDomHost" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelDomPort" control="tbDomPort" value="&props.port.label;" /></hbox>
<textbox id="tbDomPort" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelDomProtocol" control="tbDomProtocol" value="&props.protocol.label;" /></hbox>
<textbox id="tbDomProtocol" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelDomIsProtected" control="tbDomIsProtected" value="&props.protected.label;" /></hbox>
<textbox id="tbDomIsProtected" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelDomKey" control="tbDomKey" value="&props.name.label;" /></hbox>
<textbox id="tbDomKey" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center" flex="1">
<hbox pack="end"><label id="labelDomValue" control="tbDomValue" value="&props.value.label;" /></hbox>
<hbox pack="center">
<textbox id="tbDomValue" readonly="true" flex="1" class="plain" accessibleType="101B" />
<ibuttonicon id="btnShowValue" hidden="false" accessibleType="1002" tooltiptext="&button.show_more.tooltip;"
image="chrome://cookiekeeper/skin/more16.png"
oncommand="gCookieKeeper.onShowDomViewer();" />
</hbox>
</row>
</rows>
</grid>
<grid flex="1" id="localSharedObjectGrid">
<columns>
<column/>
<column flex="1" />
</columns>
<rows>
<row align="center">
<hbox pack="end"><label id="labelLSODomain" control="tbLSOHost" value="&props.domain.label;" /></hbox>
<textbox id="tbLSOHost" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelLSOName" control="tbLSOName" value="&props.name.label;" /></hbox>
<textbox id="tbLSOName" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelLSOPath" control="tbLSOPath" value="&props.path.label;" /></hbox>
<textbox id="tbLSOPath" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelLSOFileSize" control="tbLSOFileSize" value="&props.filesize.label;" /></hbox>
<textbox id="tbLSOFileSize" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelLSOCreationDate" control="tbLSOCreationDate" value="&props.creation_date.label;" /></hbox>
<textbox id="tbLSOCreationDate" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelLSOProtected" control="tbLSOProtected" value="&props.protected.label;" /></hbox>
<textbox id="tbLSOProtected" readonly="true" class="plain" accessibleType="101B" />
</row>
<row align="center">
<hbox pack="end"><label id="labelLSOSettings" control="tbLSOSettings" value="&props.settings.label;" /></hbox>
<textbox id="tbLSOSettings" readonly="true" class="plain" accessibleType="101B" />
</row>
</rows>
</grid>
</deck>
</hbox>
</vbox>
<hbox align="end">
<hbox class="actionButtons" flex="1">
<deck oncommand="gCookieKeeper.onDeleteCookie(false);">
<button id="removeCookie" disabled="true" icon="remove" accessibleType="1002"
label="&button.removecookie.label;"
accesskey="&button.removecookie.accesskey;" />
<button id="removeCookies" disabled="true" icon="remove" accessibleType="1002"
label="&button.removecookies.label;"
accesskey="&button.removecookie.accesskey;" />
</deck>
<button id="removeAllCookies" disabled="true" icon="clear" accessibleType="1002"
label="&button.removeallcookies.label;" accesskey="&button.removeallcookies.accesskey;"
oncommand="gCookieKeeper.onDeleteAllCookies();" />
<deck oncommand="gCookieKeeper.onProtectUnprotectItems(event);">
<button id="buttonProtectCookie" disabled="false" accessibleType="1002"
label="&button.protectcookie.label;"
accesskey="&button.protectcookie.accesskey;" />
<button id="buttonUnprotectCookie" disabled="true" accessibleType="1002"
label="&button.unprotectcookie.label;"
accesskey="&button.unprotectcookie.accesskey;" />
</deck>
<deck oncommand="gCookieKeeper.onShowEditor();">
<button id="buttonEdit" accessibleType="1002"
label="&button.edit.label;" accesskey="&button.edit.accesskey;" />
<button id="buttonView" accessibleType="1002"
label="&button.view.label;" accesskey="&button.view.accesskey;" />
</deck>
<spacer flex="1" />
<button oncommand="close();" icon="close" accessibleType="1002"
label="&button.close.label;" accesskey="&button.close.accesskey;" />
</hbox>
<resizer type="window" dir="bottomend" />
</hbox>
</window>
|