mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added toast for when new song is added, and changed so the playlistpage is switched to 1 on host-mode enabling
This commit is contained in:
@@ -551,7 +551,7 @@ function enable_host_mode(enabled) {
|
|||||||
document.addEventListener('fullscreenchange', exitHandler, false);
|
document.addEventListener('fullscreenchange', exitHandler, false);
|
||||||
document.addEventListener('MSFullscreenChange', exitHandler, false);
|
document.addEventListener('MSFullscreenChange', exitHandler, false);
|
||||||
}
|
}
|
||||||
List.dynamicContentPageJumpTo(1);
|
List.dynamicContentPageJumpTo(-10);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_list_listener(){
|
function get_list_listener(){
|
||||||
|
|||||||
@@ -360,6 +360,10 @@ var List = {
|
|||||||
full_playlist.push(now_playing);
|
full_playlist.push(now_playing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(hostMode) {
|
||||||
|
M.toast({html: "<div style='display:flex;'><img style='height:100px;align-self:center;' src='" + added.thumbnail + "' /><div style='padding-left:32px;padding-right:32px;'><p>New song added</p><p>" + added.title + "</p></div></div>", displayLength: 10000});
|
||||||
|
document.querySelector("#toast-container").setAttribute("style", "z-index: 99999999999 !important");
|
||||||
|
}
|
||||||
if(added.source != "soundcloud" && document.querySelectorAll("#suggested-"+added.id).length > 0) {
|
if(added.source != "soundcloud" && document.querySelectorAll("#suggested-"+added.id).length > 0) {
|
||||||
number_suggested = number_suggested - 1;
|
number_suggested = number_suggested - 1;
|
||||||
if(number_suggested < 0) number_suggested = 0;
|
if(number_suggested < 0) number_suggested = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user