Update javascript to support auto tabs.
Merge conflicts.