Create detector.js