10
passmate.css
10
passmate.css
@@ -404,15 +404,19 @@ overview,product {
|
|||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
passwordAlphaNum,passwordWords {
|
passwordShort,passwordPronounceable,passwordReadable {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
product.passwords-short passwordAlphaNum {
|
product.passwords-short passwordShort {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
product.passwords-readable passwordWords {
|
product.passwords-pronounceable passwordPronounceable {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
product.passwords-readable passwordReadable {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
40
passmate.js
40
passmate.js
@@ -1,7 +1,10 @@
|
|||||||
class PassMate {
|
class PassMate {
|
||||||
constructor(container) {
|
constructor(container) {
|
||||||
this.SAFE_UALPHA = 'ABCDEFGHJKLMNPQRSTUVWXYZ';
|
this.SAFE_UALPHA = 'ABCDEFGHJKLMNPQRSTUVWXYZ';
|
||||||
|
this.SAFE_UALPHA_CON = 'BCDFGHJKLMNPQRSTVWXYZ';
|
||||||
this.SAFE_LALPHA = 'abcdefghijkmnpqrstuvwxyz';
|
this.SAFE_LALPHA = 'abcdefghijkmnpqrstuvwxyz';
|
||||||
|
this.SAFE_LALPHA_CON = 'bcdfghjkmnpqrstvwxyz';
|
||||||
|
this.SAFE_LALPHA_VOW = 'aeu';
|
||||||
this.SAFE_NUM = '23456789';
|
this.SAFE_NUM = '23456789';
|
||||||
this.SAFE_ALPHANUM = this.SAFE_UALPHA + this.SAFE_LALPHA + this.SAFE_NUM;
|
this.SAFE_ALPHANUM = this.SAFE_UALPHA + this.SAFE_LALPHA + this.SAFE_NUM;
|
||||||
this.SAFE_SYMBOL = '!?';
|
this.SAFE_SYMBOL = '!?';
|
||||||
@@ -20,6 +23,7 @@ class PassMate {
|
|||||||
|
|
||||||
this.pages = [];
|
this.pages = [];
|
||||||
this.shortPasswords = new Map();
|
this.shortPasswords = new Map();
|
||||||
|
this.pronounceablePasswords = new Map();
|
||||||
this.readablePasswords = new Map();
|
this.readablePasswords = new Map();
|
||||||
|
|
||||||
this.addProduct(container);
|
this.addProduct(container);
|
||||||
@@ -55,11 +59,14 @@ class PassMate {
|
|||||||
let formats = this.addElement('ul', formatStep);
|
let formats = this.addElement('ul', formatStep);
|
||||||
let format = new Select((key) => {
|
let format = new Select((key) => {
|
||||||
this.product.classList.remove('passwords-short');
|
this.product.classList.remove('passwords-short');
|
||||||
|
this.product.classList.remove('passwords-pronounceable');
|
||||||
this.product.classList.remove('passwords-readable');
|
this.product.classList.remove('passwords-readable');
|
||||||
this.product.classList.add('passwords-' + key);
|
this.product.classList.add('passwords-' + key);
|
||||||
});
|
});
|
||||||
let shortItem = this.addElement('li', formats);
|
let shortItem = this.addElement('li', formats);
|
||||||
format.add('short', this.addElement('button', shortItem, 'Short: 5EQaDfNS'));
|
format.add('short', this.addElement('button', shortItem, 'Short: 5EQaDfNS'));
|
||||||
|
let pronounceableItem = this.addElement('li', formats);
|
||||||
|
format.add('pronounceable', this.addElement('button', pronounceableItem, 'Pronounceable: KebeDuveBagica39'));
|
||||||
let readableItem = this.addElement('li', formats);
|
let readableItem = this.addElement('li', formats);
|
||||||
format.add('readable', this.addElement('button', readableItem, 'Readable: LeasedBarneyPlays565 (too long for some websites)'));
|
format.add('readable', this.addElement('button', readableItem, 'Readable: LeasedBarneyPlays565 (too long for some websites)'));
|
||||||
|
|
||||||
@@ -210,10 +217,13 @@ class PassMate {
|
|||||||
password.style.gridArea = 'password';
|
password.style.gridArea = 'password';
|
||||||
this.shortPasswords.set(
|
this.shortPasswords.set(
|
||||||
letter + '-' + (i % pagesPerLetter).toString() + '-' + j.toString(),
|
letter + '-' + (i % pagesPerLetter).toString() + '-' + j.toString(),
|
||||||
this.addElement('passwordAlphaNum', password));
|
this.addElement('passwordShort', password));
|
||||||
|
this.pronounceablePasswords.set(
|
||||||
|
letter + '-' + (i % pagesPerLetter).toString() + '-' + j.toString(),
|
||||||
|
this.addElement('passwordPronounceable', password));
|
||||||
this.readablePasswords.set(
|
this.readablePasswords.set(
|
||||||
letter + '-' + (i % pagesPerLetter).toString() + '-' + j.toString(),
|
letter + '-' + (i % pagesPerLetter).toString() + '-' + j.toString(),
|
||||||
this.addElement('passwordWords', password));
|
this.addElement('passwordReadable', password));
|
||||||
this.addElement('passwordSymbols', password, this.SAFE_SYMBOL);
|
this.addElement('passwordSymbols', password, this.SAFE_SYMBOL);
|
||||||
|
|
||||||
this.addElement('websiteLabel', pwblock, 'Website:').style.gridArea = 'websiteLabel';
|
this.addElement('websiteLabel', pwblock, 'Website:').style.gridArea = 'websiteLabel';
|
||||||
@@ -306,6 +316,32 @@ class PassMate {
|
|||||||
container.innerText = arr.join('');
|
container.innerText = arr.join('');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (let [info, container] of this.pronounceablePasswords) {
|
||||||
|
let choices = [
|
||||||
|
this.SAFE_UALPHA_CON,
|
||||||
|
this.SAFE_LALPHA_VOW,
|
||||||
|
this.SAFE_LALPHA_CON,
|
||||||
|
this.SAFE_LALPHA_VOW,
|
||||||
|
this.SAFE_UALPHA_CON,
|
||||||
|
this.SAFE_LALPHA_VOW,
|
||||||
|
this.SAFE_LALPHA_CON,
|
||||||
|
this.SAFE_LALPHA_VOW,
|
||||||
|
this.SAFE_UALPHA_CON,
|
||||||
|
this.SAFE_LALPHA_VOW,
|
||||||
|
this.SAFE_LALPHA_CON,
|
||||||
|
this.SAFE_LALPHA_VOW,
|
||||||
|
this.SAFE_LALPHA_CON,
|
||||||
|
this.SAFE_LALPHA_VOW,
|
||||||
|
this.SAFE_NUM,
|
||||||
|
this.SAFE_NUM,
|
||||||
|
this.SAFE_NUM,
|
||||||
|
];
|
||||||
|
this.deriveValidArray(key, info, choices, this.validatePassword.bind(this))
|
||||||
|
.then((arr) => {
|
||||||
|
container.innerText = arr.join('');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ A6Fe2bnneuTMUNEAVKQpjNQq74BQVG5JB
|
|||||||
A-0-1: qhqv9Myy
|
A-0-1: qhqv9Myy
|
||||||
A-1-0: MzyhW9Np
|
A-1-0: MzyhW9Np
|
||||||
Z-1-4: 5EQaDfNS
|
Z-1-4: 5EQaDfNS
|
||||||
|
Pronounceable
|
||||||
|
A-0-0: DetaNemaJekada532
|
||||||
|
A-0-1: JuquSafaCedece842
|
||||||
|
A-1-0: PuvuZahaTuzaxu628
|
||||||
|
Z-1-4: YataFeraQerura389
|
||||||
Readable
|
Readable
|
||||||
A-0-0: ReactorsHybridElected875
|
A-0-0: ReactorsHybridElected875
|
||||||
A-0-1: OlderOwnerGeneric253
|
A-0-1: OlderOwnerGeneric253
|
||||||
|
|||||||
Reference in New Issue
Block a user