···11-/* global chrome */
11+import '../shared/transform';
22+// @ts-nocheck
33+// TODO: Use 'browser' API with polyfill for cross-browser support
2455+/**
66+ * Main entry for popup script. Runs on DOMContentLoaded.
77+ */
38document.addEventListener('DOMContentLoaded', async () => {
49 const list = document.getElementById('dest');
510 const emptyBtn = document.getElementById('emptyCacheBtn');
···4651 console.warn('Cached handle for DID', info.did, 'was not a string, re-fetching. Value:', cachedHandleValue);
4752 }
48534949- // Show "Resolving..." status only if necessary.
5454+ // Show "Resolving..." status only if necessary.
5055 // (`!ds.length` implies nothing was renderable initially, `cachedHandleValue !== undefined` implies we are re-fetching a bad cache entry)
5156 if (!ds.length || cachedHandleValue !== undefined) {
5257 showStatus('Resolving...');
···11-/* globals chrome, importScripts, parseInput, resolveDidToHandle */
22-33-try {
44- importScripts('transform.js');
55-} catch (e) {
66- console.error('SW import fail', e);
77-}
11+// @ts-nocheck
22+// TODO: Use 'browser' API with polyfill for cross-browser support
33+import { parseInput, resolveDidToHandle } from '../shared/transform';
8495const DID_HANDLE_CACHE_KEY = 'didHandleCache';
106const MAX_CACHE_ENTRIES = 1000; // Maximum number of entries to keep in the cache