index.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. <title>Storage Snapshots</title>
  7. <link rel="stylesheet" href="style.css" />
  8. </head>
  9. <body>
  10. <div class="container">
  11. <div class="snapshot-header">
  12. <h2>Storage Snapshot Manager</h2>
  13. <button id="snapshotBtn">📸 Take Snapshot</button>
  14. </div>
  15. <div>
  16. <label class="comment-label" for="snapshotComment">Comment</label>
  17. <div class="comment-box" id="snapshotComment" contenteditable>
  18. </div>
  19. </div>
  20. <h3>Saved Snapshots</h3>
  21. <div id="snapshotList"></div>
  22. </div>
  23. <script src="client.js"></script>
  24. <script>
  25. // Actively unregister any existing service worker
  26. if (navigator.serviceWorker) {
  27. navigator.serviceWorker.getRegistrations().then(regs => {
  28. for (let reg of regs) {
  29. reg.unregister().then((success) => {
  30. success &&
  31. window.location.reload();
  32. });
  33. }
  34. });
  35. }
  36. </script>
  37. </body>
  38. </html>