diff --git a/.gitignore b/.gitignore
index 1377554..3819313 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
*.swp
+*.swo
diff --git a/background.html b/background.html
index 46b449f..5b480ed 100644
--- a/background.html
+++ b/background.html
@@ -29,6 +29,7 @@
diff --git a/js/verify.js b/js/verify.js
index 75e360f..82b1ddd 100644
--- a/js/verify.js
+++ b/js/verify.js
@@ -17,7 +17,7 @@ var sayings = [
var passed = false;
window.onload = function setupUpdater(){
var input=document.getElementsByTagName('textarea')[0]
- , count=document.getElementById('charCount')
+ , count=document.getElementById('percent')
, target=document.getElementById('target')
, targetText = sayings[Math.floor(Math.random()*sayings.length)]
, a = FuzzySet([targetText])
@@ -34,14 +34,17 @@ window.onload = function setupUpdater(){
var newText=input.value;
var score = a.get(newText)[0][0];
if (score>0.91) {
+ set(count, "");
passed = true;
return;
+ } else if (score> 0.1){
+ set(count, "You are " + score*100 + "% accurate (need >91)");
}
}
function eventHandler(){
if(timeout) clearTimeout(timeout);
- timeout=setTimeout(handleChange, 130);
+ timeout=setTimeout(handleChange, 50);
}
input.onkeydown=input.onkeyup=onClick=eventHandler;
};