2
<!-- The contents of this file are subject to the Netscape Public
3
- License Version 1.1 (the "License"); you may not use this file
4
- except in compliance with the License. You may obtain a copy of
5
- the License at http://www.mozilla.org/NPL/
7
- Software distributed under the License is distributed on an "AS
8
- IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
- implied. See the License for the specific language governing
10
- rights and limitations under the License.
12
- The Original Code is Mozilla Communicator client code, released
15
- The Initial Developer of the Original Code is Netscape
16
- Communications Corporation. Portions created by Netscape are
17
- Copyright (C) 1998-1999 Netscape Communications Corporation. All
21
- Blake Ross <blakeross@telocity.com>
23
<!DOCTYPE overlay SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
24
<overlay id="contentAreaContextOverlay"
25
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
28
<!-- XXX: Replace strres.js when nsContextMenu.js is converted -->
29
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
30
<script type="application/x-javascript">
31
// Global variable that holds the nsContextMenu instance.
32
var gContextMenu = null;
34
// Global variable that caches the default search engine info
35
var gDefaultEngine = null;
37
<script type="application/x-javascript" src="chrome://communicator/content/nsContextMenu.js"/>
38
<script type="application/x-javascript" src="chrome://communicator/content/RealTimeSpell.js"/>
39
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
41
<popupset id="contentAreaContextSet">
42
<!-- This is a generic context menu for a content area. It contains
43
each and every possible menu choice. The appropriate items are
44
hidden/shown upon display, based on what the user has clicked-on.
46
<popup id="contentAreaContextMenu"
47
onpopupshowing="if (event.target != this) return true; gContextMenu = new nsContextMenu( this ); return gContextMenu.shouldDisplay;"
48
onpopuphiding="if (event.target == this) gContextMenu = null;">
49
<menuitem id="popupwindow-reject"
50
label="&popupWindowRejectCmd.label;"
51
accesskey="&popupWindowRejectCmd.accesskey;"
52
oncommand="gContextMenu.rejectPopupWindows(event.shiftKey);"/>
53
<menuitem id="popupwindow-allow"
54
label="&popupWindowAllowCmd.label;"
55
accesskey="&popupWindowAllowCmd.accesskey;"
56
oncommand="gContextMenu.allowPopupWindows();"/>
57
<menuseparator id="context-sep-popup"/>
59
<menuitem id="context-openlink"
60
label="&openLinkCmd.label;"
61
accesskey="&openLinkCmd.accesskey;"
62
oncommand="gContextMenu.openLink();"/>
63
<menuitem id="context-openlinkintab"
64
label="&openLinkCmdInTab.label;"
65
accesskey="&openLinkCmdInTab.accesskey;"
66
oncommand="gContextMenu.openLinkInTab();"/>
67
<menuseparator id="context-sep-open"/>
68
<menuitem id="context-bookmarklink"
69
label="&bookmarkLinkCmd.label;"
70
accesskey="&bookmarkLinkCmd.accesskey;"
71
oncommand="BookmarksUtils.addBookmark(gContextMenu.linkURL(),
72
gContextMenu.linkText(),
74
<menuitem id="context-savelink"
75
label="&saveLinkCmd.label;"
76
accesskey="&saveLinkCmd.accesskey;"
77
oncommand="gContextMenu.saveLink();"/>
78
<menuitem id="context-copyemail"
79
label="©EmailCmd.label;"
80
accesskey="©EmailCmd.accesskey;"
81
oncommand="gContextMenu.copyEmail();"/>
82
<menuitem id="context-copylink"
83
label="©LinkCmd.label;"
84
accesskey="©LinkCmd.accesskey;"
85
command="cmd_copyLink"/>
86
<menuseparator id="context-sep-copylink"/>
87
<menuitem id="context-fitimage"
89
label="&fitImageCmd.label;"
90
accesskey="&fitImageCmd.accesskey;"
91
oncommand="gContextMenu.toggleImageSize();"/>
92
<menuitem id="context-viewimage"
93
label="&viewImageCmd.label;"
94
accesskey="&viewImageCmd.accesskey;"
95
oncommand="gContextMenu.viewImage();"/>
96
<menuitem id="context-copyimage"
97
label="©ImageCmd.label;"
98
accesskey="©ImageCmd.accesskey;"
99
command="cmd_copyImageLocation"/>
100
<menuseparator id="context-sep-copyimage"/>
101
<menuitem id="context-saveimage"
102
label="&saveImageCmd.label;"
103
accesskey="&saveImageCmd.accesskey;"
104
oncommand="gContextMenu.saveImage();"/>
105
<menuitem id="context-setWallpaper"
106
label="&setWallpaperCmd.label;"
107
accesskey="&setWallpaperCmd.accesskey;"
108
oncommand="gContextMenu.setWallpaper();"/>
109
<menuseparator id="context-sep-image"/>
110
<menuitem id="context-back"
111
label="&goBackCmd.label;"
112
accesskey="&goBackCmd.accesskey;"
113
oncommand="BrowserBack()"/>
114
<menuitem id="context-forward"
115
label="&goForwardCmd.label;"
116
accesskey="&goForwardCmd.accesskey;"
117
oncommand="BrowserForward()"/>
118
<menuitem id="context-reload"
119
label="&reloadCmd.label;"
120
accesskey="&reloadCmd.accesskey;"
121
oncommand="BrowserReload();"/>
122
<menuitem id="context-stop"
123
label="&stopCmd.label;"
124
accesskey="&stopCmd.accesskey;"
126
oncommand="BrowserStop();"/>
127
<menuseparator id="context-sep-stop"/>
128
<menuitem id="context-bookmarkpage"
129
label="&bookmarkPageCmd.label;"
130
accesskey="&bookmarkPageCmd.accesskey;"
131
oncommand="gContextMenu.addBookmark();"/>
132
<menuitem id="context-savepage"
133
label="&savePageCmd.label;"
134
accesskey="&savePageCmd.accesskey;"
135
oncommand="saveDocument(window._content.document);"/>
136
<menuseparator id="context-sep-viewbgimage"/>
137
<menuitem id="context-viewbgimage"
138
label="&viewBGImageCmd.label;"
139
accesskey="&viewBGImageCmd.accesskey;"
140
oncommand="gContextMenu.viewBGImage();"/>
142
<menu id="context-spellsuggestmenu" label="&spellSuggestions.label;"
143
accesskey="&spellSuggestions.accesskey;">
144
<menupopup id="context-spellsuggestmenupopup"
145
onpopupshowing="RealTimeSpell.updateSuggestionsMenu(this,'context-spellsuggestmenu-add','context-spellsuggestmenu-addsep',null);"
146
oncommand="RealTimeSpell.selectSuggestion(event.target.value);">
147
<menuitem id="context-spellsuggestmenu-add" label="&spellAddToDictionary.label;"
148
oncommand="RealTimeSpell.addToDictionary(null,null);"/>
149
<menuseparator id="context-spellsuggestmenu-addsep"/>
152
<menuseparator id="context-sep-spellsuggestmenu"/>
153
<menuitem id="context-undo"
154
label="&undoCmd.label;"
155
accesskey="&undoCmd.accesskey;"
157
<menuitem id="context-redo"
158
label="&redoCmd.label;"
159
accesskey="&redoCmd.accesskey;"
161
<menuseparator id="context-sep-undo"/>
162
<menuitem id="context-cut"
163
label="&cutCmd.label;"
164
accesskey="&cutCmd.accesskey;"
166
<menuitem id="context-copy"
167
label="©Cmd.label;"
168
accesskey="©Cmd.accesskey;"
170
<menuitem id="context-paste"
171
label="&pasteCmd.label;"
172
accesskey="&pasteCmd.accesskey;"
173
command="cmd_paste"/>
174
<menuitem id="context-delete"
175
label="&deleteCmd.label;"
176
accesskey="&deleteCmd.accesskey;"
177
command="cmd_delete"/>
178
<menuseparator id="context-sep-paste"/>
179
<menuitem id="context-selectall"
180
label="&selectAllCmd.label;"
181
accesskey="&selectAllCmd.accesskey;"
182
command="cmd_selectAll"/>
183
<menuseparator id="context-sep-selectall"/>
184
<menuitem id="context-searchselect"
185
accesskey="&search.accesskey;"
186
oncommand="OpenSearch('internet', false, gContextMenu.searchSelected(), true);"/>
187
<menuseparator id="frame-sep"/>
188
<menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
189
<menupopup id="frame_popup">
190
<menuitem label="&showOnlyThisFrameCmd.label;"
191
accesskey="&showOnlyThisFrameCmd.accesskey;"
192
oncommand="gContextMenu.showOnlyThisFrame();"/>
193
<menuitem label="&openFrameCmd.label;"
194
accesskey="&openFrameCmd.accesskey;"
195
oncommand="gContextMenu.openFrame();"/>
196
<menuitem label="&openFrameCmdInTab.label;"
197
accesskey="&openFrameCmdInTab.accesskey;"
198
oncommand="gContextMenu.openFrameInTab();"/>
200
<menuitem id="context-reload-frame"
201
label="&reloadFrameCmd.label;"
202
accesskey="&reloadFrameCmd.accesskey;"
203
oncommand="gContextMenu.reloadFrame();"/>
205
<menuitem label="&bookmarkFrameCmd.label;"
206
accesskey="&bookmarkFrameCmd.accesskey;"
207
oncommand="gContextMenu.addBookmarkForFrame();"/>
208
<menuitem id="saveframeas"
209
label="&saveFrameCmd.label;"
210
accesskey="&saveFrameCmd.accesskey;"
211
oncommand="saveDocument(gContextMenu.target.ownerDocument);"/>
213
<menuitem label="&viewFrameSourceCmd.label;"
214
accesskey="&viewFrameSourceCmd.accesskey;"
215
oncommand="gContextMenu.viewFrameSource();"/>
216
<menuitem label="&viewFrameInfoCmd.label;"
217
accesskey="&viewFrameInfoCmd.accesskey;"
218
oncommand="gContextMenu.viewFrameInfo();"/>
221
<menuseparator id="context-sep-properties"/>
222
<menuitem id="context-viewpartialsource-selection"
223
label="&viewPartialSourceForSelectionCmd.label;"
224
accesskey="&viewPartialSourceCmd.accesskey;"
225
oncommand="gContextMenu.viewPartialSource('selection');"/>
226
<menuitem id="context-viewpartialsource-mathml"
227
label="&viewPartialSourceForMathMLCmd.label;"
228
accesskey="&viewPartialSourceCmd.accesskey;"
229
oncommand="gContextMenu.viewPartialSource('mathml');"/>
230
<menuitem id="context-viewsource"
231
label="&viewPageSourceCmd.label;"
232
accesskey="&viewPageSourceCmd.accesskey;"
234
oncommand="BrowserViewSourceOfDocument(content.document);"/>
235
<menuitem id="context-viewinfo"
236
label="&viewPageInfoCmd.label;"
237
accesskey="&viewPageInfoCmd.accesskey;"
238
oncommand="gContextMenu.viewInfo();"/>
239
<menuitem id="context-metadata"
240
label="&metadataCmd.label;"
241
accesskey="&metadataCmd.accesskey;"
242
oncommand="gContextMenu.showMetadata();"/>