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:
@@ -0,0 +1,32 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Bulk ID Check — rclone-jav</title>
|
||||
<link rel="stylesheet" href="bulk-check.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<strong>Bulk ID Check</strong>
|
||||
<span id="mode-pill" title="Current search mode">…</span>
|
||||
</div>
|
||||
|
||||
<div class="help">
|
||||
Paste IDs separated by lines, commas, or spaces. Uses the current LIVE/CACHE mode and active library profile.
|
||||
<br><span class="dim">Examples: <code>BLK-474</code>, <code>FC2-4865786</code>, <code>PRTD-[027-030]</code></span>
|
||||
</div>
|
||||
|
||||
<textarea id="bulk-id-input" spellcheck="false" autocomplete="off"
|
||||
placeholder="BLK-474 FC2-4865786 PRTD-[027-030]"></textarea>
|
||||
|
||||
<div class="button-row">
|
||||
<button id="bulk-id-run" type="button">Check IDs</button>
|
||||
<button id="bulk-id-clear" type="button">Clear</button>
|
||||
<span id="count-pill" class="dim"></span>
|
||||
</div>
|
||||
|
||||
<div id="bulk-id-results" class="mono-output"></div>
|
||||
|
||||
<script src="bulk-check.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user