Skip to content

Commit

Permalink
Initial development
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanyu committed Dec 7, 2024
1 parent 8e0e306 commit 582158f
Show file tree
Hide file tree
Showing 14 changed files with 6,720 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules
web-ext-artifacts
/dist
/dist-dev
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.PHONY: clean
clean:
rm -rf dist web-ext-artifacts

.PHONY: dev-prepare
dev-prepare:
npm install

.PHONY: dev-build
dev-build:
npm run dev

.PHONY: dev-run
dev-run:
npx web-ext run --source-dir dist

.PHONY: build
build:
npm run build
npx web-ext build --source-dir dist
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# hn-tldr-extension
# Hacker News TL;DR

A browser extension for summarizing Hacker News articles with LLMs.
A bring-your-own-key browser extension for summarizing Hacker News articles with LLMs.

The extension will add the summarize buttons to the HN front page and article pages. Just provide your Anthropic (or soon OpenAI) API key and you're good to go.

![Screenshot 1](screen1.png)

![Screenshot 2](screen2.png)

## Development

To start development:
```
make dev-prepare
```

Dev build:
```
make dev-build
```

Load into Firefox:
```
make dev-run
```

Production build:
```
make build
```

## License

This project is licensed under the GPL-3.0 license. See the [LICENSE](LICENSE) file for details.
65 changes: 65 additions & 0 deletions icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"manifest_version": 3,
"name": "Hacker News TL;DR",
"version": "0.1.0",
"description": "A bring-your-own-key extension for summarizing Hacker News articles with LLMs.",
"icons": {
"48": "icon.svg",
"96": "icon.svg"
},
"browser_specific_settings": {
"gecko": {
"id": "[email protected]"
}
},
"permissions": [
"storage"
],
"host_permissions": [
"<all_urls>"
],
"action": {
"default_title": "Show options"
},
"options_ui": {
"page": "options.html"
},
"content_scripts": [
{
"matches": ["*://news.ycombinator.com/*"],
"js": [
"browser-polyfill.js",
"content.js"
]
}
],
"background": {
"scripts": [
"browser-polyfill.js",
"background.js"
]
}
}
Loading

0 comments on commit 582158f

Please sign in to comment.