Cleanup and simplify JS code
Change-Id: I393e22763c1a1d18878026bf459b747b150429fb
diff --git a/dev/js/src/util.js b/dev/js/src/util.js
index 719c889..5b6c8f8 100644
--- a/dev/js/src/util.js
+++ b/dev/js/src/util.js
@@ -32,11 +32,12 @@
};
};
-
+// Append element by tag name
HTMLElement.prototype.addE = function (tag) {
return this.appendChild(document.createElement(tag));
};
+// Append text node
HTMLElement.prototype.addT = function (text) {
return this.appendChild(document.createTextNode(text));
};
@@ -64,7 +65,7 @@
KorAP.API = KorAP.API || {};
KorAP.Locale = KorAP.Locale || {};
- var loc = KorAP.Locale;
+ const loc = KorAP.Locale;
loc.OR = loc.OR || 'or';
loc.AND = loc.AND || 'and';