|
@@ -120,6 +120,9 @@
|
|
|
$("#line-last span:eq(0)").text(lc[0]);
|
|
$("#line-last span:eq(0)").text(lc[0]);
|
|
|
if (lc.length > 1) {
|
|
if (lc.length > 1) {
|
|
|
$("#line-last span:eq(1)").text(lc[1]);
|
|
$("#line-last span:eq(1)").text(lc[1]);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (lc.length > 2) {
|
|
|
|
|
+ $("#line-last span:eq(2)").text(lc[2]);
|
|
|
}
|
|
}
|
|
|
$("#line-last").attr("currentLine", k);
|
|
$("#line-last").attr("currentLine", k);
|
|
|
$("#line-last span").fadeIn(400,
|
|
$("#line-last span").fadeIn(400,
|
|
@@ -135,6 +138,9 @@
|
|
|
$("#line-next span:eq(0)").text(lc[0]);
|
|
$("#line-next span:eq(0)").text(lc[0]);
|
|
|
if (lc.length > 1) {
|
|
if (lc.length > 1) {
|
|
|
$("#line-next span:eq(1)").text(lc[1]);
|
|
$("#line-next span:eq(1)").text(lc[1]);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (lc.length > 2) {
|
|
|
|
|
+ $("#line-next span:eq(2)").text(lc[2]);
|
|
|
}
|
|
}
|
|
|
$("#line-next").attr("currentLine", k);
|
|
$("#line-next").attr("currentLine", k);
|
|
|
$("#line-next span").fadeIn(400,
|
|
$("#line-next span").fadeIn(400,
|
|
@@ -146,11 +152,14 @@
|
|
|
fadeFinish = false;
|
|
fadeFinish = false;
|
|
|
$("#line-current span").fadeOut(400,
|
|
$("#line-current span").fadeOut(400,
|
|
|
function() {
|
|
function() {
|
|
|
- var lc = arrLyricObj[k].lrcContent.split("<br/>");
|
|
|
|
|
|
|
+ var lc = arrLyricObj[k].lrcContent.split("<br/>");//console.log(lc);
|
|
|
$("#line-current span:eq(0)").text(lc[0]);
|
|
$("#line-current span:eq(0)").text(lc[0]);
|
|
|
if (lc.length > 1) {
|
|
if (lc.length > 1) {
|
|
|
$("#line-current span:eq(1)").text(lc[1]);
|
|
$("#line-current span:eq(1)").text(lc[1]);
|
|
|
}
|
|
}
|
|
|
|
|
+ if (lc.length > 2) {
|
|
|
|
|
+ $("#line-current span:eq(2)").text(lc[2]);
|
|
|
|
|
+ }
|
|
|
$("#line-current").attr("currentLine", k);
|
|
$("#line-current").attr("currentLine", k);
|
|
|
$("#line-current span").fadeIn(400,
|
|
$("#line-current span").fadeIn(400,
|
|
|
function() {
|
|
function() {
|
|
@@ -240,4 +249,42 @@ $(function() {
|
|
|
getPosition: fun_getPosition
|
|
getPosition: fun_getPosition
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ var noSleep = new NoSleep();
|
|
|
|
|
+var btn_lyricNoslep=document.getElementById("lyricNoslep");
|
|
|
|
|
+if(btn_lyricNoslep){
|
|
|
|
|
+ btn_lyricNoslep.addEventListener('click', function enableNoSleep() {
|
|
|
|
|
+ if(btn_lyricNoslep.innerHTML=='禁止熄屏'){
|
|
|
|
|
+ btn_lyricNoslep.innerHTML='允许熄屏';
|
|
|
|
|
+ //btn_lyricNoslep.removeEventListener('click', enableNoSleep, false);
|
|
|
|
|
+ noSleep.enable();
|
|
|
|
|
+ }else{
|
|
|
|
|
+ btn_lyricNoslep.innerHTML='禁止熄屏';
|
|
|
|
|
+ noSleep.disable();
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }, false);
|
|
|
|
|
+}
|
|
|
|
|
+var btn_lyricBigger=document.getElementById("lyricBigger");
|
|
|
|
|
+if(btn_lyricBigger){
|
|
|
|
|
+ btn_lyricBigger.addEventListener('click', function () {
|
|
|
|
|
+ var size=getComputedStyle($('#lyriccontainer')[0],false)['font-size'];
|
|
|
|
|
+ var num=parseInt(size.substring(0,size.indexOf("px")));console.log(size);
|
|
|
|
|
+ num+=2;
|
|
|
|
|
+ var unit="px";
|
|
|
|
|
+ size=num+unit;
|
|
|
|
|
+ $('#lyriccontainer')[0].style.fontSize=size;
|
|
|
|
|
+ }, false);
|
|
|
|
|
+}
|
|
|
|
|
+var btn_lyricSmaller=document.getElementById("lyricSmaller");
|
|
|
|
|
+if(btn_lyricSmaller){
|
|
|
|
|
+ btn_lyricSmaller.addEventListener('click', function () {
|
|
|
|
|
+ var size=getComputedStyle($('#lyriccontainer')[0],false)['font-size'];
|
|
|
|
|
+ var num=parseInt(size.substring(0,size.indexOf("px")));console.log(size);
|
|
|
|
|
+ num-=2;
|
|
|
|
|
+ var unit="px";
|
|
|
|
|
+ size=num+unit;
|
|
|
|
|
+ $('#lyriccontainer')[0].style.fontSize=size;
|
|
|
|
|
+ }, false);
|
|
|
|
|
+}
|
|
|
});
|
|
});
|