Fix javascript error in page for chrome extension.