@@ -114,7 +114,7 @@ browser.runtime.onMessage.addListener((aMessage, aSender) => {
114114 showInContent : configs . showProgress
115115 } ) ;
116116 if ( gLastContextTab == aSender . tab . id )
117- browser . contextMenus . update ( 'waiting' , {
117+ browser . menus . update ( 'waiting' , {
118118 title : browser . i18n . getMessage ( `menu_waiting_label` , [ progress ] )
119119 } ) ;
120120 }
@@ -156,7 +156,7 @@ const MENU_ITEMS = [
156156var gLastContextTab = 0 ;
157157
158158async function initContextMenuForWaiting ( aTabId ) {
159- browser . contextMenus . removeAll ( ) ;
159+ browser . menus . removeAll ( ) ;
160160
161161 var count = 0 ;
162162 for ( let id of MENU_ITEMS ) {
@@ -171,7 +171,7 @@ async function initContextMenuForWaiting(aTabId) {
171171 var progress = await browser . tabs . sendMessage ( aTabId , {
172172 type : kCOMMAND_FETCH_MATCH_ALL_PROGRESS
173173 } ) ;
174- browser . contextMenus . create ( {
174+ browser . menus . create ( {
175175 id : 'waiting' ,
176176 title : browser . i18n . getMessage ( `menu_waiting_label` , [ progress || 0 ] ) ,
177177 enabled : false ,
@@ -180,7 +180,7 @@ async function initContextMenuForWaiting(aTabId) {
180180}
181181
182182function initContextMenuForURIs ( aURIs ) {
183- browser . contextMenus . removeAll ( ) ;
183+ browser . menus . removeAll ( ) ;
184184 if ( aURIs . length == 0 )
185185 return ;
186186
@@ -200,7 +200,7 @@ function initContextMenuForURIs(aURIs) {
200200
201201 var parentId = null ;
202202 if ( visibleCount > 1 ) {
203- browser . contextMenus . create ( {
203+ browser . menus . create ( {
204204 id : 'group' ,
205205 title : browser . i18n . getMessage ( `menu.group.${ type } ` , [ aURIs . length , first , last ] ) ,
206206 contexts : [ 'selection' ]
@@ -214,7 +214,7 @@ function initContextMenuForURIs(aURIs) {
214214 let title = browser . i18n . getMessage ( `menu.${ id } .${ type } ` ) ;
215215 if ( visibleCount == 1 )
216216 title = browser . i18n . getMessage ( `menu.direct.${ type } ` , [ title , first , last ] ) ;
217- browser . contextMenus . create ( {
217+ browser . menus . create ( {
218218 id, title, parentId,
219219 contexts : [ 'selection' ]
220220 } ) ;
@@ -227,7 +227,7 @@ function getShortURIString(aURI) {
227227 return aURI ;
228228}
229229
230- browser . contextMenus . onClicked . addListener ( ( aInfo , aTab ) => {
230+ browser . menus . onClicked . addListener ( ( aInfo , aTab ) => {
231231 switch ( aInfo . menuItemId ) {
232232 case 'openCurrent' :
233233 browser . tabs . sendMessage ( aTab . id , {
0 commit comments