changed javascript hooks