[xiph-commits] r4028 - itext/javascript
silvia at svn.annodex.net
silvia at svn.annodex.net
Mon Sep 21 00:47:36 PDT 2009
Author: silvia
Date: 2009-09-21 00:47:36 -0700 (Mon, 21 Sep 2009)
New Revision: 4028
Modified:
itext/javascript/lrc.js
Log:
Removed spare crap in javascript.
Modified: itext/javascript/lrc.js
===================================================================
--- itext/javascript/lrc.js 2009-09-18 10:29:00 UTC (rev 4027)
+++ itext/javascript/lrc.js 2009-09-21 07:47:36 UTC (rev 4028)
@@ -53,27 +53,27 @@
content = null;
lrclist = lrc.split('\n');
for (var i = 0; i < lrclist.length; i=i+1) {
- var line = lrclist[i];
+ var line = lrclist[i];
// parse [xx] from rest of line
var m = line.match(/\[([^\]]+)\](.*)/);
var s = m[1].match(/(\d+):(\d+)(?:\.(\d+))?/);
if (s) { // ignore header strings and broken time codes
- end =
- (parseInt(s[1], 10) * 60) +
- (parseInt(s[2], 10)) +
- (parseInt(s[3], 10) / 100);
+ end =
+ (parseInt(s[1], 10) * 60) +
+ (parseInt(s[2], 10)) +
+ (parseInt(s[3], 10) / 100);
- // write previous line if there is content from before
- if (content) {
- lines.push({start: start, end: end, content: content});
- }
- start = end;
- content = m[2];
+ // write previous line if there is content from before
+ if (content) {
+ lines.push({start: start, end: end, content: content});
+ }
+ start = end;
+ content = m[2];
}
- });
+ }
// write last line if it has content
if (content) {
- lines.push({start: start, end: null, content: content});
+ lines.push({start: start, end: null, content: content});
}
return lines;
}
More information about the commits
mailing list