Firefox Extension: Save key/values when the length is greater than 0.
This commit is contained in:
parent
b429401790
commit
081799ea65
@ -234,8 +234,7 @@ function promptuser()
|
|||||||
obj = Components.classes[cid].createInstance();
|
obj = Components.classes[cid].createInstance();
|
||||||
obj = obj.QueryInterface(Components.interfaces.IMiCASAKeys);
|
obj = obj.QueryInterface(Components.interfaces.IMiCASAKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
//alert("Reading");
|
|
||||||
var theValue = new String;
|
var theValue = new String;
|
||||||
var res;
|
var res;
|
||||||
try
|
try
|
||||||
@ -383,20 +382,23 @@ function promptuser()
|
|||||||
{
|
{
|
||||||
//alert('do nothing');
|
//alert('do nothing');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logMessage('Writing ' + secretID + ' : ' + sKey + ' : xxxxxxx');
|
if (sValue.length > 0)
|
||||||
try {
|
{
|
||||||
res = obj.miCASAWriteKey(secretID, sKey, sValue);
|
logMessage('Writing ' + secretID + ' : ' + sKey + ' : xxxxxxx');
|
||||||
if (res != 0)
|
try {
|
||||||
logMessage('Error saving key');
|
res = obj.miCASAWriteKey(secretID, sKey, sValue);
|
||||||
}
|
if (res != 0)
|
||||||
catch (err)
|
logMessage('Error saving key');
|
||||||
{
|
}
|
||||||
alert('CASA services not available');
|
catch (err)
|
||||||
logMessage(err);
|
{
|
||||||
window.close();
|
alert('CASA services not available');
|
||||||
return;
|
logMessage(err);
|
||||||
|
window.close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user