Add a basic presence check with javascript