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:
@@ -560,6 +560,10 @@ document.getElementById("recheck").addEventListener("click", async () => {
|
||||
else runCheck(true);
|
||||
});
|
||||
document.getElementById("open-options").addEventListener("click", () => chrome.runtime.openOptionsPage());
|
||||
document.getElementById("open-bulk").addEventListener("click", () => {
|
||||
chrome.runtime.sendMessage({ type: "open-bulk-check" });
|
||||
window.close();
|
||||
});
|
||||
$modeLive.addEventListener("click", () => setSearchMode("live"));
|
||||
$modeCache.addEventListener("click", () => setSearchMode("cache"));
|
||||
$pauseScan.addEventListener("click", () => setScanPaused(!(settings && settings.scanPaused)));
|
||||
|
||||
Reference in New Issue
Block a user