background/background.js
/* 
  Flush cache to storage if use has been inactive
*/
Flush cache to storage if use has been inactive
Flush cache to storage if use has been inactive
async function detectIdleUser() {
  var now = new Date();
  if (now - _lastUserInteractionTime > 60 * 1000) {
    console.log("User is idle. Flushing cache...");
    await writeCacheToStorage(true);
  } else {
  }
}
async function detectIdleUser ( ) { var now = new Date ( ) ; if ( now - _lastUserInteractionTime > 60 * 1000 ) { console . log ( "User is idle. Flushing cache..." ) ; await writeCacheToStorage ( true ) ; } else { } }
Flush cache to storage if use has been inactive
Flush cache to storage if use has been inactive
//console.log("user is active.")