Change JS file to include status check