Add configuration option for JS callbacks

Also fixed my indentation to match the rest of the file (was 4 spaces, no its 8)