diff --git a/extension/chrome/content/nightly.js b/extension/chrome/content/nightly.js index 2428a87..b880c6f 100644 --- a/extension/chrome/content/nightly.js +++ b/extension/chrome/content/nightly.js @@ -142,7 +142,16 @@ getStoredItem: function(type, name) { return nightly.preferences.getCharPref(type+"."+name); } catch (e) {} - return nightly[type][name]; + + if (nightly[type].hasOwnProperty(name)) { + varvalue = nightly[type][name]; + if (varvalue === undefined || varvalue === null) { + varvalue = nightly.getString("nightly.variables.nullvalue"); + } + return varvalue; + } + + return undefined; }, getVariable: function(name) { diff --git a/extension/chrome/content/titlebar/customize.js b/extension/chrome/content/titlebar/customize.js index 4318530..7310eb5 100644 --- a/extension/chrome/content/titlebar/customize.js +++ b/extension/chrome/content/titlebar/customize.js @@ -118,10 +118,6 @@ addVariable: function(name) text=""; } var value = paneTitle.nightly.getVariable(name); - if (value==null) - { - value="Undefined"; - } paneTitle.variables.push({variable: "${"+name+"}", description: text, value: value}); }, diff --git a/extension/chrome/locale/en-US/nightly.properties b/extension/chrome/locale/en-US/nightly.properties index d07c3c8..8a6c11a 100644 --- a/extension/chrome/locale/en-US/nightly.properties +++ b/extension/chrome/locale/en-US/nightly.properties @@ -8,3 +8,4 @@ nightly.noextensions.message=No extensions were found. nightly.restart.message=Addon compatibility has changed, restart to affect currently installed addons nightly.restart.label=Restart nightly.restart.accesskey=R +nightly.variables.nullvalue=Undefined