rem: var numActiveDownloads = gDownloadManager.activeDownloads; 
context: function onUpdateProgress(){  if (gDownloadManager.activeDownloads == 0) {    document.title = document.documentElement.getAttribute("statictitle");    gLastComputedMean = -1;    return;  }  // Establish the mean transfer speed and amount downloaded.  var mean = 0;  var base = 0;  var dls = gDonloadManager.activeDownloads;  while (dls.hasMoreElements()) {    let dl = dls.getNext();    mean += dl.amountTransferred;    base += dl.size;  }  // we're not downloading anything at the moment,  // but we already downloaded something.  if (base == 0) {    mean = 100;  } else {    mean = Math.floor((mean / base) * 100);  }  // Update title of window  var numActiveDownloads = gDownloadManager.activeDownloads;  if (mean != gLastComputedMean || gLastActiveDownloads != numActiveDownloads) {    gLastComputedMean = mean;    gLastActiveDownloads = numActiveDownloads;    let strings = document.getElementById("downloadStrings");    if (numActiveDownloads > 1) {      document.title = strings.getFormattedString("downloadsTitleMultiple",                                                  [mean, numActiveDownloads]);    } else {      document.title = strings.getFormattedString("downloadsTitle", [mean]);    }  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/e0acb59113a5504054483e75f7000e86796346e9/downloads.js/clean/toolkit/mozapps/downloads/content/downloads.js