did a funny
This commit is contained in:
parent
e9652871c6
commit
165421c8b3
1 changed files with 14 additions and 12 deletions
|
@ -3187,20 +3187,22 @@ const app = new Vue({
|
|||
let applied = 0;
|
||||
|
||||
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) {
|
||||
// Do Nothing
|
||||
applied +=1;
|
||||
}
|
||||
else {
|
||||
if (app.lyrics[applied].line === "lrcInstrumental") {
|
||||
app.lyrics[applied+1].translation = raw_lines[i].childNodes[0].childNodes[0].textContent;
|
||||
applied +=2;
|
||||
}
|
||||
else {
|
||||
app.lyrics[applied].translation = raw_lines[i].childNodes[0].childNodes[0].textContent;
|
||||
try {
|
||||
if (app.lyrics[applied].line.trim() === raw_lines[i].childNodes[0].childNodes[0].textContent.trim()) {
|
||||
// Do Nothing
|
||||
applied +=1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (app.lyrics[applied].line === "lrcInstrumental") {
|
||||
app.lyrics[applied+1].translation = raw_lines[i].childNodes[0].childNodes[0].textContent.trim();
|
||||
applied +=2;
|
||||
}
|
||||
else {
|
||||
app.lyrics[applied].translation = raw_lines[i].childNodes[0].childNodes[0].textContent.trim();
|
||||
applied +=1;
|
||||
}
|
||||
}
|
||||
} catch(e) {}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue