Skip to content

Commit

Permalink
Merge pull request #8 from cmnord/cnord/chrome
Browse files Browse the repository at this point in the history
Cnord/chrome
  • Loading branch information
cmnord committed Apr 10, 2023
2 parents 9d3f263 + 928a1f6 commit 681c646
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
9 changes: 8 additions & 1 deletion .env.example
@@ -1,2 +1,9 @@
# Firefox
WEB_EXT_API_KEY=""
WEB_EXT_API_SECRET=""
WEB_EXT_API_SECRET=""

# Chrome
EXTENSION_ID=""
CLIENT_ID=""
CLIENT_SECRET=""
REFRESH_TOKEN=""
12 changes: 9 additions & 3 deletions README.md
Expand Up @@ -26,7 +26,13 @@ npm run dev
Finally, run the `web-ext` development version of the extension with:

```sh
npm run start:firefox # or your browser of choice
npm run start:firefox
```

Or for Chrome:

```sh
npm run start:chrome
```

Open
Expand All @@ -45,8 +51,8 @@ releases.
It's possible to publish to both the Chrome Web Store and Mozilla Addons at once
by creating these ENV variables:

1. `CLIENT_ID`, `CLIENT_SECRET`, and `REFRESH_TOKEN` from [Google
APIs][link-cws-keys].
1. `EXTENSION_ID`, `CLIENT_ID`, `CLIENT_SECRET`, and `REFRESH_TOKEN` from
[Google APIs][link-cws-keys].
1. `WEB_EXT_API_KEY`, and `WEB_EXT_API_SECRET` from [AMO][link-amo-keys].

Build the extension, then attempt to deploy it to both stores:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -4,10 +4,11 @@
"scripts": {
"build": "webpack --mode=production",
"dev": "webpack --mode=development --watch",
"release:cws": "webstore upload --source=dist --auto-publish",
"release:cws": "chrome-webstore-upload upload --source=dist --auto-publish",
"release:amo": "web-ext-submit --source-dir dist",
"release": "VER=$(npx dot-json src/manifest.json version) run-s build version release:*",
"start:firefox": "web-ext run --source-dir dist",
"start:chrome": "web-ext run --source-dir dist -t chromium",
"version": "dot-json dist/manifest.json version $VER"
},
"devDependencies": {
Expand Down
14 changes: 4 additions & 10 deletions src/manifest.json
@@ -1,9 +1,9 @@
{
"manifest_version": 3,
"name": "jeparser",
"version": "2.3.0",
"description": "Browser extension which downloads Jeopardy games from applets for offline solving.",
"homepage_url": "https://github.com/cmnord/jeparser",
"manifest_version": 2,
"minimum_chrome_version": "74",
"browser_specific_settings": {
"gecko": {
Expand All @@ -14,21 +14,15 @@
"icons": {
"128": "icon.png"
},
"permissions": [],
"browser_action": {
"action": {
"default_icon": "icon.png",
"default_title": "jeparser",
"default_popup": "popup/popup.html"
},
"content_scripts": [
{
"matches": [
"*://j-archive.com/showgame.php*"
],
"js": [
"content-script.js",
"browser-polyfill.min.js"
],
"matches": ["*://j-archive.com/showgame.php*"],
"js": ["content-script.js", "browser-polyfill.min.js"],
"run_at": "document_end"
}
]
Expand Down

0 comments on commit 681c646

Please sign in to comment.