diff --git a/content/buffer.js b/content/buffer.js index b6c7b263..0b3b43d5 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -1045,7 +1045,7 @@ liberator.Buffer = function () //{{{ // 0 if loading, 1 if loaded or 2 if load failed get loaded() { - if (typeof window.content.document.pageIsFullyLoaded != "undefined") + if (window.content.document.pageIsFullyLoaded !== undefined) return window.content.document.pageIsFullyLoaded; else return 0; // in doubt return "loading" diff --git a/content/events.js b/content/events.js index 985cefe0..5a5187d5 100644 --- a/content/events.js +++ b/content/events.js @@ -361,7 +361,7 @@ liberator.Events = function () //{{{ function exitPopupMode() { // gContextMenu is set to NULL by Firefox, when a context menu is closed - if (typeof gContextMenu != "undefined" && gContextMenu == null && !activeMenubar) + if (gContextMenu !== undefined && gContextMenu == null && !activeMenubar) liberator.modes.remove(liberator.modes.MENU); } function enterMenuMode() @@ -520,7 +520,7 @@ liberator.Events = function () //{{{ { setTimeout(function () { var focused = document.commandDispatcher.focusedElement; - if (focused && (typeof focused.value != "undefined") && focused.value.length == 0) + if (focused && (focused.value !== undefined) && focused.value.length == 0) focused.blur(); }, 100); } @@ -718,7 +718,7 @@ liberator.Events = function () //{{{ // removeEventListeners() to avoid mem leaks liberator.dump("TODO: remove all eventlisteners"); - if (typeof getBrowser != "undefined") + if (getBrowser !== undefined) getBrowser().removeProgressListener(this.progressListener); window.removeEventListener("popupshown", enterPopupMode, true); diff --git a/content/mail.js b/content/mail.js index 6742fda2..8269937d 100644 --- a/content/mail.js +++ b/content/mail.js @@ -814,9 +814,9 @@ liberator.Mail = function () //{{{ if (!filter) filter = ""; - if (typeof includeServers == "undefined") + if (includeServers === undefined) includeServers = false; - if (typeof includeMsgFolders == "undefined") + if (includeMsgFolders === undefined) includeMsgFolders = true; var tree = GetFolderTree(); diff --git a/content/muttator.js b/content/muttator.js index debc30e4..3e81d687 100644 --- a/content/muttator.js +++ b/content/muttator.js @@ -182,7 +182,7 @@ liberator.config = { //{{{ // XXX: Hack! window.document.addEventListener("load", function () { - if (typeof window.messageWasEditedExternally == "undefined") + if (window.messageWasEditedExternally === undefined) { window.messageWasEditedExternally = false; GetCurrentEditor().addDocumentStateListener(stateListener); diff --git a/content/options.js b/content/options.js index 0835adcf..eb7d034f 100644 --- a/content/options.js +++ b/content/options.js @@ -109,7 +109,7 @@ liberator.Option = function (names, description, type, defaultValue, extraInfo) let tmpValue = newValue; newValue = this.setter.call(this, newValue); - if (typeof newValue == "undefined") + if (newValue === undefined) { newValue = tmpValue; liberator.log("DEPRECATED: '" + this.name + "' setter should return a value"); @@ -316,7 +316,7 @@ liberator.Options = function () //{{{ } var expr = liberator.evalExpression(matches[4]); - if (typeof expr == "undefined") + if (expr === undefined) { liberator.echoerr("E15: Invalid expression: " + matches[4]); return; diff --git a/content/tabs.js b/content/tabs.js index 41fb09da..aa574bb4 100644 --- a/content/tabs.js +++ b/content/tabs.js @@ -884,7 +884,7 @@ liberator.Tabs = function () //{{{ else { buffer = lastBufferSwitchArgs; - if (typeof allowNonUnique == "undefined" || allowNonUnique == null) + if (allowNonUnique === undefined || allowNonUnique == null) // XXX allowNonUnique = lastBufferSwitchSpecial; }