Skip to content

Commit 18103ae

Browse files
committed
Version 2.13 update. getTypingPattern returns null if there are more than 7% missing keys (editable).
1 parent 6e93317 commit 18103ae

3 files changed

Lines changed: 1247 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This is the main function that outputs the user's typing pattern as a `String`
3636

3737
**Returns**: A typing pattern in `String` form
3838

39-
**optionsObject**: An object of the following form {type:Number, text:String, textId:Number, length: Number, extended:Boolean, targetId:String}. Detail table below.
39+
**optionsObject**: An object of the following form {type:Number, text:String, textId:Number, length: Number, extended:Boolean, targetId:String, caseSensitive:Boolean}. Detail table below.
4040

4141
| Param | Type | Description |
4242
| --- | --- | --- |

typingdna.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* https://api.typingdna.com/scripts/typingdna.js
44
* https://typingdna.com/scripts/typingdna.js (alternative)
55
*
6-
* @version 2.12
6+
* @version 2.13
77
* @author Raul Popa
88
* @copyright SC TypingDNA SRL, http://typingdna.com
99
* @license http://www.apache.org/licenses/LICENSE-2.0
@@ -102,7 +102,7 @@ function TypingDNA() {
102102
TypingDNA.prototype.defaultHistoryLength = TypingDNA.defaultHistoryLength;
103103
TypingDNA.prototype.maxSeekTime = TypingDNA.maxSeekTime;
104104
TypingDNA.prototype.maxPressTime = TypingDNA.maxPressTime;
105-
TypingDNA.version = 2.12;
105+
TypingDNA.version = 2.13;
106106
TypingDNA.flags = 0;
107107
TypingDNA.instance = this;
108108
TypingDNA.document = document;
@@ -621,7 +621,7 @@ function TypingDNA() {
621621

622622
/**
623623
* This is the main function that outputs the typing pattern as a String
624-
* {type:Number, text:String, textId:Number, length: Number, extended:Boolean, targetId:String}
624+
* {type:Number, text:String, textId:Number, length: Number, extended:Boolean, targetId:String, caseSensitive:Boolean}
625625
* @param {Object} obj an object with the following properties
626626
* * * @param {String} type 0 for standard pattern, 1 for diagram pattern
627627
* * * @param {Number} length (Optional) the length of the text in the history for which you want
@@ -1005,8 +1005,7 @@ function TypingDNA() {
10051005
}
10061006
}
10071007
if (TypingDNA.replaceMissingKeysPerc < missingCount*100/strLength) {
1008-
returnArr = [returnArr[0]];
1009-
break;
1008+
return null;
10101009
}
10111010
}
10121011
} else {

0 commit comments

Comments
 (0)