extract the JS code