Update alarm.js

replaced missing function