From 19c888efaa36643b58cd64e0686332fb85214e3d Mon Sep 17 00:00:00 2001 From: Charles Garwood Date: Sat, 2 Jun 2018 15:12:32 -0400 Subject: [PATCH] fixes for windows --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index ba9d6ce..6b51cc5 100644 --- a/index.html +++ b/index.html @@ -30,16 +30,16 @@ console.log(message); } if (message['acn'] == "fv") { - if (message['ary'][0]['txt'] != undefined) { + if (message['ary'][0]['txt'] != undefined && message['ary'][0]['acn'] == 'cs') { console.log(message['ary']); var text = ''; var lyric = ''; if (typeof message['ary'][2] !== 'undefined' && message['ary'][2]['txt'] != 'novmix') { lyric = message['ary'][0]['txt']; - text = lyric.replaceAll("\n", "%0A").replaceAll("\r", "%0A"); + text = lyric.replaceAll("\r\n", "%0A").replaceAll("\n", "%0A").replaceAll("\r", "%0A"); } - $("#cs").html(lyric.replaceAll("\n","
").replaceAll("\r","
")); + $("#cs").html(lyric.replaceAll("\r\n", "%0A").replaceAll("\n","
").replaceAll("\r","
")); //Send slide data to vMix $.get("http://"+config['vmix_ip']+":"+config['vmix_port']+"/api/?Function=SetText&SelectedIndex=0&Input="+config['vmix_input']+"&Value="+text);