summaryrefslogtreecommitdiff
path: root/program/js/googiespell.js
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-02-01 09:08:17 +0000
committeralecpl <alec@alec.pl>2011-02-01 09:08:17 +0000
commitef4f591a1d6c348d6236f39a061071457ec192e4 (patch)
tree3898f32da07869ed2e059f7df34444a9cdd73585 /program/js/googiespell.js
parentd8cf6d7278072d49902f5e29ee2faed14aa0f451 (diff)
- Unify typeof and undefined usage
Diffstat (limited to 'program/js/googiespell.js')
-rw-r--r--program/js/googiespell.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/js/googiespell.js b/program/js/googiespell.js
index 428d7f0dc..22716c457 100644
--- a/program/js/googiespell.js
+++ b/program/js/googiespell.js
@@ -91,7 +91,7 @@ function GoogieSpell(img_dir, server_url) {
this.decorateTextarea = function(id) {
- this.text_area = typeof(id) == 'string' ? document.getElementById(id) : id;
+ this.text_area = typeof id === 'string' ? document.getElementById(id) : id;
if (this.text_area) {
if (!this.spell_container && this.decoration) {
@@ -120,7 +120,7 @@ this.decorateTextarea = function(id) {
// API Functions (the ones that you can call)
/////
this.setSpellContainer = function(id) {
- this.spell_container = typeof(id) == 'string' ? document.getElementById(id) : id;
+ this.spell_container = typeof id === 'string' ? document.getElementById(id) : id;
};
this.setLanguages = function(lang_dict) {
@@ -931,7 +931,7 @@ this.checkSpellingState = function(fire) {
// Misc. functions
/////
this.isDefined = function(o) {
- return (o != 'undefined' && o != null)
+ return (o !== undefined && o !== null)
};
this.errorFixed = function() {