If you want to include line breaks in your actual code to make it easier to read, you're going to need to escape each one with a backslash, e.g.:
var new_comment = '\
<li class="photobooth-comment">\
<span class="username">\
<a href="#">You</a>\
</span>\
<span class="comment-text">\
' + text + '\
</span>\
<span class="comment-time">\
2d\
</span>\
</li>\
';
Or you're going to need to concatenate them as individual strings, like so:
var new_comment = ''+
'<li class="photobooth-comment">' +
'<span class="username">' +
'<a href="#">You</a>' +
'</span>' +
'<span class="comment-text">' +
text +
'</span>' +
'<span class="comment-time">' +
'2d' +
'</span>' +
'</li>'+
'';
Or simply put it all on one line:
var new_comment = '<li class="photobooth-comment"><span class="username"><a href="#">You</a></span><span class="comment-text">' + text + '</span><span class="comment-time">2d</span></li>';
Not so easy to read but neater for your JavaScript!