prepare js hooks