aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates/local_playlist.html
diff options
context:
space:
mode:
authorMageas <web.mageas@protonmail.com>2021-09-09 09:56:46 +0200
committerJesús <heckyel@hyperbola.info>2021-09-10 17:58:21 -0500
commit66f396ce32bf2b5c869e63ceb649bbcf510d7034 (patch)
treec1ba1c006d3e4497041e8e4d8f72559d3d57c8ec /youtube/templates/local_playlist.html
parent88803ced44ff7347df83c3d342e17916e242ca67 (diff)
downloadyt-local-66f396ce32bf2b5c869e63ceb649bbcf510d7034.tar.lz
yt-local-66f396ce32bf2b5c869e63ceb649bbcf510d7034.tar.xz
yt-local-66f396ce32bf2b5c869e63ceb649bbcf510d7034.zip
Add a button to remove playlist
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'youtube/templates/local_playlist.html')
-rw-r--r--youtube/templates/local_playlist.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/youtube/templates/local_playlist.html b/youtube/templates/local_playlist.html
index 64abcf4..d08aa48 100644
--- a/youtube/templates/local_playlist.html
+++ b/youtube/templates/local_playlist.html
@@ -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) }}