Add Firefox make goal (#41)

This commit is contained in:
Maxim Baz
2019-03-16 01:25:33 +01:00
committed by GitHub
parent 9c9334192c
commit 7c2397bbfd
4 changed files with 86 additions and 21 deletions

3
.gitignore vendored
View File

@@ -1,4 +1,5 @@
/chrome
/chromium
/firefox
/src/node_modules
/src/css
/src/js

View File

@@ -1,31 +1,48 @@
CLEAN_FILES := chrome
CLEAN_FILES := chromium firefox
.PHONY: all
all: extension chrome
all: extension chromium firefox
.PHONY: extension
extension:
$(MAKE) -C src
CHROME_FILES := manifest.json \
*.css \
*.png \
popup/*.html \
popup/*.svg \
options/*.html
CHROME_FILES := $(wildcard $(addprefix src/,$(CHROME_FILES))) \
src/css/popup.dist.css \
src/css/options.dist.css \
src/js/background.dist.js \
src/js/popup.dist.js \
src/js/options.dist.js \
src/js/inject.dist.js
CHROME_FILES := $(patsubst src/%,chrome/%,$(CHROME_FILES))
EXTENSION_FILES := \
src/*.css \
src/*.png \
src/popup/*.html \
src/popup/*.svg \
src/options/*.html
EXTENSION_FILES := \
$(wildcard $(EXTENSION_FILES)) \
src/css/popup.dist.css \
src/css/options.dist.css \
src/js/background.dist.js \
src/js/popup.dist.js \
src/js/options.dist.js \
src/js/inject.dist.js
CHROMIUM_FILES := $(patsubst src/%,chromium/%, $(EXTENSION_FILES))
FIREFOX_FILES := $(patsubst src/%,firefox/%, $(EXTENSION_FILES))
.PHONY: chrome
chrome: extension $(CHROME_FILES)
.PHONY: chromium
chromium: extension $(CHROMIUM_FILES) chromium/manifest.json
$(CHROME_FILES) : chrome/% : src/%
$(CHROMIUM_FILES) : chromium/% : src/%
[ -d $(dir $@) ] || mkdir -p $(dir $@)
cp $< $@
chromium/manifest.json : src/manifest-chromium.json
[ -d $(dir $@) ] || mkdir -p $(dir $@)
cp $< $@
.PHONY: firefox
firefox: extension $(FIREFOX_FILES) firefox/manifest.json
$(FIREFOX_FILES) : firefox/% : src/%
[ -d $(dir $@) ] || mkdir -p $(dir $@)
cp $< $@
firefox/manifest.json : src/manifest-firefox.json
[ -d $(dir $@) ] || mkdir -p $(dir $@)
cp $< $@

View File

@@ -4,7 +4,7 @@
"name": "Browserpass",
"description": "Browser extension for zx2c4's pass (password manager)",
"version": "3.0.0",
"author": ["Maxim Baz <browserpass@maximbaz.com>", "Steve Gilberd <steve@erayd.net>"],
"author": "Maxim Baz <browserpass@maximbaz.com>, Steve Gilberd <steve@erayd.net>",
"homepage_url": "https://github.com/browserpass/browserpass-extension",
"background": {
"persistent": true,
@@ -23,6 +23,7 @@
"open_in_tab": false
},
"permissions": [
"clipboardWrite",
"activeTab",
"nativeMessaging",
"notifications",

46
src/manifest-firefox.json Normal file
View File

@@ -0,0 +1,46 @@
{
"manifest_version": 2,
"name": "Browserpass",
"description": "Browser extension for zx2c4's pass (password manager)",
"version": "3.0.0",
"author": "Maxim Baz <browserpass@maximbaz.com>, Steve Gilberd <steve@erayd.net>",
"homepage_url": "https://github.com/browserpass/browserpass-extension",
"background": {
"persistent": true,
"scripts": ["js/background.dist.js"]
},
"icons": {
"128": "icon-lock.png"
},
"browser_action": {
"default_icon": "icon-lock.png",
"default_popup": "popup/popup.html"
},
"options_ui": {
"page": "options/options.html",
"open_in_tab": false
},
"permissions": [
"clipboardWrite",
"activeTab",
"nativeMessaging",
"notifications",
"webRequest",
"webRequestBlocking",
"http://*/*",
"https://*/*"
],
"applications": {
"gecko": {
"id": "browserpass@maximbaz.com",
"strict_min_version": "50.0"
}
},
"commands": {
"_execute_browser_action": {
"suggested_key": {
"default": "Ctrl+Shift+L"
}
}
}
}