Permalink
Browse files

bugfix

  • Loading branch information...
johnkpaul committed Aug 1, 2011
1 parent 0d680cc commit bf499ed98d330e16a1ab79c638d2e6c0c13e3c44
Showing with 8 additions and 8 deletions.
  1. +7 −7 background.html
  2. +1 −1 js/nicePerformance/nice.js
View
@@ -1,14 +1,14 @@
<html>
<script>
function addToStore(performance){
+ try{
var currentPerformance = JSON.parse(localStorage["currentPerformance"]);
- if(currentPerformance == null){
- localStorage["currentPerformance"] = JSON.stringify([performance]);
- }
- else{
- currentPerformance.push(performance);
- localStorage["currentPerformance"] = JSON.stringify(performance);
- }
+ }
+ catch(e){
+ currentPerformance = []
+ }
+ currentPerformance.push(performance);
+ localStorage["currentPerformance"] = JSON.stringify(currentPerformance);
}
chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
@@ -64,7 +64,7 @@
NICE.callbacks[i](NICE.performance);
}
}
- setTimeout(whenLoaded, 6000);
+ setTimeout(whenLoaded, 1000);
}
NICE.init();

0 comments on commit bf499ed

Please sign in to comment.