Merge branch 'master' of github.com:neocities/neocities

This commit is contained in:
Victoria Wang 2016-04-15 11:34:22 -07:00
commit 578b11a2d5

View file

@ -35,7 +35,38 @@
function checkHomework() {
var html = editor.getValue()
var match = '<html.+>.+<body>.+'+answer+'.+</body>.+</html>'
var match = '<html>.+</html>'
var re = new XRegExp(match, 'gis')
if(html.match(re) === null) {
notok("You're missing the HTML element tag! Your web site must begin with <html> and end with </html>.")
return
}
/*
var match = '<html.+>.+<body></body>.+</html>'
var re = new XRegExp(match, 'gis')
if(html.match(re) === null) {
notok("You need to add some text inside the &lt;body&gt;&lt;/body&gt;.")
return
}
*/
var match = 'Hello World'
var re = new XRegExp(match, 'gis')
if(html.match(re) !== null) {
notok("Hint: Try changing \"Hello World\" to something else.")
return
}
sessionStorage.setItem('tutorialHtml', html)
ok('Great, you did it!', '/tutorial/html/3')
/*
var match = '<html.+>.+<body>.+</body>.+</html>'
var re = new XRegExp(match, 'gis')
if(html.match(re) === null) {
@ -44,5 +75,6 @@
sessionStorage.setItem('tutorialHtml', html)
ok('Great, you did it!', '/tutorial/html/3')
}
*/
}
</script>