Setup preference tabs from JavaScript.