@@ -246,24 +246,23 @@ const messageHandler = {
246246 const count = await browser . storage . local . get ( { [ key ] : 0 } ) ;
247247 const countOfContainerTabsOpened = ++ count [ key ] ;
248248 browser . storage . local . set ( { [ key ] : countOfContainerTabsOpened } ) ;
249-
250249 // When the user opens their _ tab, give them the achievement
251250 if ( countOfContainerTabsOpened === 100 ) {
252251 const storage = await browser . storage . local . get ( { achievements : [ ] } ) ;
253252 storage . achievements . push ( { "name" : "manyContainersOpened" , "done" : false } ) ;
254253 // use set and spread to create a unique array
255254 const achievements = [ ...new Set ( storage . achievements ) ] ;
256255 browser . storage . local . set ( { achievements} ) ;
257- browser . browserAction . setBadgeBackgroundColor ( { color : "rgba(0,217,0,255)" } ) ;
258- browser . browserAction . setBadgeText ( { text : "NEW" } ) ;
256+ browser . action . setBadgeBackgroundColor ( { color : "rgba(0,217,0,255)" } ) ;
257+ browser . action . setBadgeText ( { text : "NEW" } ) ;
259258 }
260259
261260 this . maybePrepareSurveyAchievementOnUpdate ( countOfContainerTabsOpened ) ;
262261 } ,
263262
264263 async onFocusChangedCallback ( windowId ) {
265264 assignManager . removeContextMenu ( ) ;
266- // browserAction loses background color in new windows ...
265+ // Action loses background color in new windows ...
267266 // https://bugzil.la/1314674
268267 // https://github.com/mozilla/testpilot-containers/issues/608
269268 // ... so re-call displayBrowserActionBadge on window changes
@@ -300,8 +299,8 @@ const messageHandler = {
300299 // Ensure the achievement exists and is pending.
301300 achievements . push ( { name : "surveyFinal" , done : false } ) ;
302301 browser . storage . local . set ( { achievements } ) ;
303- browser . browserAction . setBadgeBackgroundColor ( { color : "rgba(0,217,0,255)" } ) ;
304- browser . browserAction . setBadgeText ( { text : "NEW" } ) ;
302+ browser . action . setBadgeBackgroundColor ( { color : "rgba(0,217,0,255)" } ) ;
303+ browser . action . setBadgeText ( { text : "NEW" } ) ;
305304 } ,
306305} ;
307306
0 commit comments