summaryrefslogtreecommitdiff
path: root/scripts/textanalysis.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-08-10 17:30:30 +0300
committerAlon Levy <alon@pobox.com>2014-08-10 17:32:56 +0300
commitc8c4edc2fd30af8ef4b67d56c3c65974ff25e37e (patch)
tree5b0a849a29e59062226612c5864cb3fdff7a0a55 /scripts/textanalysis.js
parent5420cd2885f42d6d57e601d378069ac1e400db93 (diff)
more 'use strict' and fallout handling
Just defining some variables instead of them becoming properties on the global object Some whitespace fixes too.
Diffstat (limited to 'scripts/textanalysis.js')
-rw-r--r--scripts/textanalysis.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js
index 940683a0..b50fd6d0 100644
--- a/scripts/textanalysis.js
+++ b/scripts/textanalysis.js
@@ -1,3 +1,5 @@
+"use strict"
+
var text = "";
var sugg = ["AJAX", "Neo4J", "Rhizi", "Research", "CRI", "SageBionetworks", "Hero.coli", "CSS", "NodeJS", "HTML5", "Angular", "D3", "ProofOfConcept", "Graphs", "CloudComputing", "BigData", "ProblemSolving", "PHP", "Javascript", "BackBone", "Cooperation", "SemanticWeb"];
var typeindex = 0;
@@ -58,7 +60,7 @@ $(document).keydown(function(e) {
if (e.keyCode == 40) {//DOWN
suggestionChange=true;
}
-
+
if (e.keyCode == 9) {//TAB
return false;
}
@@ -265,7 +267,7 @@ function TextAnalyser2(newtext, finalize) {
//EXTERNAL AND CONNECTION CHECKING
var verb = "";
- function ANDconnect(node) {
+ function ANDconnect(node) {
for(var x=0;x<links.length;x++){
if(newlinks[x])if(newlinks[x].replace(/ /g,"")!=="and"){
verb=newlinks[x];
@@ -310,7 +312,7 @@ function TextAnalyser2(newtext, finalize) {
function Unique(newnode) {
- truth = true;
+ var truth = true;
for (var p = 0; p < sugg.length; p++) {
if (sugg[p] === newnode) {
truth = false;