Fixed bonfire auto-execute on html challenges

This commit is contained in:
benmcmahon100
2015-08-26 00:13:07 +01:00
parent 851af506b5
commit d23f1e4d28

View File

@ -564,5 +564,12 @@ $('#submitButton').on('click', function() {
$(document).ready(function(){ $(document).ready(function(){
editorValue = (codeStorage.isAlive())? codeStorage.getEditorValue() : allSeeds; editorValue = (codeStorage.isAlive())? codeStorage.getEditorValue() : allSeeds;
myCodeMirror.setValue(editorValue.replace(/fccss/gi, '<script>').replace(/fcces/gi, "</script>")); myCodeMirror.setValue(editorValue.replace(/fccss/gi, '<script>').replace(/fcces/gi, "</script>"));
if(typeof $('#preview').html !== 'undefined'){
$('#preview').load(function(){
bonfireExecute(); bonfireExecute();
}); });
}
else{
bonfireExecute();
}
});