Make javascript code work with Minimal Download Strategy Part 2

By Anatoly Mironov