Add a button to remove playlist

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
Mageas
2021-09-09 09:56:46 +02:00
committed by Jesús
parent 88803ced44
commit 66f396ce32
2 changed files with 14 additions and 0 deletions

View File

@@ -22,7 +22,9 @@
</div>
</div>
<form id="playlist-remove" action="/youtube.com/edit_playlist" method="post" target="_self"></form>
<div class="playlist-metadata" id="video-remove-container">
<button id="removePlayList" type="submit" name="action" value="remove_playlist" form="playlist-remove" formaction="">Remove playlist</button>
<input type="hidden" name="playlist_page" value="{{ playlist_name }}" form="playlist-edit">
<button class="play-action" type="submit" id="playlist-remove-button" name="action" value="remove" form="playlist-edit" formaction="">Remove from playlist</button>
</div>
@@ -31,6 +33,12 @@
{{ common_elements.item(video_info) }}
{% endfor %}
</div>
<script>
const deletePlayList = document.getElementById('removePlayList');
deletePlayList.addEventListener('click', (event) => {
return confirm('You are about to permanently delete {{ playlist_name }}\n\nOnce a playlist is permanently deleted, it cannot be recovered.')
});
</script>
<footer class="pagination-container">
<nav class="pagination-list">
{{ common_elements.page_buttons(num_pages, '/https://www.youtube.com/playlists/' + playlist_name, parameters_dictionary) }}