Mini game involving url in JavaScript