Try using window.location