Make apps.json valid JSON, add priority value to categories, unify WebExtension manifest files

main
Elbert Alias 8 years ago
parent 23e1437597
commit 1cd2fd70b0

@ -37,9 +37,11 @@ do
dest="$WAPPALYZER_ROOT/src/icons/converted/$(basename "$svg").png"
if [[ ! -f "$dest" ]]; then
node $WAPPALYZER_NODE_PATH/node_modules/svg2png/bin/svg2png-cli "$svg" --width=32 --height=32 --output "$dest" || true
if [[ -f "$dest" ]]; then
rm "$dest"
fi
#node $WAPPALYZER_NODE_PATH/node_modules/svg2png/bin/svg2png-cli "$svg" --width=32 --height=32 --output "$dest" || true
done
IFS="$OIFS"
@ -66,20 +68,14 @@ pushd $WAPPALYZER_ROOT/src/drivers/chrome > /dev/null
zip -qr $WAPPALYZER_ROOT/build/wappalyzer_chrome.zip .
# Google Chrome
echo "Building WebExtension drivers..."
# WebExtension
echo "Building WebExtension driver..."
pushd $WAPPALYZER_ROOT/src/drivers/webextension > /dev/null
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.zip . -x manifest.edge.json
zip -qr $WAPPALYZER_ROOT/build/wappalyzer_webextension.edge.zip . -x manifest.chrome-opera.json manifest.firefox.json
zip -qr $WAPPALYZER_ROOT/build/wappalyzer_webextension.edge.zip . -x manifest.json
printf "@ manifest.edge.json\n@=manifest.json\n" | zipnote -w $WAPPALYZER_ROOT/build/wappalyzer_webextension.edge.zip

@ -9,9 +9,18 @@
"additionalProperties": false,
"patternProperties": {
"^[0-9]+$": {
"type": "object",
"required": true,
"properties": {
"priority": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
},
"apps": {
"type": "object",
@ -22,7 +31,7 @@
"cats": {
"type": "array",
"items": {
"type": "integer"
"type": "string"
},
"required": true
},

File diff suppressed because it is too large Load Diff

@ -121,7 +121,7 @@
continue;
}
category = w.categories[w.apps[app].cats[i]];
category = w.categories[w.apps[app].cats[i]].name;
html += '<a target="_blank" class="wappalyzer-category" href="' + w.config.websiteURL + 'categories/' + w.driver.slugify(category) + '">' + category + '</a>';
}

@ -83,7 +83,7 @@
cats = [];
wappalyzer.apps[app].cats.forEach(function(cat) {
cats.push(wappalyzer.categories[cat]);
cats.push(wappalyzer.categories[cat].name);
});
apps.push({

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -42,6 +42,10 @@
w.categories = json.categories;
w.apps = json.apps;
w.categories.sort(function(a, b) {
return a.priority == b.priority ? 0 : ( a.priority > b.priority ? 1 : -1 );
});
};
xhr.send(null);
@ -195,9 +199,9 @@
if ( count > 0 ) {
// Find the main application to display
var appName, found = false;
var appName, match, found = false;
w.driver.categoryOrder.forEach(function(match) {
for ( match in w.categories ) {
for ( appName in w.detected[url] ) {
w.apps[appName].cats.forEach(function(cat) {
var icon = w.apps[appName].icon;
@ -213,7 +217,7 @@
}
});
}
});
}
if ( typeof chrome !== 'undefined' ) {
// Browser polyfill doesn't seem to work here
@ -258,54 +262,7 @@
};
xhr.send('json=' + encodeURIComponent(JSON.stringify(data)));
},
categoryOrder: [ // Used to pick the main application
1, // CMS
11, // Blog
6, // Web Shop
2, // Message Board
51, // Landing Page Builder
8, // Wiki
13, // Issue Tracker
30, // Web Mail
18, // Web Framework
21, // LMS
7, // Photo Gallery
38, // Media Server
3, // Database Manager
34, // Database
4, // Documentation Tool
9, // Hosting Panel
29, // Search Engine
12, // JavaScript Framework
26, // Mobile Framework
25, // JavaScript Graphics
22, // Web Server
27, // Programming Language
28, // Operating System
15, // Comment System
20, // Editor
41, // Payment Processor
10, // Analytics
32, // Marketing Automation
31, // CDN
23, // Cache Tool
17, // Font Script
24, // Rich Text Editor
35, // Map
5, // Widget
14, // Video Player
16, // Captcha
33, // Web Server Extension
37, // Network Device
39, // Webcam
40, // Printer
36, // Advertising Network
42, // Tag Managers
43, // Paywalls
19 // Miscellaneous
]
}
};
w.init();

@ -42,7 +42,7 @@ document.addEventListener('DOMContentLoaded', function() {
response.apps[appName].cats.forEach(function(cat) {
html +=
'<a target="_blank" href="https://wappalyzer.com/categories/' + slugify(response.categories[cat]) + '">' +
'<a target="_blank" href="https://wappalyzer.com/categories/' + slugify(response.categories[cat].name) + '">' +
'<span class="category"><span class="name">' + browser.i18n.getMessage('categoryName' + cat) + '</span></span>' +
'</a>';
});

@ -1,6 +1,7 @@
{ "name": "Wappalyzer",
{
"name": "Wappalyzer",
"short_name": "Wappalyzer",
"author": "AliasIO",
"author": "Elbert Alias",
"homepage_url": "https://wappalyzer.com/",
"description": "Identify web technologies",
"version": "3",
@ -28,7 +29,8 @@
"page": "background.html",
"persistent": true
},
"content_scripts": [ {
"content_scripts": [
{
"matches": [ "http://*/*", "https://*/*" ],
"js": [
"js/browser-polyfill.js",
@ -43,7 +45,8 @@
],
"run_at": "document_start",
"all_frames": true
} ],
}
],
"web_accessible_resources": [
"js/inject.js"
],

@ -1,56 +0,0 @@
{ "name": "Wappalyzer",
"short_name": "Wappalyzer",
"author": "AliasIO",
"homepage_url": "https://wappalyzer.com/",
"description": "Identify web technologies",
"version": "3",
"default_locale": "en",
"manifest_version": 2,
"applications": {
"gecko": {
"id": "wappalyzer@crunchlabz.com",
"strict_min_version": "52.0"
}
},
"icon": "images/logo.svg",
"page_action": {
"default_icon": "images/logo.svg",
"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'"
}

@ -1,6 +1,7 @@
{ "name": "Wappalyzer",
{
"name": "Wappalyzer",
"short_name": "Wappalyzer",
"author": "AliasIO",
"author": "Elbert Alias",
"homepage_url": "https://wappalyzer.com/",
"description": "Identify web technologies",
"version": "3",
@ -25,10 +26,11 @@
"default_popup": "popup.html"
},
"background": {
"page": "background.html",
"persistent": true
"page": "background.html"
},
"content_scripts": [ {
"content_scripts": [
{
"matches": [ "http://*/*", "https://*/*" ],
"js": [
"js/browser-polyfill.js",
@ -43,10 +45,12 @@
],
"run_at": "document_start",
"all_frames": true
} ],
}
],
"web_accessible_resources": [
"js/inject.js"
],
"options_page": "options.html",
"options_ui": {
"page": "options.html",
"open_in_tab": false

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB