Skip to content

Commit

Permalink
settings: spell out password type
Browse files Browse the repository at this point in the history
  • Loading branch information
ttyridal committed Mar 25, 2015
1 parent feac05b commit 786d928
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions ext/data/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ <h2>Stored sites:</h2>
document.documentElement.dispatchEvent(event);
}

function stored_sites_table_append(domain,site,type,count,ver) {
switch(type) {
case 'x': type="Maximum"; break;
case 'l': type="Long"; break;
case 'm': type="Medium"; break;
case 'b': type="Basic"; break;
case 's': type="Short"; break;
case 'i': type="Pin"; break;
case 'n': type="Name"; break;
case 'p': type="Phrase"; break;
default: throw "Logic error";
}
$('#stored_sites').append('<tr><td>'+site+'<td><input class="domainvalue" type="text" data-old="'+
domain+'" value="'+domain+'"><td>'+count+'<td>'+type+'<td>'+ver+
'<td><img class="delete" src="delete.png">');
}

function read_mpsites(d){
var ret=[],l,fheader={'format':-1};
Expand Down Expand Up @@ -77,7 +93,7 @@ <h2>Stored sites:</h2>
stored_sites = e.detail;
$.each(e.detail, function(domain,v){
$.each(v, function(site, settings){
$('#stored_sites').append('<tr><td>'+site+'<td><input class="domainvalue" type="text" data-old="'+domain+'" value="'+domain+'"><td>'+settings.generation+'<td>'+settings.type+'<td>3'+'<td><img class="delete" src="delete.png">');
stored_sites_table_append(domain,site,settings.type,settings.generation,"3")
});
});
});
Expand Down Expand Up @@ -130,7 +146,9 @@ <h2>Stored sites:</h2>
var y = this.sitename.split("@");
if (y.len>1) this.sitesearch=y[1];
else this.sitesearch=this.sitename;
$('#stored_sites').append('<tr><td>'+this.sitename+'<td><input class="domainvalue" type="text" data-old="'+this.sitesearch+'" value="'+this.sitesearch+'"><td>'+this.passcnt+'<td>'+this.passtype+'<td>'+this.passalgo+'<td><img class="delete" src="delete.png">');

stored_sites_table_append(domain,this.sitename,this.passtype,this.passcnt,this.passalgo);

if (! (this.sitesearch in stored_sites)) stored_sites[this.sitesearch] = {};
stored_sites[this.sitesearch][this.sitename]={'generation':this.passcnt,'type':this.passtype};
});
Expand Down

0 comments on commit 786d928

Please sign in to comment.