I didn't like the alert messages.
|
|
The function CheckForUpdate.init() has a second parameter that receives a reference to a function with five parameters.
params 4 and 5 are possible when param 1 is Changed or Unchanged You can create your own set of alert()s by doing something like:
CheckForUpdate.init(<>
// ...
</>, myOwnFunction);
function myOwnFunction(type, manual, oheader, nheader, ncontent)
{
with (CheckForUpdate.CallbackResponse)
switch (type)
{
case Error:
if (manual)
alert('An error has occurred');
break;
case ForcedWaiting:
if (manual)
alert('You should wait 2 minutes');
break;
case Unchanged:
if (manual)
alert('Script is unchanged');
break;
case Changed:
alert('Script has changed' + CheckForUpdate.changelog(oheader, nheader, ncontent));
break;
case NoReminder:
case Waiting:
// no alerts
break;
}
}
|