Use variable to disable book js behaviors.

From #5421.