Reroll for 3.11: Use variable to disable book js behaviors.

From #5421.