Step 6: extract Cache & Scans + Duplicate Review from options.js

Splits the 3133-line options.js into three vanilla scripts loaded in
order at the bottom of options.html:

  options-cache.js        161 lines  (Cache & Scans block)
  options-dupe-review.js  616 lines  (Duplicate Review + Keep Ranking)
  options.js             2356 lines  (everything else)

No behavior change. Cross-file references work because classic <script>
tags share the global declarative environment: top-level `let` bindings
in options-cache.js (_configuredScanRoots, _cacheSkippedByRemote) are
visible by bare reference in options.js, where Library Issues still
reads them. Calls into options.js from the extracted files
(escapeHtml, openModal/closeModal, keepActionViewport,
clearNativeRepairCard, renderNativeMessagingFailure) all occur inside
event handlers, resolved at call time after options.js parses.

node --check passes on each file individually and on the concatenation
of all three in load order. Brace counts balanced.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
admin
2026-05-22 21:10:04 +02:00
parent f8e781f0e9
commit da09434419
5 changed files with 782 additions and 779 deletions
+2
View File
@@ -801,6 +801,8 @@
</div>
</div>
<script src="options-cache.js"></script>
<script src="options-dupe-review.js"></script>
<script src="options.js"></script>
</body>
</html>