Add some javascript for detector.