Step 7a: Bulk ID Check moves to a detached popup window

New files:
  bulk-check.html, bulk-check.js, bulk-check.css

Popup gains a 📋 launcher button next to the ⚙ Options gear. Clicking
it sends `open-bulk-check` to background.js and closes the popup;
background.js owns window lifecycle:

  - chrome.storage.session.bulkCheckWindowId stashes the open window id
  - existing id → chrome.windows.update({ focused, drawAttention })
  - missing or stale id → chrome.windows.create({ type:'popup',
    width:640, height:540 }) and stash the new id
  - chrome.windows.onRemoved clears the stale id on close

Last-paste persisted to chrome.storage.local.bulkCheckLastPaste,
debounced 500ms on input, restored on window open. quickMode is read
from settings at run time, matching previous behavior. Ctrl/Cmd+Enter
inside the textarea triggers the check.

Options page no longer carries the Bulk ID Check fieldset: removed
from options.html (Library Review pdesc updated to note the
relocation) and the matching handlers from options.js
(1903 → 1852 lines). No manifest permission changes — own-page
chrome.windows.create needs no extra permission.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
admin
2026-05-22 21:27:12 +02:00
parent e4ee06b19f
commit ad4df28a66
9 changed files with 321 additions and 64 deletions
+1
View File
@@ -14,6 +14,7 @@
<button id="mode-cache" type="button" data-mode="cache" title="CACHE: use cache.json">CACHE</button>
</div>
<button id="pause-scan" type="button" title="Pause scanning"></button>
<button id="open-bulk" title="Bulk ID Check">📋</button>
<button id="open-options" title="Options"></button>
</div>
</div>