Moving apps.js to apps.json

main
Elbert Alias 12 years ago
parent 256e680b15
commit eab3d824ef

@ -17,22 +17,22 @@ Contributing
**Adding a new application**
* Edit `share/apps.js`
* Edit `share/apps.json`
* Add a 16x16 PNG image to `share/images/icons` matching the application name.
* Provide the URL to the application's website when submitting a pull request.
Example:
```javascript
'Application Name': {
cats: [ 1 ],
headers: { 'X-Powered-By': /Application Name/i },
url: /.+\.application-name\.com/,
html: /<link[^>]application-name\.css/,
meta: { 'generator': /Application Name/i },
script: /application-name\.js/,
env: /ApplicationName/,
implies: [ 'PHP' ]
"Application Name": {
cats: [ "1" ],
headers: { "X-Powered-By": "Application Name" },
url: ".+\\.application-name\\.com",
html: "<link[^>]application-name\\.css",
meta: { "generator": "Application Name" },
script: "application-name\\.js",
env: "ApplicationName",
implies: [ "PHP" ]
}
```

File diff suppressed because it is too large Load Diff

@ -28,7 +28,8 @@ var wappalyzer = wappalyzer || (function() {
* Main script
*/
var w = {
// Cache detected applications per URL
apps: null,
cats: null,
ping: {},
detected: [],
@ -69,12 +70,6 @@ var wappalyzer = wappalyzer || (function() {
return;
}
if ( w.apps == null || w.categories == null ) {
w.log('apps.js not loaded, exiting');
return;
}
// Initialize driver
driver('init', function() {
if ( w.config.firstRun ) {
@ -97,6 +92,12 @@ var wappalyzer = wappalyzer || (function() {
analyze: function(hostname, url, data) {
w.log('w.analyze');
if ( w.apps == null || w.categories == null ) {
w.log('apps.json not loaded');
return;
}
var i, app, type, regex, match, content, meta, header, apps = [];
if ( w.detected[url] == null ) { w.detected[url] = []; }

File diff suppressed because it is too large Load Diff

@ -1,14 +1,14 @@
{
"categories": {
"1": "cms",
"2": "message-boards",
"3": "database-managers",
"4": "documentation-tools",
"5": "widgets",
"6": "web-shops",
"7": "photo-galleries",
"8": "wikis",
"9": "hosting-panels",
"1": "cms",
"2": "message-boards",
"3": "database-managers",
"4": "documentation-tools",
"5": "widgets",
"6": "web-shops",
"7": "photo-galleries",
"8": "wikis",
"9": "hosting-panels",
"10": "analytics",
"11": "blogs",
"12": "javascript-frameworks",
@ -50,10 +50,10 @@
"meta": { "generator": "2z project" }
},
"Accessible Portal": {
"cats": [ "1" ],
"meta": { "generator": "Accessible Portal" },
"implies": [ "PHP" ]
},
"cats": [ "1" ],
"meta": { "generator": "Accessible Portal" },
"implies": [ "PHP" ]
},
"AddThis": {
"cats": [ "5" ],
"script": "addthis\\.com/js",
@ -182,7 +182,7 @@
"Blogger": {
"cats": [ "11" ],
"meta": { "generator": "blogger"
},
},
"url": "^(www.)?.+\\.blogspot\\.com"
},
"BrowserCMS": {
@ -995,7 +995,7 @@
"headers": { "Server": "nginx" }
},
"node.js": {
"cats": [ "27" ],
"cats": [ "27" ]
},
"NOIX": {
"cats": [ "19" ],
@ -1053,11 +1053,11 @@
"html": "<body onload=\\\"window\\.defaultStatus='oscss templates';\\\""
},
"Outbrain": {
"cats": [ "5" ],
"html": "var OB_langJS = 'http://widgets\\.outbrain\\.com/lang_",
"script": "http://widgets\\.outbrain\\.com/outbrain\\.js",
"env": "^OutbrainPermaLink$"
},
"cats": [ "5" ],
"html": "var OB_langJS = 'http://widgets\\.outbrain\\.com/lang_",
"script": "http://widgets\\.outbrain\\.com/outbrain\\.js",
"env": "^OutbrainPermaLink$"
},
"OXID eShop": {
"cats": [ "6" ],
"html": "<!--.*OXID eShop",
@ -1382,10 +1382,10 @@
"html": "Shopsystem von <a href=\\\"http://www\\.store-systems\\.de\\\"|\\.mws_boxTop"
},
"SublimeVideo": {
"cats": [ "14" ],
"script": "http://cdn\\.sublimevideo\\.net/js/[a-z0-9]+\\.js",
"env": "^sublimevideo$"
},
"cats": [ "14" ],
"script": "http://cdn\\.sublimevideo\\.net/js/[a-z0-9]+\\.js",
"env": "^sublimevideo$"
},
"SWFObject": {
"cats": [ "19" ],
"script": "swfobject.*\\.js",
@ -1536,7 +1536,7 @@
"VIVVO": {
"cats": [ "1" ],
"headers": { "Set-Cookie": "VivvoSessionId",
"env": "^vivvo" }
"env": "^vivvo" }
},
"Volusion": {
"cats": [ "6" ],
@ -1601,7 +1601,7 @@
"WikkaWiki": {
"cats": [ "8" ],
"meta": { "generator": "WikkaWiki"
},
},
"html": "Powered by <a href=\\\"[^>]+WikkaWiki"
},
"Windows Server": {

File diff suppressed because it is too large Load Diff

@ -28,7 +28,8 @@ var wappalyzer = wappalyzer || (function() {
* Main script
*/
var w = {
// Cache detected applications per URL
apps: null,
cats: null,
ping: {},
detected: [],
@ -69,12 +70,6 @@ var wappalyzer = wappalyzer || (function() {
return;
}
if ( w.apps == null || w.categories == null ) {
w.log('apps.js not loaded, exiting');
return;
}
// Initialize driver
driver('init', function() {
if ( w.config.firstRun ) {
@ -97,6 +92,12 @@ var wappalyzer = wappalyzer || (function() {
analyze: function(hostname, url, data) {
w.log('w.analyze');
if ( w.apps == null || w.categories == null ) {
w.log('apps.json not loaded');
return;
}
var i, app, type, regex, match, content, meta, header, apps = [];
if ( w.detected[url] == null ) { w.detected[url] = []; }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -28,7 +28,8 @@ var wappalyzer = wappalyzer || (function() {
* Main script
*/
var w = {
// Cache detected applications per URL
apps: null,
cats: null,
ping: {},
detected: [],
@ -69,12 +70,6 @@ var wappalyzer = wappalyzer || (function() {
return;
}
if ( w.apps == null || w.categories == null ) {
w.log('apps.js not loaded, exiting');
return;
}
// Initialize driver
driver('init', function() {
if ( w.config.firstRun ) {
@ -97,6 +92,12 @@ var wappalyzer = wappalyzer || (function() {
analyze: function(hostname, url, data) {
w.log('w.analyze');
if ( w.apps == null || w.categories == null ) {
w.log('apps.json not loaded');
return;
}
var i, app, type, regex, match, content, meta, header, apps = [];
if ( w.detected[url] == null ) { w.detected[url] = []; }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -37,6 +37,23 @@
strings = document.getElementById('wappalyzer-strings');
// Read apps.json
var xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1'].createInstance(Ci.nsIXMLHttpRequest);
//xhr.overrideMimeType('text/plain');
xhr.overrideMimeType('application/json');
xhr.open('GET', 'chrome://wappalyzer/content/apps.json', true);
xhr.onload = function(e) {
var json = JSON.parse(xhr.responseText);
w.categories = json.categories;
w.apps = json.apps;
};
xhr.send(null);
AddonManager.getAddonByID('wappalyzer@crunchlabz.com', function(addon) {
// Load jQuery
Cc['@mozilla.org/moz/jssubscript-loader;1'].getService(Ci.mozIJSSubScriptLoader).loadSubScript('chrome://wappalyzer/content/js/lib/jquery.min.js');

@ -28,7 +28,8 @@ var wappalyzer = wappalyzer || (function() {
* Main script
*/
var w = {
// Cache detected applications per URL
apps: null,
cats: null,
ping: {},
detected: [],
@ -69,12 +70,6 @@ var wappalyzer = wappalyzer || (function() {
return;
}
if ( w.apps == null || w.categories == null ) {
w.log('apps.js not loaded, exiting');
return;
}
// Initialize driver
driver('init', function() {
if ( w.config.firstRun ) {
@ -97,6 +92,12 @@ var wappalyzer = wappalyzer || (function() {
analyze: function(hostname, url, data) {
w.log('w.analyze');
if ( w.apps == null || w.categories == null ) {
w.log('apps.json not loaded');
return;
}
var i, app, type, regex, match, content, meta, header, apps = [];
if ( w.detected[url] == null ) { w.detected[url] = []; }

@ -6,7 +6,6 @@
<overlay id="wappalyzer-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://wappalyzer/content/js/wappalyzer.js"/>
<script type="application/x-javascript" src="chrome://wappalyzer/content/js/apps.js"/>
<script type="application/x-javascript" src="chrome://wappalyzer/content/js/driver.js"/>
<stringbundleset id="stringbundleset">

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -28,7 +28,8 @@ var wappalyzer = wappalyzer || (function() {
* Main script
*/
var w = {
// Cache detected applications per URL
apps: null,
cats: null,
ping: {},
detected: [],
@ -69,12 +70,6 @@ var wappalyzer = wappalyzer || (function() {
return;
}
if ( w.apps == null || w.categories == null ) {
w.log('apps.js not loaded, exiting');
return;
}
// Initialize driver
driver('init', function() {
if ( w.config.firstRun ) {
@ -97,6 +92,12 @@ var wappalyzer = wappalyzer || (function() {
analyze: function(hostname, url, data) {
w.log('w.analyze');
if ( w.apps == null || w.categories == null ) {
w.log('apps.json not loaded');
return;
}
var i, app, type, regex, match, content, meta, header, apps = [];
if ( w.detected[url] == null ) { w.detected[url] = []; }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -28,7 +28,8 @@ var wappalyzer = wappalyzer || (function() {
* Main script
*/
var w = {
// Cache detected applications per URL
apps: null,
cats: null,
ping: {},
detected: [],
@ -69,12 +70,6 @@ var wappalyzer = wappalyzer || (function() {
return;
}
if ( w.apps == null || w.categories == null ) {
w.log('apps.js not loaded, exiting');
return;
}
// Initialize driver
driver('init', function() {
if ( w.config.firstRun ) {
@ -97,6 +92,12 @@ var wappalyzer = wappalyzer || (function() {
analyze: function(hostname, url, data) {
w.log('w.analyze');
if ( w.apps == null || w.categories == null ) {
w.log('apps.json not loaded');
return;
}
var i, app, type, regex, match, content, meta, header, apps = [];
if ( w.detected[url] == null ) { w.detected[url] = []; }

@ -1,28 +1,28 @@
#!/bin/sh
ln -f share/images/icons/* drivers/firefox/skin/images/icons
ln -f share/js/apps.js drivers/firefox/content/js/
ln -f share/js/wappalyzer.js drivers/firefox/content/js/
ln -f share/js/lib/jquery.min.js drivers/firefox/content/js/lib
ln -f share/apps.json drivers/firefox/content
ln -f share/js/wappalyzer.js drivers/firefox/content/js
ln -f share/images/icons/* drivers/firefox-jetpack/images/icons
ln -f share/js/lib/jquery.min.js drivers/firefox-jetpack/lib
ln -f share/js/apps.js drivers/firefox-jetpack/lib
ln -f share/apps.json drivers/firefox-jetpack/data
ln -f share/js/wappalyzer.js drivers/firefox-jetpack/lib
ln -f share/images/icons/* drivers/chrome/images/icons
ln -f share/js/lib/jquery.min.js drivers/chrome/js/lib
ln -f share/js/apps.js drivers/chrome/js/
ln -f share/js/wappalyzer.js drivers/chrome/js/
ln -f share/apps.json drivers/chrome
ln -f share/js/wappalyzer.js drivers/chrome/js
ln -f share/images/icons/* drivers/bookmarklet/images/icons
ln -f share/js/lib/jquery.min.js drivers/bookmarklet/js/lib
ln -f share/js/apps.js drivers/bookmarklet/js/
ln -f share/js/wappalyzer.js drivers/bookmarklet/js/
ln -f share/apps.json drivers/bookmarklet/json
ln -f share/js/wappalyzer.js drivers/bookmarklet/js
ln -f share/images/icons/* drivers/html/images/icons
ln -f share/js/lib/jquery.min.js drivers/html/js/lib
ln -f share/js/apps.js drivers/html/js/
ln -f share/js/wappalyzer.js drivers/html/js/
ln -f share/apps.json drivers/html
ln -f share/js/wappalyzer.js drivers/html/js
ln -f share/js/apps.js drivers/php/js/
ln -f share/js/wappalyzer.js drivers/php/js/
ln -f share/apps.json drivers/php
ln -f share/js/wappalyzer.js drivers/php/js

File diff suppressed because it is too large Load Diff

@ -28,7 +28,8 @@ var wappalyzer = wappalyzer || (function() {
* Main script
*/
var w = {
// Cache detected applications per URL
apps: null,
cats: null,
ping: {},
detected: [],
@ -69,12 +70,6 @@ var wappalyzer = wappalyzer || (function() {
return;
}
if ( w.apps == null || w.categories == null ) {
w.log('apps.js not loaded, exiting');
return;
}
// Initialize driver
driver('init', function() {
if ( w.config.firstRun ) {
@ -97,6 +92,12 @@ var wappalyzer = wappalyzer || (function() {
analyze: function(hostname, url, data) {
w.log('w.analyze');
if ( w.apps == null || w.categories == null ) {
w.log('apps.json not loaded');
return;
}
var i, app, type, regex, match, content, meta, header, apps = [];
if ( w.detected[url] == null ) { w.detected[url] = []; }