Skip to content

Commit 57d2b52

Browse files
committed
fix: restore clean test setup
1 parent c4d7e11 commit 57d2b52

7 files changed

Lines changed: 1210 additions & 36 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ cd UserScriptHunt
3030
open index.html
3131
```
3232

33+
**Local verification:**
34+
```bash
35+
npm ci
36+
npm run test:install
37+
npm test
38+
```
39+
3340
**GitHub Pages deploy:**
3441
1. Fork or push to a GitHub repository
3542
2. Go to **Settings → Pages → Source → Deploy from branch** (main, root)

ROADMAP.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424
Acceptance: `grant:GM_xmlhttpRequest` filters results by parsed metadata or clearly labels sources whose metadata has not been fetched yet; tests cover positive and negative matches.
2525
Complexity: M
2626

27-
- [ ] P0 — Restore clean-checkout test execution
28-
Why: A coding agent cannot verify changes reliably when the current test command fails before loading tests.
29-
Evidence: `package.json`, missing lockfile, `playwright.config.js`, observed `Cannot find module '@playwright/test'`.
30-
Touches: `package.json`, lockfile, test scripts, CI docs.
31-
Acceptance: fresh clone can run `npm ci` and `npm test` successfully, with browsers/install steps documented or scripted.
32-
Complexity: S
33-
3427
### P1
3528
- [ ] P1 — Expand security scan and metadata panels to every installable source
3629
Why: Trust scores are incomplete for ScriptCat, GitHub, and Gists, which weakens the app's main differentiator.
@@ -67,13 +60,6 @@
6760
Acceptance: source/proxy failures persist across reloads with cooldowns, manual retry, and a copyable diagnostics payload excluding secrets.
6861
Complexity: M
6962

70-
- [ ] P1 — Sync versions, changelog, and source copy
71-
Why: Version drift and stale copy reduce trust in a security-sensitive discovery tool.
72-
Evidence: README/index/sw show v0.4.0; `package.json` and `CLAUDE.md` show v0.3.0; `CHANGELOG.md` predates recent Gist/source-health work; empty state omits Gists.
73-
Touches: `package.json`, `CLAUDE.md`, `CHANGELOG.md`, `README.md`, `index.html`, `sw.js`.
74-
Acceptance: all visible/documented versions and source lists match the shipped app; changelog includes recent public features.
75-
Complexity: S
76-
7763
- [ ] P1 — Harden accessibility of controls and modals
7864
Why: The app uses custom checkbox-like source chips and icon-only card buttons in core workflows.
7965
Evidence: `index.html` source toggles use `div role=checkbox`; card buttons use `title`; compare modal lacks an obvious focus trap.

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<meta name="description" content="Unified search engine for userscripts — query Greasy Fork, Sleazy Fork, GitHub, OpenUserJS, Userscript.Zone, and ScriptCat from a single interface.">
6+
<meta name="description" content="Unified search engine for userscripts — query Greasy Fork, Sleazy Fork, GitHub, OpenUserJS, Userscript.Zone, ScriptCat, and GitHub Gists from a single interface.">
77
<meta property="og:image" content="https://raw.githubusercontent.com/SysAdminDoc/UserScriptHunt/main/banner.png">
88
<meta name="theme-color" content="#1e1e2e">
99
<meta id="csp-meta" http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data:; connect-src https://api.greasyfork.org https://api.sleazyfork.org https://api.github.com https://gist.github.com https://gist.githubusercontent.com https://openuserjs.org https://www.userscript.zone https://scriptcat.org https://api.allorigins.win https://api.codetabs.com https://everyorigin.jwvbremen.nl https://greasyfork.org https://sleazyfork.org; font-src https://fonts.googleapis.com https://fonts.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: https:;">
@@ -366,7 +366,7 @@
366366
<div class="state-empty" id="defaultEmpty">
367367
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
368368
<h3>Search userscripts everywhere</h3>
369-
<p>Greasy Fork, Sleazy Fork, GitHub, OpenUserJS, Userscript.Zone, ScriptCat</p>
369+
<p>Greasy Fork, Sleazy Fork, GitHub, OpenUserJS, Userscript.Zone, ScriptCat, GitHub Gists</p>
370370
<p style="margin-top:10px">Try: <code>site:youtube.com</code> <code>author:name</code> <code>updated:90d</code></p>
371371
</div>
372372
</div>
@@ -1493,7 +1493,7 @@ <h3>Search userscripts everywhere</h3>
14931493
}
14941494

14951495
/* -- Shared empty state -- */
1496-
var EMPTY_HOME = '<div class="state-empty"><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg><h3>Search userscripts everywhere</h3><p>Greasy Fork, Sleazy Fork, GitHub, OpenUserJS, Userscript.Zone, ScriptCat</p><p style="margin-top:10px">Try: <code>site:youtube.com</code> <code>author:name</code> <code>updated:90d</code></p></div>';
1496+
var EMPTY_HOME = '<div class="state-empty"><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg><h3>Search userscripts everywhere</h3><p>Greasy Fork, Sleazy Fork, GitHub, OpenUserJS, Userscript.Zone, ScriptCat, GitHub Gists</p><p style="margin-top:10px">Try: <code>site:youtube.com</code> <code>author:name</code> <code>updated:90d</code></p></div>';
14971497
var EMPTY_NORESULT = '<div class="state-empty"><svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/><line x1="8" y1="11" x2="14" y2="11"/></svg><h3>No results found</h3><p>Try different terms or enable more sources</p></div>';
14981498

14991499
/* -- Utilities -- */
@@ -1665,4 +1665,4 @@ <h3>Search userscripts everywhere</h3>
16651665
if ('serviceWorker' in navigator) { navigator.serviceWorker.register('sw.js').catch(function() {}); }
16661666
</script>
16671667
</body>
1668-
</html>
1668+
</html>

0 commit comments

Comments
 (0)