update DOM ready script for indexing