Fixed major Fudge up with challenges without functions
This commit is contained in:
@ -182,6 +182,7 @@ function scopejQuery(s){
|
||||
}
|
||||
|
||||
function safeHTMLRun(test){
|
||||
if(challengeType === "0"){
|
||||
var previewFrame = document.getElementById('preview');
|
||||
var preview = previewFrame.contentDocument || previewFrame.contentWindow.document;
|
||||
if(editor.getValue().match(/\<script\>/gi) !== null) {
|
||||
@ -225,6 +226,7 @@ function safeHTMLRun(test){
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(typeof prodOrDev !== 'undefined') {
|
||||
var nodeEnv = prodOrDev === 'production' ? 'http://www.freecodecamp.com' : 'http://localhost:3001';
|
||||
@ -516,6 +518,25 @@ function bonfireExecute() {
|
||||
codeOutput.setValue("Unsafe or Unfinished function declaration");
|
||||
}
|
||||
}
|
||||
else{
|
||||
submit(userJavaScript, function (cls, message) {
|
||||
if (failedCommentTest) {
|
||||
myCodeMirror.setValue(myCodeMirror.getValue() + "*/");
|
||||
console.log('Caught Unfinished Comment');
|
||||
codeOutput.setValue("Unfinished mulit-line comment");
|
||||
failedCommentTest = false;
|
||||
}
|
||||
else if (cls) {
|
||||
codeOutput.setValue(message.error);
|
||||
runTests('Error', null);
|
||||
} else {
|
||||
codeOutput.setValue(message.output);
|
||||
codeOutput.setValue(codeOutput.getValue().replace(/\\\"/gi, ''));
|
||||
message.input = removeLogs(message.input);
|
||||
runTests(null, message);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
editorValueForIFrame = editor.getValue();
|
||||
|
@ -18,7 +18,7 @@ block content
|
||||
|
||||
.row(ng-controller="pairedWithController")
|
||||
.col-xs-12.col-sm-12.col-md-4.col-lg-3
|
||||
//.scroll-locker(id = "scroll-locker")
|
||||
.scroll-locker(id = "scroll-locker")
|
||||
#testCreatePanel.well
|
||||
h3.text-center.negative-10= name
|
||||
.positive-15.positive-15-bottom
|
||||
|
@ -21,7 +21,7 @@ block content
|
||||
script(src='/js/lib/codemirror/addon/emmet/emmet.js')
|
||||
.row.courseware-height
|
||||
.col-xs-12.col-sm-12.col-md-3.col-lg-3
|
||||
//.scroll-locker(id = "scroll-locker")
|
||||
.scroll-locker(id = "scroll-locker")
|
||||
.innerMarginFix(style = "width: 99%;")
|
||||
.well
|
||||
.row
|
||||
|
@ -16,7 +16,7 @@ block content
|
||||
script(type='text/javascript', src='/js/lib/coursewares/sandbox.js')
|
||||
.row(ng-controller="pairedWithController")
|
||||
.col-xs-12.col-sm-12.col-md-4.col-lg-3
|
||||
//.scroll-locker(id = "scroll-locker")
|
||||
.scroll-locker(id = "scroll-locker")
|
||||
.innerMarginFix(style = "width: 99%;")
|
||||
#testCreatePanel.well
|
||||
h3.text-center.negative-10= name
|
||||
|
Reference in New Issue
Block a user