“click” event slightly altered and renamed to “beforechange”

Doesn't trigger anymore when we're redirecting.