Skip to content

Commit

Permalink
#7 Solve warnings '==='
Browse files Browse the repository at this point in the history
  • Loading branch information
kimkha committed Nov 4, 2014
1 parent 4308463 commit d51ebe3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/scripts/avim.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
}
}
for(b = 0; b < vDConsonant.length; b++) {
if(tw.indexOf(vDConsonant[b]) == 0) {
if(tw.indexOf(vDConsonant[b]) === 0) {
tw = tw.substr(vDConsonant[b].length);
update = true;
t = b;
Expand All @@ -149,7 +149,7 @@
}
if(!update) {
for(b = 0; b < vSConsonant.length; b++) {
if(tw.indexOf(vSConsonant[b]) == 0) {
if(tw.indexOf(vSConsonant[b]) === 0) {
tw=tw.substr(1);
break;
}
Expand Down Expand Up @@ -304,7 +304,7 @@
var w = "", method = AVIMGlobalConfig.method, dockspell = AVIMGlobalConfig.ckSpell, uni, uni2 = false, uni3 = false, uni4 = false;
AVIMObj.oc=obj;
var telex = "D,A,E,O,W,W".split(','), vni = "9,6,6,6,7,8".split(','), viqr = "D,^,^,^,+,(".split(','), viqr2 = "D,^,^,^,*,(".split(','), a, noNormC;
if(method == 0) {
if(method === 0) {
var arr = [], check = [AVIMAutoConfig.telex, AVIMAutoConfig.vni, AVIMAutoConfig.viqr, AVIMAutoConfig.viqrStar];
var value1 = [telex, vni, viqr, viqr2], uniA = [uni, uni2, uni3, uni4], D2A = ["DAWEO", "6789", "D^+(", "D^*("];
for(a = 0; a < check.length; a++) {
Expand Down Expand Up @@ -531,7 +531,7 @@
v = 3;
}
var ttt = upperCase(w.substr(w.length - v, 2));
if((AVIMGlobalConfig.oldAccent == 0) && ((ttt == "UY") || (ttt == "OA") || (ttt == "OE"))) {
if((AVIMGlobalConfig.oldAccent === 0) && ((ttt == "UY") || (ttt == "OA") || (ttt == "OE"))) {
return vowA[0];
}
var c2 = 0, fdconsonant, sc = "BCD" + fcc(272) + "GHKLMNPQRSTVX", dc = "CH,GI,KH,NGH,GH,NG,NH,PH,QU,TH,TR".split(',');
Expand Down Expand Up @@ -662,7 +662,7 @@
function main(w, k, i, a, noNormC) {
var uk = upperCase(k), bya = [AVIMObj.db1, AVIMObj.ab1, AVIMObj.eb1, AVIMObj.ob1, AVIMObj.mocb1, AVIMObj.trangb1], got = false, t = "d,D,a,A,a,A,o,O,u,U,e,E,o,O".split(",");
var sfa = [AVIMObj.ds1, AVIMObj.as1, AVIMObj.es1, AVIMObj.os1, AVIMObj.mocs1, AVIMObj.trangs1], by = [], sf = [], method = AVIMGlobalConfig.method, h, g;
if((method == 2) || ((method == 0) && (a[0] == "9"))) {
if((method == 2) || ((method === 0) && (a[0] == "9"))) {
AVIMObj.DAWEO = "6789";
AVIMObj.SFJRX = "12534";
AVIMObj.S = "1";
Expand All @@ -680,7 +680,7 @@
AVIMObj.A = "^";
AVIMObj.E = "^";
AVIMObj.O = "^";
} else if((method == 3) || ((method == 0) && (a[4] == "+"))) {
} else if((method == 3) || ((method === 0) && (a[4] == "+"))) {
AVIMObj.DAWEO = "^+(D";
AVIMObj.SFJRX = "'`.?~";
AVIMObj.S = "'";
Expand All @@ -698,7 +698,7 @@
AVIMObj.A = "^";
AVIMObj.E = "^";
AVIMObj.O = "^";
} else if((method == 4) || ((method == 0) && (a[4] == "*"))) {
} else if((method == 4) || ((method === 0) && (a[4] == "*"))) {
AVIMObj.DAWEO = "^*(D";
AVIMObj.SFJRX = "'`.?~";
AVIMObj.S = "'";
Expand All @@ -716,7 +716,7 @@
AVIMObj.A = "^";
AVIMObj.E = "^";
AVIMObj.O = "^";
} else if((method == 1) || ((method == 0) && (a[0] == "D"))) {
} else if((method == 1) || ((method === 0) && (a[0] == "D"))) {
AVIMObj.SFJRX = "SFJRX";
AVIMObj.DAWEO = "DAWEO";
AVIMObj.D = 'D';
Expand Down Expand Up @@ -1025,7 +1025,7 @@
}

function checkCode(code) {
if(((AVIMGlobalConfig.onOff == 0) || ((code < 45) && (code != 42) && (code != 32) && (code != 39) && (code != 40) && (code != 43)) || (code == 145) || (code == 255))) {
if(((AVIMGlobalConfig.onOff === 0) || ((code < 45) && (code != 42) && (code != 32) && (code != 39) && (code != 40) && (code != 43)) || (code == 145) || (code == 255))) {
return true;
}
}
Expand Down

0 comments on commit d51ebe3

Please sign in to comment.