Wacky conditionals modifications

javascript file modified