mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
fixed issue with copying suggested song-link
This commit is contained in:
@@ -1245,6 +1245,7 @@ var List = {
|
||||
song.querySelector(attr).setAttribute("data-video-length", _song_info.length);
|
||||
song.querySelector(attr).setAttribute("data-added-by", added_by);
|
||||
song.querySelector("#list-song").setAttribute("data-video-type", "suggested");
|
||||
song.querySelector("#list-song").setAttribute("data-video-source", "youtube");
|
||||
song.querySelector("#list-song").setAttribute("data-video-id", video_id);
|
||||
Helper.css(song.querySelector("#list-song"), "display", "inline-flex");
|
||||
song.querySelector("#list-song").setAttribute("id", "suggested-" + video_id);
|
||||
|
||||
@@ -38,6 +38,9 @@ var Suggestions = {
|
||||
+ Helper.pad((date.getYear()-100));
|
||||
var toSend = {id: video_id, title: video_title, length: params.duration, duration: duration, votes: addedTime, extra: "Added"};
|
||||
if(params.source) toSend.source = params.source;
|
||||
else {
|
||||
toSend.source = "youtube";
|
||||
}
|
||||
if(params.thumbnail) toSend.thumbnail = params.thumbnail;
|
||||
var song = List.generateSong(toSend, false, false, false, true);
|
||||
var testingElem;
|
||||
@@ -98,7 +101,7 @@ var Suggestions = {
|
||||
}
|
||||
|
||||
try {
|
||||
document.getElementById("suggest-song-html").insertAdjacentHTML("beforeend", List.generateSong({id: video_id, title: video_title, length: length, duration: duration, votes: viewCount, extra: "Views"}, false, false, false));
|
||||
document.getElementById("suggest-song-html").insertAdjacentHTML("beforeend", List.generateSong({id: video_id, title: video_title, length: length, duration: duration, votes: viewCount, extra: "Views", source: "youtube"}, false, false, false));
|
||||
} catch(e) {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user