@@ -114,7 +114,7 @@ browser.runtime.onMessage.addListener((aMessage, aSender) => {
114
114
showInContent : configs . showProgress
115
115
} ) ;
116
116
if ( gLastContextTab == aSender . tab . id )
117
- browser . contextMenus . update ( 'waiting' , {
117
+ browser . menus . update ( 'waiting' , {
118
118
title : browser . i18n . getMessage ( `menu_waiting_label` , [ progress ] )
119
119
} ) ;
120
120
}
@@ -156,7 +156,7 @@ const MENU_ITEMS = [
156
156
var gLastContextTab = 0 ;
157
157
158
158
async function initContextMenuForWaiting ( aTabId ) {
159
- browser . contextMenus . removeAll ( ) ;
159
+ browser . menus . removeAll ( ) ;
160
160
161
161
var count = 0 ;
162
162
for ( let id of MENU_ITEMS ) {
@@ -171,7 +171,7 @@ async function initContextMenuForWaiting(aTabId) {
171
171
var progress = await browser . tabs . sendMessage ( aTabId , {
172
172
type : kCOMMAND_FETCH_MATCH_ALL_PROGRESS
173
173
} ) ;
174
- browser . contextMenus . create ( {
174
+ browser . menus . create ( {
175
175
id : 'waiting' ,
176
176
title : browser . i18n . getMessage ( `menu_waiting_label` , [ progress || 0 ] ) ,
177
177
enabled : false ,
@@ -180,7 +180,7 @@ async function initContextMenuForWaiting(aTabId) {
180
180
}
181
181
182
182
function initContextMenuForURIs ( aURIs ) {
183
- browser . contextMenus . removeAll ( ) ;
183
+ browser . menus . removeAll ( ) ;
184
184
if ( aURIs . length == 0 )
185
185
return ;
186
186
@@ -200,7 +200,7 @@ function initContextMenuForURIs(aURIs) {
200
200
201
201
var parentId = null ;
202
202
if ( visibleCount > 1 ) {
203
- browser . contextMenus . create ( {
203
+ browser . menus . create ( {
204
204
id : 'group' ,
205
205
title : browser . i18n . getMessage ( `menu.group.${ type } ` , [ aURIs . length , first , last ] ) ,
206
206
contexts : [ 'selection' ]
@@ -214,7 +214,7 @@ function initContextMenuForURIs(aURIs) {
214
214
let title = browser . i18n . getMessage ( `menu.${ id } .${ type } ` ) ;
215
215
if ( visibleCount == 1 )
216
216
title = browser . i18n . getMessage ( `menu.direct.${ type } ` , [ title , first , last ] ) ;
217
- browser . contextMenus . create ( {
217
+ browser . menus . create ( {
218
218
id, title, parentId,
219
219
contexts : [ 'selection' ]
220
220
} ) ;
@@ -227,7 +227,7 @@ function getShortURIString(aURI) {
227
227
return aURI ;
228
228
}
229
229
230
- browser . contextMenus . onClicked . addListener ( ( aInfo , aTab ) => {
230
+ browser . menus . onClicked . addListener ( ( aInfo , aTab ) => {
231
231
switch ( aInfo . menuItemId ) {
232
232
case 'openCurrent' :
233
233
browser . tabs . sendMessage ( aTab . id , {
0 commit comments