ad4df28a66
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>
76 lines
4.3 KiB
HTML
76 lines
4.3 KiB
HTML
<!doctype html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<link rel="stylesheet" href="popup.css">
|
||
</head>
|
||
<body>
|
||
<div id="header">
|
||
<strong>rclone-jav</strong>
|
||
<select id="profile-select" title="Active library profile" style="display:none;background:#222;color:#ddd;border:1px solid #444;border-radius:3px;font-size:12px;padding:2px 4px;max-width:140px;"></select>
|
||
<div id="header-controls">
|
||
<div id="mode-toggle" title="Search mode">
|
||
<button id="mode-live" type="button" data-mode="live" title="LIVE: query rclone directly">LIVE</button>
|
||
<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>
|
||
<div id="search-bar">
|
||
<input id="search-input" type="text" placeholder="search ID (e.g. SSIS-001, PRTD-[1-10])" spellcheck="false" autocomplete="off">
|
||
<button id="search-go" title="Search">🔍</button>
|
||
<button id="search-clear" title="Clear / back to current tab">×</button>
|
||
</div>
|
||
<div id="history-bar" style="display:none;">
|
||
<div id="history-chips"></div>
|
||
<button id="history-clear" title="Clear search history">✕</button>
|
||
</div>
|
||
<div id="cache-banner" style="display:none;"></div>
|
||
<div id="status">checking…</div>
|
||
<div id="filter-bar" style="display:none;"></div>
|
||
<div id="output"></div>
|
||
<div id="actions">
|
||
<button id="recheck">Re-Scan</button>
|
||
<button id="ping">Ping Host</button>
|
||
<button id="undo-btn" title="Undo recent trash delete" style="display:none;">↶ Undo</button>
|
||
<button id="delete-btn" style="display:none;background:#511;border-color:#722;color:#faa;font-weight:600;letter-spacing:0.5px;">DELETE</button>
|
||
</div>
|
||
|
||
<!-- Delete modal -->
|
||
<div id="modal-overlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.8);z-index:100;overflow-y:auto;">
|
||
<div id="modal" style="background:#1a1a1a;border:1px solid #722;border-radius:6px;padding:10px;margin:8px;color:#ddd;font-size:12px;">
|
||
<h3 style="margin:0 0 8px;color:#faa;font-size:13px;">Choose file to delete</h3>
|
||
<div id="modal-list" style="padding:6px;background:#0d0d0d;border-radius:3px;"></div>
|
||
<div id="modal-confirm" style="display:none;margin-top:8px;">
|
||
<div id="modal-target" style="background:#0d0d0d;padding:4px 6px;font-size:10px;font-family:Consolas,monospace;border:1px solid #444;border-radius:3px;margin-bottom:6px;word-break:break-all;"></div>
|
||
<div style="margin-bottom:4px;">Type the exact filename to confirm:</div>
|
||
<div id="confirm-id" style="color:#faa;font-family:Consolas,monospace;word-break:break-all;font-size:10px;background:#0d0d0d;padding:4px 6px;border:1px solid #444;border-radius:3px;margin-bottom:4px;"></div>
|
||
<input id="modal-confirm-input" style="width:100%;background:#0d0d0d;color:#ddd;border:1px solid #722;padding:6px;font-family:Consolas,monospace;font-size:11px;box-sizing:border-box;">
|
||
<div id="modal-mode" style="font-size:10px;color:#aaa;margin-top:4px;"></div>
|
||
</div>
|
||
<div style="display:flex;justify-content:flex-end;gap:6px;margin-top:8px;">
|
||
<button id="modal-cancel">Cancel</button>
|
||
<button id="modal-delete" disabled style="background:#511;border-color:#722;color:#faa;font-weight:600;letter-spacing:0.5px;">DELETE</button>
|
||
</div>
|
||
<div id="modal-status" style="font-size:10px;margin-top:4px;color:#aaa;"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Undo modal -->
|
||
<div id="undo-overlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.8);z-index:100;overflow-y:auto;">
|
||
<div id="undo-modal" style="background:#1a1a1a;border:1px solid #555;border-radius:6px;padding:10px;margin:8px;color:#ddd;font-size:12px;">
|
||
<h3 style="margin:0 0 8px;color:#aaa;font-size:13px;">Recent trash deletes</h3>
|
||
<div id="undo-list" style="padding:6px;background:#0d0d0d;border-radius:3px;min-height:30px;"></div>
|
||
<div style="display:flex;justify-content:flex-end;margin-top:8px;">
|
||
<button id="undo-cancel">Close</button>
|
||
</div>
|
||
<div id="undo-status" style="font-size:10px;margin-top:4px;color:#aaa;"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="popup.js"></script>
|
||
</body>
|
||
</html>
|