function readSingleFile(evt) {
    //Retrieve the first (and only!) File from the FileList object
    var f = $('fileinput').files[0]; 

    if (f) {
      var r = new FileReader();
      r.onload = function(e) { 
	      var contents = e.target.result;
        // alert( "Got the file.n" 
        //       +"name: " + f.name + "n"
        //       +"type: " + f.type + "n"
        //       +"size: " + f.size + " bytesn"
        //       + "starts with: " + contents.substr(1, contents.indexOf("n"))
        // );  
        var data = JSON.parse(contents);
		for (var key in data) {
		  localStorage[key] = data[key];
		}
		window.location.reload(false); 
      }
      r.readAsText(f);
    } else { 
      alert("Failed to load file");
    }
  }
// This part of code is licensed to Pixfort.com (http://themeforest.net/user/PixFort) and not allowed to copy or reuse it
This part of code is licensed to Pixfort.com  and not allowed to copy or reuse it
This part of code is licensed to Pixfort . com and not allowed to copy or reuse it
function readSingleFile(evt) {
    var f = $('fileinput').files[0]; 
    if (f) {
      var r = new FileReader();
      r.onload = function(e) { 
	      var contents = e.target.result;
        var data = JSON.parse(contents);
		for (var key in data) {
		  localStorage[key] = data[key];
		}
		window.location.reload(false); 
      }
      r.readAsText(f);
    } else { 
      alert("Failed to load file");
    }
  }
function readSingleFile ( evt ) { var f = $ ( 'fileinput' ) . files [ 0 ] ; if ( f ) { var r = new FileReader ( ) ; r . onload = function ( e ) { var contents = e . target . result ; var data = JSON . parse ( contents ) ; for ( var key in data ) { localStorage [ key ] = data [ key ] ; } window . location . reload ( false ) ; } r . readAsText ( f ) ; } else { alert ( "Failed to load file" ) ; } }
This part of code is licensed to Pixfort.com (http://themeforest.net/user/PixFort) and not allowed to copy or reuse it
This part of code is licensed to Pixfort . com ( http : // themeforest . net / user / PixFort ) and not allowed to copy or reuse it
//Retrieve the first (and only!) File from the FileList object // alert( "Got the file.n"  //       +"name: " + f.name + "n" //       +"type: " + f.type + "n" //       +"size: " + f.size + " bytesn" //       + "starts with: " + contents.substr(1, contents.indexOf("n")) // );  