summaryrefslogtreecommitdiff
path: root/scripts/textanalysis.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-08-18 21:25:20 +0300
committerAlon Levy <alon@pobox.com>2014-08-18 21:27:01 +0300
commitf8741870a1dcd066a22545635faac274413b05bd (patch)
tree0a98ce9ec4d72d107b4723308884bd9cfb0bce16 /scripts/textanalysis.js
parent59370f16a20cc56aaa61ca8a9a2aa62d418af22b (diff)
recording: record keystrokes. no strokes recorded for link renames
Diffstat (limited to 'scripts/textanalysis.js')
-rw-r--r--scripts/textanalysis.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js
index e38422d8..cff5f658 100644
--- a/scripts/textanalysis.js
+++ b/scripts/textanalysis.js
@@ -22,27 +22,27 @@ $('#textanalyser').autocompleteTrigger({
$("#textanalyser").keypress(function(e) {
+ if (graph.history !== undefined) {
+ graph.history.record_keystrokes(KEYSTROKE_WHERE_TEXTANALYSIS, [e.which]);
+ }
if (e.which == 13) {
if(!suggestionChange){
text = $('#textanalyser').val();
$('#textanalyser').val("");
TextAnalyser2(text, true);
typeStack=[];
- }else{
+ } else {
suggestionChange=false;
}
-
- return false;
+ return false;
}
if (e.which == 37) {//RIGHT
-
$('body').scrollLeft(0);
e.stopPropagation();
return false;
}
if (e.which == 39) { //LEFT
-
$('body').scrollLeft(0);
e.stopPropagation();
return false;
@@ -52,7 +52,9 @@ $("#textanalyser").keypress(function(e) {
$(document).keydown(function(e) {
-
+ if (graph.history !== undefined) {
+ graph.history.record_keystrokes(KEYSTROKE_WHERE_DOCUMENT, [e.KeyCode]);
+ }
if (e.keyCode == 9) {//TAB
e.preventDefault();
changeType("down", lastnode);