1. /* global chrome */
    
  2. 
    
  3. 'use strict';
    
  4. 
    
  5. function setExtensionIconAndPopup(reactBuildType, tabId) {
    
  6.   const action = __IS_FIREFOX__ ? chrome.browserAction : chrome.action;
    
  7. 
    
  8.   action.setIcon({
    
  9.     tabId,
    
  10.     path: {
    
  11.       '16': chrome.runtime.getURL(`icons/16-${reactBuildType}.png`),
    
  12.       '32': chrome.runtime.getURL(`icons/32-${reactBuildType}.png`),
    
  13.       '48': chrome.runtime.getURL(`icons/48-${reactBuildType}.png`),
    
  14.       '128': chrome.runtime.getURL(`icons/128-${reactBuildType}.png`),
    
  15.     },
    
  16.   });
    
  17. 
    
  18.   action.setPopup({
    
  19.     tabId,
    
  20.     popup: chrome.runtime.getURL(`popups/${reactBuildType}.html`),
    
  21.   });
    
  22. }
    
  23. 
    
  24. export default setExtensionIconAndPopup;