From f1e406678260fe0370609e2d265d608bcb3f96bd Mon Sep 17 00:00:00 2001 From: BrokenFire Date: Thu, 28 Dec 2017 18:27:55 +0100 Subject: [PATCH 1/2] Some web enhancement --- src/main/resources/static/index.html | 10 +++++++++- src/main/resources/static/js/init.js | 7 +++++-- src/main/resources/templates/music.html | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index 18c00be..aa840ce 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -45,7 +45,15 @@ - + + diff --git a/src/main/resources/static/js/init.js b/src/main/resources/static/js/init.js index a92afbd..5423536 100644 --- a/src/main/resources/static/js/init.js +++ b/src/main/resources/static/js/init.js @@ -72,15 +72,18 @@ $(document).ready(function() { playlistLimit: $('#limit_range').val(), onHead: true }; + $('#input_link').val(''); sendCommand(JSON.stringify(command)); }) $('#btn_add_bottom').click(function () { + var command = { command: "ADD", url: $('#input_link').val(), playlistLimit: $('#limit_range').val(), onHead: false }; + $('#input_link').val(''); sendCommand(JSON.stringify(command)); }) @@ -200,7 +203,7 @@ function getPlayList() { content = content.replace("@title", element.title); content = content.replace("@author", element.author); content = content.replace("@lenght", msToTime(element.length)); - content = content.replace("@url", element.uri) + content = content.replace(/@url/g, element.uri); template.html(content); $('#playlist_list').append(template); @@ -254,7 +257,7 @@ function updateControl(data){ $('#btn_next').removeClass("disabled"); } - $('#music_img').attr("src","http://img.youtube.com/vi/"+data.info.identifier+"/hqdefault.jpg"); + $('#music_img').attr("src","https://img.youtube.com/vi/"+data.info.identifier+"/hqdefault.jpg"); updateModal(data); } diff --git a/src/main/resources/templates/music.html b/src/main/resources/templates/music.html index 556a45d..8dc9702 100644 --- a/src/main/resources/templates/music.html +++ b/src/main/resources/templates/music.html @@ -167,7 +167,7 @@ From 8092e30aede4ec829609b3ee1102c2c89c859a1a Mon Sep 17 00:00:00 2001 From: BrokenFire Date: Sun, 7 Jan 2018 23:19:47 +0100 Subject: [PATCH 2/2] Open playlist links in new tab --- gradle/wrapper/gradle-wrapper.jar | Bin 54706 -> 54706 bytes gradle/wrapper/gradle-wrapper.properties | 4 ++-- src/main/resources/templates/music.html | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index fc2d20d3b7dffd29a70c67d1ebfa1b19251f6516..d94254a2d93c477188d61c7b3f5ba5b05a199876 100644 GIT binary patch delta 28 hcmdnAnt9V|<_+%-vncLV_u2gEaDgD0H97674* - - + +