From 138578af39fdd790034db3b64095abc1ce6b35ac Mon Sep 17 00:00:00 2001 From: DaAwesomeP Date: Sun, 12 Mar 2017 23:03:14 -0500 Subject: [PATCH 1/2] fix manifest for MS Edge (still nonfunctional in Edge) --- src/drivers/webextension/manifest.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/drivers/webextension/manifest.json b/src/drivers/webextension/manifest.json index 5e57b50ae..c447013ee 100644 --- a/src/drivers/webextension/manifest.json +++ b/src/drivers/webextension/manifest.json @@ -1,4 +1,6 @@ { "name": "Wappalyzer", + "short_name": "Wappalyzer", + "author": "AliasIO", "homepage_url": "https://wappalyzer.com/", "description": "Identify web technologies", "version": "3", @@ -10,12 +12,15 @@ "128": "images/icon_128.png" }, "page_action": { - "default_icon": "images/icon_32.png", + "default_icon": { + "32": "images/icon_32.png" + }, "default_title": "Wappalyzer", "default_popup": "popup.html" }, "background": { - "page": "background.html" + "page": "background.html", + "persistent": true }, "content_scripts": [ { "matches": [ "http://*/*", "https://*/*" ], @@ -36,6 +41,7 @@ "web_accessible_resources": [ "js/inject.js" ], + "options_page": "options.html", "options_ui": { "page": "options.html", "open_in_tab": false From 8a031d649e8e944684060073291ff6ec137d006a Mon Sep 17 00:00:00 2001 From: DaAwesomeP Date: Sat, 18 Mar 2017 14:31:19 -0700 Subject: [PATCH 2/2] webextension use different manifests per browser --- bin/wappalyzer-build | 14 ++++- src/drivers/webextension/images/logo.svg | 17 +++++ .../webextension/manifest.chrome-opera.json | 62 +++++++++++++++++++ src/drivers/webextension/manifest.edge.json | 59 ++++++++++++++++++ .../{manifest.json => manifest.firefox.json} | 17 +++-- src/drivers/webextension/options.html | 2 +- 6 files changed, 159 insertions(+), 12 deletions(-) create mode 100644 src/drivers/webextension/images/logo.svg create mode 100644 src/drivers/webextension/manifest.chrome-opera.json create mode 100644 src/drivers/webextension/manifest.edge.json rename src/drivers/webextension/{manifest.json => manifest.firefox.json} (83%) diff --git a/bin/wappalyzer-build b/bin/wappalyzer-build index 6a18d6bb6..44cb73a39 100755 --- a/bin/wappalyzer-build +++ b/bin/wappalyzer-build @@ -67,11 +67,21 @@ pushd $WAPPALYZER_ROOT/src/drivers/chrome > /dev/null zip -qr $WAPPALYZER_ROOT/build/wappalyzer_chrome.zip . # Google Chrome -echo "Building WebExtension driver..." +echo "Building WebExtension drivers..." pushd $WAPPALYZER_ROOT/src/drivers/webextension > /dev/null -zip -qr $WAPPALYZER_ROOT/build/wappalyzer_webextension.zip . +zip -qr $WAPPALYZER_ROOT/build/wappalyzer_webextension.firefox.zip . -x manifest.chrome-opera.json manifest.edge.json + +printf "@ manifest.firefox.json\n@=manifest.json\n" | zipnote -w $WAPPALYZER_ROOT/build/wappalyzer_webextension.firefox.zip + +zip -qr $WAPPALYZER_ROOT/build/wappalyzer_webextension.chrome-opera.zip . -x manifest.firefox.json manifest.edge.json + +printf "@ manifest.chrome-opera.json\n@=manifest.json\n" | zipnote -w $WAPPALYZER_ROOT/build/wappalyzer_webextension.chrome-opera.zip + +zip -qr $WAPPALYZER_ROOT/build/wappalyzer_webextension.edge.zip . -x manifest.chrome-opera.json manifest.firefox.json + +printf "@ manifest.edge.json\n@=manifest.json\n" | zipnote -w $WAPPALYZER_ROOT/build/wappalyzer_webextension.edge.zip popd > /dev/null diff --git a/src/drivers/webextension/images/logo.svg b/src/drivers/webextension/images/logo.svg new file mode 100644 index 000000000..dfcc9511e --- /dev/null +++ b/src/drivers/webextension/images/logo.svg @@ -0,0 +1,17 @@ + + + + Logo + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/src/drivers/webextension/manifest.chrome-opera.json b/src/drivers/webextension/manifest.chrome-opera.json new file mode 100644 index 000000000..39bcb08b2 --- /dev/null +++ b/src/drivers/webextension/manifest.chrome-opera.json @@ -0,0 +1,62 @@ +{ "name": "Wappalyzer", + "short_name": "Wappalyzer", + "author": "AliasIO", + "homepage_url": "https://wappalyzer.com/", + "description": "Identify web technologies", + "version": "3", + "default_locale": "en", + "manifest_version": 2, + "icons": { + "16": "images/icon_16.png", + "19": "images/icon_19.png", + "32": "images/icon_32.png", + "38": "images/icon_38.png", + "128": "images/icon_128.png" + }, + "page_action": { + "default_icon": { + "16": "images/icon_16.png", + "19": "images/icon_19.png", + "32": "images/icon_32.png", + "38": "images/icon_38.png", + "128": "images/icon_128.png" + }, + "default_title": "Wappalyzer", + "default_popup": "popup.html" + }, + "background": { + "page": "background.html", + "persistent": true + }, + "content_scripts": [ { + "matches": [ "http://*/*", "https://*/*" ], + "js": [ + "js/browser-polyfill.js", + "js/content.js" + ], + "run_at": "document_idle" + }, { + "matches": [ "http://*/*", "https://*/*" ], + "js": [ + "js/browser-polyfill.js", + "js/iframe.js" + ], + "run_at": "document_start", + "all_frames": true + } ], + "web_accessible_resources": [ + "js/inject.js" + ], + "options_ui": { + "page": "options.html", + "open_in_tab": false + }, + "permissions": [ + "tabs", + "webRequest", + "webNavigation", + "http://*/*", + "https://*/*" + ], + "content_security_policy": "script-src 'self'; object-src 'self'" +} diff --git a/src/drivers/webextension/manifest.edge.json b/src/drivers/webextension/manifest.edge.json new file mode 100644 index 000000000..1ee3c20ab --- /dev/null +++ b/src/drivers/webextension/manifest.edge.json @@ -0,0 +1,59 @@ +{ "name": "Wappalyzer", + "short_name": "Wappalyzer", + "author": "AliasIO", + "homepage_url": "https://wappalyzer.com/", + "description": "Identify web technologies", + "version": "3", + "default_locale": "en", + "manifest_version": 2, + "icons": { + "16": "images/icon_16.png", + "19": "images/icon_19.png", + "32": "images/icon_32.png", + "38": "images/icon_38.png", + "128": "images/icon_128.png" + }, + "page_action": { + "default_icon": { + "16": "images/icon_16.png", + "19": "images/icon_19.png", + "32": "images/icon_32.png", + "38": "images/icon_38.png", + "128": "images/icon_128.png" + }, + "default_title": "Wappalyzer", + "default_popup": "popup.html" + }, + "background": { + "page": "background.html", + "persistent": true + }, + "content_scripts": [ { + "matches": [ "http://*/*", "https://*/*" ], + "js": [ + "js/browser-polyfill.js", + "js/content.js" + ], + "run_at": "document_idle" + }, { + "matches": [ "http://*/*", "https://*/*" ], + "js": [ + "js/browser-polyfill.js", + "js/iframe.js" + ], + "run_at": "document_start", + "all_frames": true + } ], + "web_accessible_resources": [ + "js/inject.js" + ], + "options_page": "options.html", + "permissions": [ + "tabs", + "webRequest", + "webNavigation", + "http://*/*", + "https://*/*" + ], + "content_security_policy": "script-src 'self'; object-src 'self'" +} diff --git a/src/drivers/webextension/manifest.json b/src/drivers/webextension/manifest.firefox.json similarity index 83% rename from src/drivers/webextension/manifest.json rename to src/drivers/webextension/manifest.firefox.json index c447013ee..5a1d501a3 100644 --- a/src/drivers/webextension/manifest.json +++ b/src/drivers/webextension/manifest.firefox.json @@ -6,15 +6,15 @@ "version": "3", "default_locale": "en", "manifest_version": 2, - "icons": { - "16": "images/icon_16.png", - "32": "images/icon_32.png", - "128": "images/icon_128.png" - }, + "applications": { + "gecko": { + "id": "wappalyzer@crunchlabz.com", + "strict_min_version": "52.0" + } + }, + "icon": "images/logo.svg", "page_action": { - "default_icon": { - "32": "images/icon_32.png" - }, + "default_icon": "images/logo.svg", "default_title": "Wappalyzer", "default_popup": "popup.html" }, @@ -41,7 +41,6 @@ "web_accessible_resources": [ "js/inject.js" ], - "options_page": "options.html", "options_ui": { "page": "options.html", "open_in_tab": false diff --git a/src/drivers/webextension/options.html b/src/drivers/webextension/options.html index bd7f606d0..4b6817ce7 100644 --- a/src/drivers/webextension/options.html +++ b/src/drivers/webextension/options.html @@ -6,7 +6,7 @@ Wappalyzer options - +