diff --git a/js/classes.js b/js/classes.js index a9dd93e..3177fba 100644 --- a/js/classes.js +++ b/js/classes.js @@ -64,7 +64,7 @@ TextArea.prototype.insertTc = function(tcNpt) { TextArea.prototype.getWord = function(pos, val) { if (!val) { val = this.elem.val(); - } + } var c; var i = pos; var j = pos; @@ -114,7 +114,7 @@ TextArea.prototype.fromSrt = function(txt) { out += "\n"; } } else if (parseInt(sp.tcOutMs) < Video.player.duration) { - out += "\n" + Ox.formatDuration(sp.tcOutMs, 3) + "\n\n"; + out += "\n" + Ox.formatDuration(sp.tcOutMs, 3) + "\n\n"; } }); this.elem.val(out); @@ -165,6 +165,7 @@ TextArea.prototype.toSrt = function(fmt) { TextArea.prototype.toHTML = function() { + this.toSrt(); var spans = this.spans; var html = ''; var span, txt; @@ -172,7 +173,7 @@ TextArea.prototype.toHTML = function() { span = spans[i]; txt = ''; txt += '

\n'; - txt += ''; + txt += ''; txt += (i + 1).toString(); txt += "\n"; txt += '
\n'; @@ -180,10 +181,9 @@ TextArea.prototype.toHTML = function() { txt += "

\n\n"; html += txt; } - return Ox.encodeUTF8(html); + return html; } - //creates new Span (tcIn and tcOut in npt format) var Span = function(tcIn, tcOut, text, index) { this.index = index;