mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
Tempfix for tutorial 2
This commit is contained in:
parent
a512d9735f
commit
006c5aba8d
1 changed files with 33 additions and 1 deletions
|
@ -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 <body></body>.")
|
||||
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>
|
||||
|
|
Loading…
Add table
Reference in a new issue