popup.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <style>
  6. * { margin: 0; padding: 0; box-sizing: border-box; }
  7. html, body {
  8. width: 480px;
  9. height: 500px;
  10. max-height: 500px;
  11. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  12. font-size: 13px;
  13. color: #1a1a2e;
  14. background: #fafafa;
  15. overflow: hidden !important;
  16. }
  17. .header {
  18. padding: 12px 16px;
  19. background: #1a1a2e;
  20. color: white;
  21. display: flex;
  22. align-items: center;
  23. gap: 8px;
  24. }
  25. .header h1 { font-size: 14px; font-weight: 600; }
  26. .header .icon { font-size: 18px; }
  27. .content { padding: 12px 16px; }
  28. .status {
  29. padding: 8px 12px;
  30. border-radius: 6px;
  31. font-size: 12px;
  32. margin-bottom: 10px;
  33. }
  34. .status.connected { background: #ecfdf5; color: #065f46; }
  35. .status.disconnected { background: #fef2f2; color: #991b1b; }
  36. .status.sending { background: #eff6ff; color: #1e40af; }
  37. .status.success { background: #ecfdf5; color: #065f46; }
  38. .status.error { background: #fef2f2; color: #991b1b; }
  39. .field { margin-bottom: 8px; }
  40. .field label {
  41. display: block;
  42. font-size: 11px;
  43. font-weight: 600;
  44. color: #6b7280;
  45. text-transform: uppercase;
  46. margin-bottom: 3px;
  47. }
  48. .field input, .field select {
  49. width: 100%;
  50. padding: 6px 8px;
  51. border: 1px solid #e5e7eb;
  52. border-radius: 6px;
  53. font-size: 13px;
  54. font-family: inherit;
  55. outline: none;
  56. background: white;
  57. }
  58. .field input:focus, .field select:focus {
  59. border-color: #6366f1;
  60. box-shadow: 0 0 0 2px rgba(99,102,241,0.1);
  61. }
  62. .field select { cursor: pointer; }
  63. .url-preview {
  64. padding: 4px 8px;
  65. background: #f3f4f6;
  66. border-radius: 4px;
  67. font-size: 11px;
  68. color: #6b7280;
  69. white-space: nowrap;
  70. overflow: hidden;
  71. text-overflow: ellipsis;
  72. }
  73. #contentPreview {
  74. padding: 10px;
  75. background: #f3f4f6;
  76. border: 1px solid #e5e7eb;
  77. border-radius: 6px;
  78. font-size: 12px;
  79. color: #374151;
  80. line-height: 1.6;
  81. max-height: 260px;
  82. overflow-y: auto;
  83. white-space: pre-wrap;
  84. word-break: break-word;
  85. }
  86. #contentPreview::-webkit-scrollbar { width: 8px; }
  87. #contentPreview::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 0 6px 6px 0; }
  88. #contentPreview::-webkit-scrollbar-thumb { background: #c5c5c5; border-radius: 4px; }
  89. #contentPreview::-webkit-scrollbar-thumb:hover { background: #999; }
  90. .btn {
  91. width: 100%;
  92. padding: 10px;
  93. border: none;
  94. border-radius: 6px;
  95. font-size: 13px;
  96. font-weight: 600;
  97. cursor: pointer;
  98. transition: all 0.15s;
  99. margin-top: 10px;
  100. }
  101. .btn-primary { background: #4f46e5; color: white; }
  102. .btn-primary:hover { background: #4338ca; }
  103. .btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }
  104. .footer {
  105. padding: 6px 16px;
  106. border-top: 1px solid #e5e7eb;
  107. font-size: 10px;
  108. color: #9ca3af;
  109. text-align: center;
  110. }
  111. </style>
  112. </head>
  113. <body>
  114. <div class="header">
  115. <span class="icon">📚</span>
  116. <h1>LLM Wiki Clipper</h1>
  117. </div>
  118. <div class="content">
  119. <div id="statusBar" class="status disconnected">Checking connection...</div>
  120. <div class="field">
  121. <label>Save to Project</label>
  122. <select id="projectSelect">
  123. <option value="">Loading projects...</option>
  124. </select>
  125. </div>
  126. <div class="field">
  127. <label>Title</label>
  128. <input type="text" id="titleInput" placeholder="Page title">
  129. </div>
  130. <div class="field">
  131. <label>URL</label>
  132. <div class="url-preview" id="urlPreview">—</div>
  133. </div>
  134. <div class="field">
  135. <label>Content Preview</label>
  136. <div id="contentPreview">Extracting content...</div>
  137. </div>
  138. <button class="btn btn-primary" id="clipBtn" disabled>
  139. 📎 Clip to Wiki
  140. </button>
  141. </div>
  142. <div class="footer">
  143. Content will be saved and auto-ingested into your wiki
  144. </div>
  145. <script src="popup.js"></script>
  146. </body>
  147. </html>