popup.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <!--<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-eval' 'nonce-a23gbfz9e'">-->
  7. <!--<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' 'nonce-a23gbfz9e'">-->
  8. <title>My Playlists</title>
  9. <link rel="stylesheet" href="popup.css">
  10. <script nonce="a23gbfz9e" src="alpine.min.js" defer></script>
  11. <script nonce="a23gbfz9e" src="popup.js" defer></script>
  12. </head>
  13. <body>
  14. <div id="app" x-data="playlistManager">
  15. <header>
  16. <h1>My Playlists</h1>
  17. </header>
  18. <h1 x-text="temp"></h1>
  19. <div class="playlists-container">
  20. <template x-for="(videos, playlistName) in playlists" :key="playlistName">
  21. <div class="playlist">
  22. <h2 x-text="formatPlaylistName(playlistName)"></h2>
  23. <div class="video-list">
  24. <template x-for="(video, index) in videos" :key="index">
  25. <div class="video-item" :title="video.url">
  26. <span class="video-title" x-text="video.title || 'Untitled Video'"></span>
  27. <div class="video-actions">
  28. <button @click="openVideo(video.url)" class="play-btn">Play</button>
  29. <button @click="removeVideo(playlistName, index)" class="remove-btn">Remove</button>
  30. </div>
  31. </div>
  32. </template>
  33. <div x-show="videos.length === 0" class="empty-playlist">
  34. No videos in this playlist
  35. </div>
  36. </div>
  37. </div>
  38. </template>
  39. </div>
  40. </div>
  41. </body>
  42. </html>