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

@ -995,7 +995,7 @@
"headers": { "Server": "nginx" }
},
"node.js": {
"cats": [ "27" ],
"cats": [ "27" ]
},
"NOIX": {
"cats": [ "19" ],

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] = []; }