test
This commit is contained in:
parent
07dff3f610
commit
256d06bbcc
1 changed files with 23 additions and 13 deletions
|
@ -3187,21 +3187,31 @@ const app = new Vue({
|
||||||
let applied = 0;
|
let applied = 0;
|
||||||
|
|
||||||
for (let i = 1; applied < app.lyrics.length; i+=2) { // Start on odd elements because even ones are original.
|
for (let i = 1; applied < app.lyrics.length; i+=2) { // Start on odd elements because even ones are original.
|
||||||
if (app.lyrics[applied].line === raw_lines[i].childNodes[0].childNodes[0].textContent) {
|
try {
|
||||||
// Do Nothing
|
if (app.lyrics[applied].line.trim() != "" && raw_lines[i].childNodes[0].childNodes[0].textContent.trim() != ""){
|
||||||
|
if (app.lyrics[applied].line.trim() === raw_lines[i].childNodes[0].childNodes[0].textContent.trim()) {
|
||||||
|
// Do Nothing and skip to next raw lyric.
|
||||||
applied +=1;
|
applied +=1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (app.lyrics[applied].line === "lrcInstrumental") {
|
if (app.lyrics[applied].line === "lrcInstrumental") {
|
||||||
|
if (app.lyrics[applied+1].line.trim() === raw_lines[i].childNodes[0].childNodes[0].textContent.trim()) {
|
||||||
|
// Do Nothing and skip to next raw lyric.
|
||||||
|
applied +=2;
|
||||||
|
}
|
||||||
|
else {
|
||||||
app.lyrics[applied+1].translation = raw_lines[i].childNodes[0].childNodes[0].textContent;
|
app.lyrics[applied+1].translation = raw_lines[i].childNodes[0].childNodes[0].textContent;
|
||||||
applied +=2;
|
applied +=2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
app.lyrics[applied].translation = raw_lines[i].childNodes[0].childNodes[0].textContent;
|
app.lyrics[applied].translation = raw_lines[i].childNodes[0].childNodes[0].textContent;
|
||||||
applied +=1;
|
applied +=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch(e) {}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} catch (e) {console.debug("Error while parsing MXM Trans: " + e)}
|
} catch (e) {console.debug("Error while parsing MXM Trans: " + e)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue