Files
ext-rclone-jav/samples/sim-dupe.js
T

51 lines
2.0 KiB
JavaScript

// Sim Dupe preview harness — extracted from popup.js during the console
// consolidation refactor. The Sim Dupe button was removed from the live popup
// (see mockups/console-consolidation-claude.html, step 1 of the sequence).
// This file preserves the fake multi-hit payload so layout/design work on
// renderResult / renderHits can still simulate a 3-hit result without
// running a real search.
//
// To re-enable temporarily for layout testing:
// 1. Re-add the button to popup.html under #actions:
// <button id="sim-dupe" title="Simulate a multi-hit result (debug)">Sim Dupe</button>
// 2. Copy the SIM_DUPE_PAYLOAD constant + the click handler below into popup.js.
// 3. After layout work is done, remove both again so the production popup
// stays free of debug surfaces.
//
// Or, for pure visual review without rebuilding the extension:
// open popup.html in a browser, paste this payload into renderResult() via
// the devtools console.
const SIM_DUPE_PAYLOAD = {
ok: true,
id: "PRTD-027",
hits: 3,
found: true,
cached: false,
structured: [
{
source: "Source", remote: "cq:JAV", jav_id: "PRTD-027",
path: "ClearJAV/ichika-matsumoto/PRTD-027 - Ichika Matsumoto.mkv",
full_path: "cq:JAV/ClearJAV/ichika-matsumoto/PRTD-027 - Ichika Matsumoto.mkv",
size: 7455357566, size_human: "6.94 GiB", mod_time: "",
},
{
source: "Target", remote: "cq:JAV", jav_id: "PRTD-027",
path: "K-P/P/PRTD/PRTD-027 [1080p].mp4",
full_path: "cq:JAV/K-P/P/PRTD/PRTD-027 [1080p].mp4",
size: 7463966365, size_human: "6.95 GiB", mod_time: "",
},
{
source: "Target", remote: "cq:JAV", jav_id: "PRTD-027",
path: "TMP/PRTD-027.mp4",
full_path: "cq:JAV/TMP/PRTD-027.mp4",
size: 5047288128, size_human: "4.70 GiB", mod_time: "",
},
],
};
// Optional: paste this back next to the other action-button listeners in popup.js
// document.getElementById("sim-dupe").addEventListener("click", () => {
// renderResult(SIM_DUPE_PAYLOAD);
// });