-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a separate manifest.json for Chrome and Firefox
- Loading branch information
Showing
5 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.DS_Store | ||
Thumbs.db | ||
/archive.zip | ||
/archive_chrome.zip | ||
/archive_firefox.zip | ||
/manifest.json |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "Auto Highlight", | ||
"version": "3.5.0", | ||
"description": "*Auto Highlight* automatically highlights the important content on article pages.", | ||
"options_ui": { | ||
"page": "src/options/options.html" | ||
}, | ||
"permissions": ["activeTab", "contextMenus", "scripting", "storage"], | ||
"optional_permissions": ["tabs", "clipboardWrite", "<all_urls>"], | ||
"background": { | ||
"scripts": ["src/matchPattern.js", "src/shared.js", "src/eventPage.js"] | ||
}, | ||
"action": { | ||
"default_icon": { | ||
"19": "icons/0highlight19x19.png", | ||
"38": "icons/0highlight38x38.png" | ||
}, | ||
"default_title": "Toggle highlighting" | ||
}, | ||
"icons": { | ||
"16": "icons/16x16.png", | ||
"48": "icons/48x48.png", | ||
"128": "icons/128x128.png" | ||
}, | ||
"manifest_version": 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
# run this from the package directory | ||
scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
cd "${scriptdir}" | ||
|
||
# easier to see args in an array than a string | ||
ARGS=() | ||
ARGS+=("icons/") | ||
ARGS+=("src/") | ||
ARGS+=("manifest.json") | ||
gen_archive() { | ||
browser="${1}" | ||
|
||
# exclude | ||
ARGS+=("-x") | ||
ARGS+=("*.DS_Store") | ||
ARGS+=("*Thumbs.db") | ||
# easier to see args in an array than a string | ||
args=() | ||
args+=("icons/") | ||
args+=("src/") | ||
args+=("manifest_${browser}.json") | ||
|
||
archive="archive.zip" | ||
# exclude | ||
args+=("-x") | ||
args+=("*.DS_Store") | ||
args+=("*Thumbs.db") | ||
|
||
if [ -f "${archive}" ]; then | ||
rm "${archive}" | ||
fi | ||
archive="archive_${browser}.zip" | ||
|
||
zip -r "${archive}" "${ARGS[@]}" | ||
if [ -f "${archive}" ]; then | ||
rm "${archive}" | ||
fi | ||
|
||
zip -r "${archive}" "${args[@]}" | ||
printf "@ manifest_${browser}.json\n@=manifest.json\n" | zipnote -w "${archive}" | ||
} | ||
|
||
gen_archive chrome | ||
gen_archive firefox |