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
|
/* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* 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/. */
function hiddenWindowStartup() {
// Disable menus which are not appropriate
let disabledItems = [
"menu_newFolder",
"newMailAccountMenuItem",
"newNewsgroupAccountMenuItem",
"menu_close",
"menu_saveAs",
"menu_saveAsFile",
"menu_newVirtualFolder",
"menu_find",
"menu_findCmd",
"menu_findAgainCmd",
"menu_sendunsentmsgs",
"menu_subscribe",
"menu_deleteFolder",
"menu_renameFolder",
"menu_select",
"menu_selectAll",
"menu_selectThread",
"menu_favoriteFolder",
"menu_properties",
"menu_Toolbars",
"menu_MessagePaneLayout",
"menu_showMessage",
"menu_toggleThreadPaneHeader",
"menu_showFolderPane",
"menu_FolderViews",
"viewSortMenu",
"groupBySort",
"viewMessageViewMenu",
"viewMessagesMenu",
"menu_expandAllThreads",
"collapseAllThreads",
"viewheadersmenu",
"viewBodyMenu",
"viewAttachmentsInlineMenuitem",
"viewFullZoomMenu",
"goNextMenu",
"menu_nextMsg",
"menu_nextUnreadMsg",
"menu_nextUnreadThread",
"goPreviousMenu",
"menu_prevMsg",
"menu_prevUnreadMsg",
"menu_goForward",
"menu_goBack",
"goStartPage",
"newMsgCmd",
"replyMainMenu",
"replySenderMainMenu",
"replyNewsgroupMainMenu",
"menu_replyToAll",
"menu_replyToList",
"menu_forwardMsg",
"forwardAsMenu",
"menu_editMsgAsNew",
"openMessageWindowMenuitem",
"openConversationMenuitem",
"moveMenu",
"copyMenu",
"moveToFolderAgain",
"tagMenu",
"markMenu",
"markReadMenuItem",
"menu_markThreadAsRead",
"menu_markReadByDate",
"menu_markAllRead",
"markFlaggedMenuItem",
"menu_markAsJunk",
"menu_markAsNotJunk",
"createFilter",
"killThread",
"killSubthread",
"watchThread",
"applyFilters",
"runJunkControls",
"deleteJunk",
"menu_import",
"searchMailCmd",
"searchAddressesCmd",
"filtersCmd",
"cmd_close",
"minimizeWindow",
"zoomWindow",
"appmenu_newFolder",
"appmenu_newMailAccountMenuItem",
"appmenu_newNewsgroupAccountMenuItem",
"appmenu_saveAs",
"appmenu_saveAsFile",
"appmenu_newVirtualFolder",
"appmenu_findAgainCmd",
"appmenu_favoriteFolder",
"appmenu_properties",
"appmenu_MessagePaneLayout",
"appmenu_showMessage",
"appmenu_toggleThreadPaneHeader",
"appmenu_showFolderPane",
"appmenu_FolderViews",
"appmenu_groupBySort",
"appmenu_findCmd",
"appmenu_find",
"appmenu_openMessageWindowMenuitem",
];
let element;
for (let id of disabledItems) {
element = document.getElementById(id);
if (element) {
element.setAttribute("disabled", "true");
}
}
// Also hide the window-list separator if it exists.
element = document.getElementById("sep-window-list");
if (element) {
element.setAttribute("hidden", "true");
}
}
|