add table of contents support by injecting js, update js utils usages and css