1
0
Fork 0
mirror of https://github.com/seejohnrun/haste-server.git synced 2024-12-25 11:37:00 +00:00

Merge branch 'master' of github.com:seejohnrun/haste-server

This commit is contained in:
John Crepezzi 2014-04-21 14:17:09 -04:00
commit 4870158430
2 changed files with 4 additions and 3 deletions

View file

@ -50,7 +50,7 @@ pastes.
## Open Source
Haste can easily be installed behind your network, and its all open source!
Haste can easily be installed behind your network, and it's all open source!
* [haste-client](https://github.com/seejohnrun/haste-client)
* [haste-server](https://github.com/seejohnrun/haste-server)

View file

@ -6,13 +6,14 @@ var PhoneticKeyGenerator = function(options) {
// Generate a phonetic key
PhoneticKeyGenerator.prototype.createKey = function(keyLength) {
var text = '';
var start = Math.round(Math.random());
for (var i = 0; i < keyLength; i++) {
text += (i % 2 == 0) ? this.randConsonant() : this.randVowel();
text += (i % 2 == start) ? this.randConsonant() : this.randVowel();
}
return text;
};
PhoneticKeyGenerator.consonants = 'bcdfghjklmnpqrstvwxy';
PhoneticKeyGenerator.consonants = 'bcdfghjklmnpqrstvwxyz';
PhoneticKeyGenerator.vowels = 'aeiou';
// Get an random vowel