Skip to content

Commit

Permalink
Firefox Addon (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod authored Jun 30, 2021
1 parent 812173f commit d7c077b
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
web-ext-artifacts
src/manifest.json
.DS_Store
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# ghostery-search-extension
# Ghostery Search Extension

Makes glowstery.com a default search engine.

## Multiple platform support

WebExtensions are supported by most modern browsers. For each browser we ship exactly same code base but with different manifest.

Manifests are located in `/manifests` folder. To prepare the build for different platform copy the right manifest into `/src` folder or user `npm run switch-<PLATFORM>` scripts. Supported platforms are:
* Ghostery Dawn `npm run switch-dawn`
* Firefox `npm run switch-firefox`
* Chromium - Coming soon

*Important* - remember to copy manifest file on every change you make to it in `/manifests` folder. `/src/manifest.json` is not updating automatically.

## Publishing

Expand Down
File renamed without changes.
54 changes: 54 additions & 0 deletions manifests/firefox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"version": "0.2.7",
"browser_specific_settings": {
"gecko": {
"id": "[email protected]"
}
},
"background": {
"scripts": [
"config.js",
"token-pool.js",
"sjcl.js",
"background.js",
"metrics.js",
"api.js",
"status.js"
]
},
"content_scripts": [{
"matches": [
"https://*.glowstery.com/search*"
],
"js": ["content/additional-search-engines.js"]
}],
"manifest_version": 2,
"name": "Ghostery Glow for Firefox",
"permissions": [
"search",
"storage",
"cookies",
"webRequest",
"webRequestBlocking",
"tabs",
"https://www.ghostery.com/*",
"https://consumerapi.ghostery.com/*",
"https://glowstery.com/*"
],
"icons": {
"16": "favicon.ico"
},
"web_accessible_resources": [
"favicon.ico"
],
"chrome_settings_overrides" : {
"search_provider": {
"name": "Ghostery Glow",
"search_url": "https://glowstery.com/search?q={searchTerms}",
"keyword": "@ghostery",
"is_default": true,
"suggest_url": "https://glowstery.com/suggest",
"suggest_url_get_params": "q={searchTerms}"
}
}
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"description": "",
"main": "index.js",
"scripts": {
"switch-firefox": "cp manifests/firefox.json src/manifest.json",
"switch-dawn": "cp manifests/dawn.json src/manifest.json",
"build": "web-ext build",
"sign": "web-ext sign --channel unlisted --timeout 360000",
"start": "web-ext run --pref extensions.experiments.enabled=true --pref security.sandbox.content.level=2"
},
"webExt": {
Expand Down

0 comments on commit d7c077b

Please sign in to comment.