onupdate.js
/**
* Removes closed tabs from settings.
* @param {object} settings
*/
Removes closed tabs from settings.
Removes closed tabs from settings .
function resetSettingsTabs(settings) {
  browser.tabs.query({})
    .then(function(tabs){
      settings.tabs.forEach(function(v, k) {
        if (tabs.find(function(elm){ return elm.id == k }) == undefined) {
          settings.tabs.delete(k);
        }
      });
      browser.storage.local.set({ tabs: settings.tabs });
    });
}
function resetSettingsTabs ( settings ) { browser . tabs . query ( { } ) . then ( function ( tabs ) { settings . tabs . forEach ( function ( v , k ) { if ( tabs . find ( function ( elm ) { return elm . id == k } ) == undefined ) { settings . tabs . delete ( k ) ; } } ) ; browser . storage . local . set ( { tabs : settings . tabs } ) ; } ) ; }
Removes closed tabs from settings.
Removes closed tabs from settings .