Don't add delete buttons to youtube search results
People kept clicking them resulting in database errors for unregistered channels.
This commit is contained in:
parent
851491e4ac
commit
0addff6bab
4 changed files with 16 additions and 8 deletions
|
|
@ -1143,11 +1143,13 @@ function clearSearchResults() {
|
|||
}
|
||||
}
|
||||
|
||||
function addLibraryButtons(li, id, type) {
|
||||
function addLibraryButtons(li, id, source) {
|
||||
var btns = $("<div/>").addClass("btn-group")
|
||||
.addClass("pull-left")
|
||||
.prependTo(li);
|
||||
|
||||
var type = (source === "library") ? undefined : source;
|
||||
|
||||
if(hasPermission("playlistadd")) {
|
||||
if(hasPermission("playlistnext")) {
|
||||
$("<button/>").addClass("btn btn-mini")
|
||||
|
|
@ -1172,7 +1174,7 @@ function addLibraryButtons(li, id, type) {
|
|||
})
|
||||
.appendTo(btns);
|
||||
}
|
||||
if(CLIENT.rank >= 2) {
|
||||
if(CLIENT.rank >= 2 && source === "library") {
|
||||
$("<button/>").addClass("btn btn-mini btn-danger")
|
||||
.html("<i class='icon-trash'></i>")
|
||||
.click(function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue