Commit a6c0905
authored
fix(extension): local content extraction for Chrome Web Store approval (#76)
* fix(extension): replace server API with local content extraction
Chrome Web Store rejected the extension because the core "Save page as
Skill" feature called https://skillkit.sh/api/save-skill which is
unreachable during review. This rewires page saving to work entirely
locally using chrome.scripting.executeScript to extract page content
(title, meta description, headings, body text) directly in the browser.
- Remove API_URL and callSaveApi() server dependency
- Add extractPageContent() via chrome.scripting.executeScript
- Add detectTags() with weighted keyword scoring (URL/headings/body)
- Add buildPageSkill() to generate SKILL.md with frontmatter locally
- Add scripting permission to manifest
- Pass tabId from popup to background for script injection targeting
- Block chrome-extension:// and chromewebstore.google.com URLs
- Add console.error logging in catch blocks for debuggability
- Guard currentTabId validity in popup click handler
- Update store listing to reflect fully local processing
- Bump version to 1.20.0
* fix(extension): address code review findings for robustness
- Extract RESTRICTED_PREFIXES and isRestricted() into shared constants.ts
so popup and background use the same URL blocklist
- Fix yamlEscape to quote YAML bare scalars (true/false/null/yes/no/on/off)
and numeric strings that parsers would coerce to non-string types
- Apply yamlEscape to skill name fields in both buildPageSkill and
buildSelectionSkill to prevent YAML misinterpretation
- Switch tag detection from substring matching to word-boundary regex
to eliminate false positives (e.g. "js" matching "adjustments")
- Check chrome.runtime.lastError in download callback and always
revoke blob URL to prevent leaks on download failure1 parent 1cb76f9 commit a6c0905
File tree
7 files changed
+347
-122
lines changed- packages/extension
- src
- store-assets
7 files changed
+347
-122
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments