Fix Javascript so non-Freebase preview popouts work.