Added several applications, refactoring

main
ElbertF 13 years ago
parent 9f18b3dec6
commit ba8970c31c

@ -34,6 +34,7 @@ if ( typeof wappalyzer != 'undefined' ) {
'Advanced Web Stats': { cats: { 1: 10 }, html: /aws.src = [^<]+caphyon\-analytics/i }, 'Advanced Web Stats': { cats: { 1: 10 }, html: /aws.src = [^<]+caphyon\-analytics/i },
'Amiro.CMS': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Amiro/i }, 'Amiro.CMS': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Amiro/i },
'Apache': { cats: { 1: 22 }, headers: { 'Server': /Apache/i } }, 'Apache': { cats: { 1: 22 }, headers: { 'Server': /Apache/i } },
'Apache Tomcat': { cats: { 1: 22 }, headers: { 'Server': /Apache-Coyote/i } },
'AWStats': { cats: { 1: 10 }, html: /<meta name=("|')generator("|') [^>]+AWStats/i }, 'AWStats': { cats: { 1: 10 }, html: /<meta name=("|')generator("|') [^>]+AWStats/i },
'BIGACE': { cats: { 1: 1 }, html: /(<meta name=("|')generator("|') [^>]+BIGACE|Powered by <a href=("|')[^>]+BIGACE|<!--\s+Site is running BIGACE)/i }, 'BIGACE': { cats: { 1: 1 }, html: /(<meta name=("|')generator("|') [^>]+BIGACE|Powered by <a href=("|')[^>]+BIGACE|<!--\s+Site is running BIGACE)/i },
'BigDump': { cats: { 1: 3 }, html: /<!-- <h1>BigDump: Staggered MySQL Dump Importer/ }, 'BigDump': { cats: { 1: 3 }, html: /<!-- <h1>BigDump: Staggered MySQL Dump Importer/ },
@ -43,6 +44,7 @@ if ( typeof wappalyzer != 'undefined' ) {
'Burning Board': { cats: { 1: 2 }, html: /<a href=('|")[^>]+woltlab\.com.+Burning Board/i }, 'Burning Board': { cats: { 1: 2 }, html: /<a href=('|")[^>]+woltlab\.com.+Burning Board/i },
'chartbeat': { cats: { 1: 10 }, html: /function loadChartbeat\(\) {/i }, 'chartbeat': { cats: { 1: 10 }, html: /function loadChartbeat\(\) {/i },
'Chamilo': { cats: { 1: 21 }, html: /<meta name=("|')generator("|') [^>]+Chamilo/i, headers: { 'X-Powered-By': /Chamilo/ } }, 'Chamilo': { cats: { 1: 21 }, html: /<meta name=("|')generator("|') [^>]+Chamilo/i, headers: { 'X-Powered-By': /Chamilo/ } },
'Cherokee': { cats: { 1: 22 }, headers: { 'Server': /Cherokee/i } },
'ClickTale': { cats: { 1: 10 }, html: /if\(typeof ClickTale(Tag)*==("|')function("|')\)/ }, 'ClickTale': { cats: { 1: 10 }, html: /if\(typeof ClickTale(Tag)*==("|')function("|')\)/ },
'Clicky': { cats: { 1: 10 }, html: /<script src=("|')http:\/\/static\.getclicky\.com/i }, 'Clicky': { cats: { 1: 10 }, html: /<script src=("|')http:\/\/static\.getclicky\.com/i },
'CMS Made Simple': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+CMS Made Simple/i }, 'CMS Made Simple': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+CMS Made Simple/i },
@ -60,14 +62,15 @@ if ( typeof wappalyzer != 'undefined' ) {
'cufon': { cats: { 1: 17 }, html: /(<script[^>]* src=("|')[^>]*cufon\-yui\.js|<script[^>]*>[^<]+Cufon\.now\(\))/i }, 'cufon': { cats: { 1: 17 }, html: /(<script[^>]* src=("|')[^>]*cufon\-yui\.js|<script[^>]*>[^<]+Cufon\.now\(\))/i },
'Danneo CMS': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Danneo/i }, 'Danneo CMS': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Danneo/i },
'DataLife Engine': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+DataLife Engine/i }, 'DataLife Engine': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+DataLife Engine/i },
'DHTMLX': { cats: { 1: 12 }, html: /<script [^>]+dhtmlxcommon\.js/i },
'DirectAdmin': { cats: { 1: 9 }, html: /<a[^>]+>DirectAdmin<\/a> Web Control Panel/i }, 'DirectAdmin': { cats: { 1: 9 }, html: /<a[^>]+>DirectAdmin<\/a> Web Control Panel/i },
'Disqus': { cats: { 1: 15 }, html: /(<div[^>]+id=("|')disqus_thread("|')|<script[^>]+disqus_url)/ }, 'Disqus': { cats: { 1: 15 }, html: /(<div[^>]+id=("|')disqus_thread("|')|<script[^>]+disqus_url)/ },
'dojo': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*dojo(\.xd)?\.js/i, env: /dojo/ }, 'dojo': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*dojo(\.xd)?\.js/i, env: /^dojo$/ },
'Dokeos': { cats: { 1: 21 }, html: /(<meta name=("|')generator("|') [^>]+Dokeos|Portal <a[^>]+>Dokeos|@import "[^"]+dokeos_blue)/i, headers: { 'X-Powered-By': /Dokeos/ } }, 'Dokeos': { cats: { 1: 21 }, html: /(<meta name=("|')generator("|') [^>]+Dokeos|Portal <a[^>]+>Dokeos|@import "[^"]+dokeos_blue)/i, headers: { 'X-Powered-By': /Dokeos/ } },
'DokuWiki': { cats: { 1: 8 }, html: /<meta name=("|')generator("|') [^>]+DokuWiki/i }, 'DokuWiki': { cats: { 1: 8 }, html: /<meta name=("|')generator("|') [^>]+DokuWiki/i },
'DotNetNuke': { cats: { 1: 1 }, html: /(<meta name=("|')generator("|') [^>]+DotNetNuke|<!\-\- by DotNetNuke Corporation)/i }, 'DotNetNuke': { cats: { 1: 1 }, html: /(<meta name=("|')generator("|') [^>]+DotNetNuke|<!\-\- by DotNetNuke Corporation)/i },
'DreamWeaver': { cats: { 1: 20 }, html: /(<!\-\-[^>]*(InstanceBeginEditable|Dreamweaver[^>]+target|DWLayoutDefaultTable)|function MM_preloadImages\(\) {)/ }, 'DreamWeaver': { cats: { 1: 20 }, html: /(<!\-\-[^>]*(InstanceBeginEditable|Dreamweaver[^>]+target|DWLayoutDefaultTable)|function MM_preloadImages\(\) {)/ },
'Drupal': { cats: { 1: 1 }, html: /(<script [^>]+drupal\.js|jQuery\.extend\(Drupal\.settings, \{|Drupal\.extend\(\{ settings: \{|<link[^>]+sites\/(default|all)\/themes\/|<style[^>]+sites\/(default|all)\/(themes|modules)\/)/i, headers: { 'X-Drupal-Cache': /.*/, 'Expires': /19 Nov 1978/ } }, 'Drupal': { cats: { 1: 1 }, html: /(<script [^>]+drupal\.js|jQuery\.extend\(Drupal\.settings, \{|Drupal\.extend\(\{ settings: \{|<link[^>]+sites\/(default|all)\/themes\/|<style[^>]+sites\/(default|all)\/(themes|modules)\/)/i, headers: { 'X-Drupal-Cache': /.*/, 'Expires': /19 Nov 1978/ }, env: /^Drupal$/ },
'Dynamicweb': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Dynamicweb/i }, 'Dynamicweb': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Dynamicweb/i },
'e107': { cats: { 1: 1 }, html: /<script [^>]+e107\.js/i }, 'e107': { cats: { 1: 1 }, html: /<script [^>]+e107\.js/i },
'ExtJS': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*ext\-base\.js("|')/i, env: /^Ext$/ }, 'ExtJS': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*ext\-base\.js("|')/i, env: /^Ext$/ },
@ -77,7 +80,7 @@ if ( typeof wappalyzer != 'undefined' ) {
'Flyspray': { cats: { 1: 13 }, html: /(<a[^>]+>Powered by Flyspray|<map id=("|')projectsearchform)/ }, 'Flyspray': { cats: { 1: 13 }, html: /(<a[^>]+>Powered by Flyspray|<map id=("|')projectsearchform)/ },
'FrontPage': { cats: { 1: 20 }, html: /(<meta name=("|')GENERATOR("|') [^>]+Microsoft FrontPage|<html[^>]+urn:schemas\-microsoft\-com:office:office)/i }, 'FrontPage': { cats: { 1: 20 }, html: /(<meta name=("|')GENERATOR("|') [^>]+Microsoft FrontPage|<html[^>]+urn:schemas\-microsoft\-com:office:office)/i },
'Get Satisfaction': { cats: { 1: 13 }, html: /var feedback_widget = new GSFN\.feedback_widget\(feedback_widget_options\)/ }, 'Get Satisfaction': { cats: { 1: 13 }, html: /var feedback_widget = new GSFN\.feedback_widget\(feedback_widget_options\)/ },
'Google Analytics': { cats: { 1: 10 }, html: /(\.google\-analytics\.com\/ga\.js|<script src=("|')[^"]+google-analytics\.com\/urchin\.js("|'))/i }, 'Google Analytics': { cats: { 1: 10 }, html: /(\.google\-analytics\.com\/ga\.js|<script src=("|')[^"]+google-analytics\.com\/urchin\.js("|'))/i, env: /^gaGlobal$/ },
'Google Font API': { cats: { 1: 17 }, html: /<link[^>]* href=("|')http:\/\/fonts\.googleapis\.com/ }, 'Google Font API': { cats: { 1: 17 }, html: /<link[^>]* href=("|')http:\/\/fonts\.googleapis\.com/ },
'Google Friend Connect': { cats: { 1: 5 }, html: /<script[^>]* src=("|')[^>]*google.com\/friendconnect/i }, 'Google Friend Connect': { cats: { 1: 5 }, html: /<script[^>]* src=("|')[^>]*google.com\/friendconnect/i },
'Google Maps': { cats: { 1: 5 }, html: /(<script[^>]* src=("|')[^>]*maps\.google\.com\/maps\?file=api|maps\.google\.com\/maps\/api\/staticmap)/i }, 'Google Maps': { cats: { 1: 5 }, html: /(<script[^>]* src=("|')[^>]*maps\.google\.com\/maps\?file=api|maps\.google\.com\/maps\/api\/staticmap)/i },
@ -112,6 +115,7 @@ if ( typeof wappalyzer != 'undefined' ) {
'Microsoft SharePoint': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Microsoft SharePoint/i, headers: { 'MicrosoftSharePointTeamServices': /.*/, 'X-SharePointHealthScore': /.*/, 'SPRequestGuid': /.*/ } }, 'Microsoft SharePoint': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Microsoft SharePoint/i, headers: { 'MicrosoftSharePointTeamServices': /.*/, 'X-SharePointHealthScore': /.*/, 'SPRequestGuid': /.*/ } },
'MiniBB': { cats: { 1: 2 }, html: /<a href=("|')[^>]+minibb.+\s+<!--End of copyright link/i }, 'MiniBB': { cats: { 1: 2 }, html: /<a href=("|')[^>]+minibb.+\s+<!--End of copyright link/i },
'Mint': { cats: { 1: 10 }, html: /<script[^>]* src=("|')[^>]*mint\/\?js/i }, 'Mint': { cats: { 1: 10 }, html: /<script[^>]* src=("|')[^>]*mint\/\?js/i },
'Mixpanel': { cats: { 1: 10 }, html: /<script[^>]* src=("|')[^>]*api\.mixpanel\.com\/track/i },
'MochiKit': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*MochiKit\.js/i, env: /^MochiKit$/ }, 'MochiKit': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*MochiKit\.js/i, env: /^MochiKit$/ },
'Modernizr': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*modernizr[^>]*\.js/i }, 'Modernizr': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*modernizr[^>]*\.js/i },
'MODx': { cats: { 1: 1 }, html: /(<a[^>]+>Powered by MODx<\/a>|var el= \$\('modxhost'\);|<script type=("|')text\/javascript("|')>var MODX_MEDIA_PATH = "media";)/i }, 'MODx': { cats: { 1: 1 }, html: /(<a[^>]+>Powered by MODx<\/a>|var el= \$\('modxhost'\);|<script type=("|')text\/javascript("|')>var MODX_MEDIA_PATH = "media";)/i },
@ -122,6 +126,7 @@ if ( typeof wappalyzer != 'undefined' ) {
'Movable Type': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Movable Type/i }, 'Movable Type': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Movable Type/i },
'MyBB': { cats: { 1: 2 }, html: /(<script [^>]+\s+<!--\s+lang\.no_new_posts|<a[^>]* title=("|')Powered By MyBB)/i }, 'MyBB': { cats: { 1: 2 }, html: /(<script [^>]+\s+<!--\s+lang\.no_new_posts|<a[^>]* title=("|')Powered By MyBB)/i },
'MyBlogLog': { cats: { 1: 5 }, html: /<script[^>]* src=("|')[^>]*pub\.mybloglog\.com/i }, 'MyBlogLog': { cats: { 1: 5 }, html: /<script[^>]* src=("|')[^>]*pub\.mybloglog\.com/i },
'Mynetcap': { cats: { 1: 1 }, html: /<meta name=("|')generator("|') [^>]+Mynetcap/i },
'Nedstat': { cats: { 1: 10 }, html: /sitestat\(("|')http:\/\/nl\.sitestat\.com/ }, 'Nedstat': { cats: { 1: 10 }, html: /sitestat\(("|')http:\/\/nl\.sitestat\.com/ },
'Nginx': { cats: { 1: 22 }, headers: { 'Server': /nginx/i } }, 'Nginx': { cats: { 1: 22 }, headers: { 'Server': /nginx/i } },
'nopCommerce': { cats: { 1: 6 }, html: /(<!\-\-Powered by nopCommerce|Powered by: <a[^>]+nopcommerce)/i }, 'nopCommerce': { cats: { 1: 6 }, html: /(<!\-\-Powered by nopCommerce|Powered by: <a[^>]+nopcommerce)/i },
@ -146,7 +151,7 @@ if ( typeof wappalyzer != 'undefined' ) {
'Prestashop': { cats: { 1: 6 }, html: /(<meta name=("|')generator("|') [^>]+PrestaShop|Powered by <a href=("|')[^>]+PrestaShop)/i }, 'Prestashop': { cats: { 1: 6 }, html: /(<meta name=("|')generator("|') [^>]+PrestaShop|Powered by <a href=("|')[^>]+PrestaShop)/i },
'Prototype': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*(prototype|protoaculous)\.js("|')/i, env: /^Prototype$/ }, 'Prototype': { cats: { 1: 12 }, html: /<script[^>]* src=("|')[^>]*(prototype|protoaculous)\.js("|')/i, env: /^Prototype$/ },
'punBB': { cats: { 1: 2 }, html: /Powered by <a href=("|')[^>]+punbb/i }, 'punBB': { cats: { 1: 2 }, html: /Powered by <a href=("|')[^>]+punbb/i },
'Quantcast': { cats: { 1: 10 }, html: /<script[^>]* src=("|')http:\/\/edge\.quantserve\.com\/quant\.js("|')>/i }, 'Quantcast': { cats: { 1: 10 }, html: /<script[^>]* src=("|')http:\/\/edge\.quantserve\.com\/quant\.js("|')>/i, env: /^quantserve$/ },
'Quick.Cart': { cats: { 1: 6 }, html: /<a href="[^>]+opensolution\.org\/">Powered by/i }, 'Quick.Cart': { cats: { 1: 6 }, html: /<a href="[^>]+opensolution\.org\/">Powered by/i },
'reCAPTCHA': { cats: { 1: 16 }, html: /(<div[^>]+id=("|')recaptcha_image|<script[^>]+ src=("|')(api\-secure\.recaptcha\.net|recaptcha_ajax\.js))/ }, 'reCAPTCHA': { cats: { 1: 16 }, html: /(<div[^>]+id=("|')recaptcha_image|<script[^>]+ src=("|')(api\-secure\.recaptcha\.net|recaptcha_ajax\.js))/ },
'Reddit': { cats: { 1: 2 }, html: /(<script[^>]+>var reddit = {|<a[^>]+Powered by Reddit|powered by <a[^>]+>reddit<)/i, url: /^(www.)?reddit\.com/ }, 'Reddit': { cats: { 1: 2 }, html: /(<script[^>]+>var reddit = {|<a[^>]+Powered by Reddit|powered by <a[^>]+>reddit<)/i, url: /^(www.)?reddit\.com/ },

@ -1,5 +1,6 @@
(function() { (function() {
self = { self = {
element: false,
prevUrl: '', prevUrl: '',
init: function() { init: function() {
@ -65,10 +66,31 @@
try { try {
var element = content.document.createElement('wappalyzerData'); var element = content.document.createElement('wappalyzerData');
element.setAttribute('id', 'wappalyzerData'); element.setAttribute('id', 'wappalyzerData');
element.setAttribute('style', 'display: none');
content.document.documentElement.appendChild(element);
content.location.href = 'javascript:' +
'(function() {' +
'try {' +
'var event = document.createEvent("Events");' +
'event.initEvent("wappalyzerEvent", true, false);' +
'var environmentVars = "";' +
'for ( var i in window ) environmentVars += i + " ";' +
'document.getElementById("wappalyzerData").appendChild(document.createComment(environmentVars));' +
'document.getElementById("wappalyzerData").dispatchEvent(event);' +
'}' +
'catch(e) { }' +
'})();';
element.addEventListener('wappalyzerEvent', (function(event) { element.addEventListener('wappalyzerEvent', (function(event) {
environmentVars = event.target.innerHTML.split(' '); environmentVars = event.target.childNodes[0].nodeValue;
self.log('getEnvironmentVars: ' + environmentVars); self.log('getEnvironmentVars: ' + environmentVars);
@ -78,25 +100,9 @@
href: content.document.location.href, href: content.document.location.href,
html: content.document.documentElement.innerHTML, html: content.document.documentElement.innerHTML,
headers: [], headers: [],
environmentVars: environmentVars environmentVars: environmentVars.split(' ')
}); });
}), true); }), true);
content.document.documentElement.appendChild(element);
content.location.href = 'javascript:' +
'(function() {' +
'try {' +
'for ( i in window ) {' +
'window.document.getElementById("wappalyzerData").innerHTML += i + " ";' +
'}' +
'var event = document.createEvent("Events");' + 'event.initEvent("wappalyzerEvent", true, false);' +
'document.getElementById("wappalyzerData").dispatchEvent(event);' +
'}' +
'catch(e) { }' +
'})();';
} }
catch(e) { } catch(e) { }
@ -105,4 +111,6 @@
} }
self.init(); self.init();
return app;
})(); })();

@ -16,9 +16,9 @@
<prefpane label="&wappalyzer.options;"> <prefpane label="&wappalyzer.options;">
<preferences> <preferences>
<preference id="wappalyzer-location" name="wappalyzer.location" type="int" /> <preference id="wappalyzer-location" name="wappalyzer.location" type="int" />
<preference id="wappalyzer-auto-detect" name="wappalyzer.autoDetect" type="bool" />
<preference id="wappalyzer-enable-tracking" name="wappalyzer.enableTracking" type="bool" /> <preference id="wappalyzer-enable-tracking" name="wappalyzer.enableTracking" type="bool" />
<preference id="wappalyzer-show-apps" name="wappalyzer.showApps" type="int" /> <preference id="wappalyzer-show-apps" name="wappalyzer.showApps" type="int" />
<preference id="wappalyzer-popup" name="wappalyzer.popupOnHover" type="bool" />
<preference id="wappalyzer-custom-apps" name="wappalyzer.customApps" type="string"/> <preference id="wappalyzer-custom-apps" name="wappalyzer.customApps" type="string"/>
<preference id="wappalyzer-cat1" name="wappalyzer.cat1" type="bool" /> <preference id="wappalyzer-cat1" name="wappalyzer.cat1" type="bool" />
<preference id="wappalyzer-cat2" name="wappalyzer.cat2" type="bool" /> <preference id="wappalyzer-cat2" name="wappalyzer.cat2" type="bool" />
@ -87,6 +87,19 @@
</menulist> </menulist>
</hbox> </hbox>
</row> </row>
<row>
<hbox align="center">
<label control="wappalyzer-popup" value="&wappalyzer.popupOnHover;:"/>
</hbox>
<hbox align="center">
<menulist preference="wappalyzer-popup" id="wappalyzer-popup">
<menupopup>
<menuitem label="&wappalyzer.onHover;" value="true" />
<menuitem label="&wappalyzer.onClick;" value="false"/>
</menupopup>
</menulist>
</hbox>
</row>
</rows> </rows>
</grid> </grid>

@ -4,7 +4,6 @@ var wappalyzer = (function() {
self = { self = {
apps: {}, apps: {},
appsDetected: 0, appsDetected: 0,
autoDetect: true,
browser: false, browser: false,
cats: {}, cats: {},
checkUnique: {}, checkUnique: {},
@ -17,6 +16,7 @@ var wappalyzer = (function() {
homeUrl: 'http://wappalyzer.com/', homeUrl: 'http://wappalyzer.com/',
hoverTimeout: false, hoverTimeout: false,
newInstall: false, newInstall: false,
popupOnHover: true,
prevUrl: '', prevUrl: '',
prefs: {}, prefs: {},
regexBlacklist: /(dev\.|\/admin|\.local)/, regexBlacklist: /(dev\.|\/admin|\.local)/,
@ -26,6 +26,7 @@ var wappalyzer = (function() {
showApps: 1, showApps: 1,
showCats: [], showCats: [],
strings: {}, strings: {},
twitterUrl: 'https://twitter.com/Wappalyzer',
version: '', version: '',
init: function() { init: function() {
@ -42,10 +43,10 @@ var wappalyzer = (function() {
self.prefs.addObserver('', wappalyzer, false); self.prefs.addObserver('', wappalyzer, false);
self.showApps = self.prefs.getIntPref( 'showApps'); self.showApps = self.prefs.getIntPref( 'showApps');
self.autoDetect = self.prefs.getBoolPref('autoDetect');
self.customApps = self.prefs.getCharPref('customApps'); self.customApps = self.prefs.getCharPref('customApps');
self.debug = self.prefs.getBoolPref('debug'); self.debug = self.prefs.getBoolPref('debug');
self.enableTracking = self.prefs.getBoolPref('enableTracking'); self.enableTracking = self.prefs.getBoolPref('enableTracking');
self.popupOnHover = self.prefs.getBoolPref('popupOnHover');
self.newInstall = self.prefs.getBoolPref('newInstall'); self.newInstall = self.prefs.getBoolPref('newInstall');
self.version = self.prefs.getCharPref('version'); self.version = self.prefs.getCharPref('version');
@ -57,28 +58,28 @@ var wappalyzer = (function() {
self.moveLocation(locationPref); self.moveLocation(locationPref);
// Open page after upgrade // Open page after installation
try { if ( self.newInstall ) {
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); self.prefs.setBoolPref('newInstall', false);
var enabledItems = prefs.getCharPref('extensions.enabledAddons'); gBrowser.addEventListener('DOMContentLoaded', self.installSuccess, false);
var version = enabledItems.replace(/(^.*wappalyzer[^:]+:)([^,]+),.*$/, '$2'); } else {
// Open page after upgrade
try {
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
if ( version && self.version != version ) { var enabledItems = prefs.getCharPref('extensions.enabledAddons');
self.browser.addEventListener('load', self.upgradeSuccess, false); var version = enabledItems.replace(/(^.*wappalyzer[^:]+:)([^,]+),.*$/, '$2');
self.version = version; if ( version && self.version != version ) {
gBrowser.addEventListener('DOMContentLoaded', self.upgradeSuccess, false);
self.prefs.setCharPref('version', self.version); self.version = version;
}
}
catch(e) { }
// Open page after installation self.prefs.setCharPref('version', self.version);
if ( self.newInstall ) { }
self.prefs.setBoolPref('newInstall', false); }
catch(e) { }
self.browser.addEventListener('load', self.installSuccess, false);
} }
// Listen messages sent from the content process // Listen messages sent from the content process
@ -113,10 +114,6 @@ var wappalyzer = (function() {
} }
switch(data) { switch(data) {
case 'autoDetect':
self.autoDetect = self.prefs.getBoolPref('autoDetect');
break;
case 'customApps': case 'customApps':
self.customApps = self.prefs.getCharPref('customApps'); self.customApps = self.prefs.getCharPref('customApps');
@ -128,6 +125,12 @@ var wappalyzer = (function() {
case 'enableTracking': case 'enableTracking':
self.enableTracking = self.prefs.getBoolPref('enableTracking'); self.enableTracking = self.prefs.getBoolPref('enableTracking');
break;
case 'popupOnHover':
self.popupOnHover = self.prefs.getBoolPref('popupOnHover');
self.moveLocation();
break; break;
case 'showApps': case 'showApps':
self.showApps = self.prefs.getIntPref('showApps'); self.showApps = self.prefs.getIntPref('showApps');
@ -192,6 +195,16 @@ var wappalyzer = (function() {
var e = document.getElementById(containerId); var e = document.getElementById(containerId);
var container = document.getElementById('wappalyzer-container'); var container = document.getElementById('wappalyzer-container');
if ( self.popupOnHover ) {
container.addEventListener('mouseover', function() {
self.hoverTimeout = setTimeout(function() {
document.getElementById('wappalyzer-apps').openPopup(document.getElementById('wappalyzer-container'), 'after_end');
}, 200);
}, false);
container.addEventListener('mouseout', function() { clearTimeout(self.hoverTimeout); }, false);
}
e.appendChild(container); e.appendChild(container);
}, },
@ -210,8 +223,7 @@ var wappalyzer = (function() {
target.documentElement.innerHTML, target.documentElement.innerHTML,
[], [],
[], [],
true, true
false
); );
}, },
@ -224,8 +236,7 @@ var wappalyzer = (function() {
message.json.html, message.json.html,
message.json.headers, message.json.headers,
message.json.environmentVars, message.json.environmentVars,
true, true
false
); );
}, },
@ -246,7 +257,6 @@ var wappalyzer = (function() {
doc.documentElement ? doc.documentElement.innerHTML : '', doc.documentElement ? doc.documentElement.innerHTML : '',
[], [],
[], [],
false,
false false
); );
}, },
@ -284,7 +294,7 @@ var wappalyzer = (function() {
onSecurityChange: function(a, b, c) {} onSecurityChange: function(a, b, c) {}
}, },
analyzePage: function(doc, href, html, headers, environmentVars, doCount, manualDetect) { analyzePage: function(doc, href, html, headers, environmentVars, doCount) {
self.log('analyzePage'); self.log('analyzePage');
self.currentTab = false; self.currentTab = false;
@ -303,83 +313,81 @@ var wappalyzer = (function() {
html = ''; html = '';
} }
if ( self.autoDetect || ( !self.autoDetect && manualDetect ) ) { // Prevent large documents from slowing things down
// Prevent large documents from slowing things down if ( html.length > 50000 ) {
if ( html.length > 50000 ) { html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length);
html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length); }
}
// Scan URL, domain and response headers for patterns // Scan URL, domain and response headers for patterns
if ( html ) { if ( html || self.request ) {
// Check cached application names // Check cached application names
if ( doc && typeof doc.detectedApps != 'undefined' ) { if ( doc && typeof doc.detectedApps != 'undefined' ) {
for ( i in doc.detectedApps ) { for ( i in doc.detectedApps ) {
var appName = doc.detectedApps[i]; var appName = doc.detectedApps[i];
if ( typeof self.checkUnique[appName] == 'undefined' ) { if ( typeof self.checkUnique[appName] == 'undefined' ) {
self.log('CACHE'); // self.log('CACHE'); //
self.showApp(appName, doc, href, doCount); self.showApp(appName, doc, href, doCount);
self.checkUnique[appName] = true; self.checkUnique[appName] = true;
}
} }
} }
}
for ( var appName in self.apps ) { for ( var appName in self.apps ) {
// Don't scan for apps that have already been detected // Don't scan for apps that have already been detected
if ( typeof self.checkUnique[appName] == 'undefined' ) { if ( typeof self.checkUnique[appName] == 'undefined' ) {
// Scan HTML // Scan HTML
if ( typeof self.apps[appName].html != 'undefined' ) { if ( html && typeof self.apps[appName].html != 'undefined' ) {
var regex = self.apps[appName].html; var regex = self.apps[appName].html;
if ( regex.test(html) ) { if ( regex.test(html) ) {
self.showApp(appName, doc, href, doCount); self.showApp(appName, doc, href, doCount);
}
} }
}
// Scan URL // Scan URL
if ( href && typeof self.apps[appName].url != 'undefined' ) { if ( href && typeof self.apps[appName].url != 'undefined' ) {
var regex = self.apps[appName].url; var regex = self.apps[appName].url;
if ( regex.test(href) ) { if ( regex.test(href) ) {
self.showApp(appName, doc, href, doCount); self.showApp(appName, doc, href, doCount);
}
} }
}
// Scan response headers // Scan response headers
if ( typeof self.apps[appName].headers != 'undefined' && self.request ) { if ( typeof self.apps[appName].headers != 'undefined' && self.request ) {
for ( var header in self.apps[appName].headers ) { for ( var header in self.apps[appName].headers ) {
var regex = self.apps[appName].headers[header]; var regex = self.apps[appName].headers[header];
try { try {
if ( regex.test(self.request.nsIHttpChannel.getResponseHeader(header)) ) { if ( regex.test(self.request.nsIHttpChannel.getResponseHeader(header)) ) {
self.showApp(appName, doc, href, doCount); self.showApp(appName, doc, href, doCount);
}
} }
catch(e) { }
} }
catch(e) { }
} }
}
// Scan environment variables // Scan environment variables
if ( environmentVars && typeof self.apps[appName].env != 'undefined' ) { if ( environmentVars && typeof self.apps[appName].env != 'undefined' ) {
var regex = self.apps[appName].env; var regex = self.apps[appName].env;
for ( var i in environmentVars ) { for ( var i in environmentVars ) {
try { try {
if ( regex.test(environmentVars[i]) ) { if ( regex.test(environmentVars[i]) ) {
self.showApp(appName, doc, href, doCount); self.showApp(appName, doc, href, doCount);
}
} }
catch(e) { }
} }
catch(e) { }
} }
} }
} }
} }
html = ''; // Free memory
} }
html = ''; // Free memory
}, },
showApp: function(detectedApp, doc, href, doCount) { showApp: function(detectedApp, doc, href, doCount) {
@ -410,38 +418,36 @@ var wappalyzer = (function() {
if ( show && self.currentTab ) { if ( show && self.currentTab ) {
var e = document.getElementById('wappalyzer-detected-apps'); var e = document.getElementById('wappalyzer-detected-apps');
if ( self.autoDetect ) { if ( self.showApps == 2 ) {
if ( self.showApps == 2 ) { document.getElementById('wappalyzer-icon').setAttribute('src', 'chrome://wappalyzer/skin/icon16x16_hot.ico');
document.getElementById('wappalyzer-icon').setAttribute('src', 'chrome://wappalyzer/skin/icon16x16_hot.ico');
document.getElementById('wappalyzer-detected-apps').style.display = 'none';
}
else {
// Hide Wappalyzer icon
document.getElementById('wappalyzer-icon').style.display = 'none';
document.getElementById('wappalyzer-detected-apps').style.display = ''; document.getElementById('wappalyzer-detected-apps').style.display = 'none';
} }
else {
// Hide Wappalyzer icon
document.getElementById('wappalyzer-icon').style.display = 'none';
// Show app icon and label document.getElementById('wappalyzer-detected-apps').style.display = '';
var child = document.createElement('image'); }
if ( typeof self.apps[detectedApp].icon == 'string' ) { // Show app icon and label
child.setAttribute('src', self.apps[detectedApp].icon); var child = document.createElement('image');
}
else {
child.setAttribute('src', 'chrome://wappalyzer/skin/icons/' + detectedApp + '.ico');
}
child.setAttribute('class', 'wappalyzer-icon'); if ( typeof self.apps[detectedApp].icon == 'string' ) {
child.setAttribute('src', self.apps[detectedApp].icon);
}
else {
child.setAttribute('src', 'chrome://wappalyzer/skin/icons/' + detectedApp + '.ico');
}
if ( self.appsDetected ) { child.setAttribute('class', 'wappalyzer-icon');
child.setAttribute('style', 'margin-left: .5em');
}
e.appendChild(child); if ( self.appsDetected ) {
child.setAttribute('style', 'margin-left: .5em');
} }
e.appendChild(child);
if ( self.showApps == 0 ) { if ( self.showApps == 0 ) {
var child = document.createElement('label'); var child = document.createElement('label');
@ -622,7 +628,7 @@ var wappalyzer = (function() {
installSuccess: function() { installSuccess: function() {
self.log('installSuccess'); self.log('installSuccess');
self.browser.removeEventListener('load', self.installSuccess, false); gBrowser.removeEventListener('DOMContentLoaded', self.installSuccess, false);
self.openTab(self.homeUrl + 'install/success/'); self.openTab(self.homeUrl + 'install/success/');
}, },
@ -630,7 +636,7 @@ var wappalyzer = (function() {
upgradeSuccess: function() { upgradeSuccess: function() {
self.log('upgradeSuccess'); self.log('upgradeSuccess');
self.browser.removeEventListener('load', self.upgradeSuccess, false); gBrowser.removeEventListener('DOMContentLoaded', self.upgradeSuccess, false);
self.openTab(self.homeUrl + 'install/upgraded/'); self.openTab(self.homeUrl + 'install/upgraded/');
} }

@ -18,8 +18,6 @@
id="wappalyzer-container" id="wappalyzer-container"
context="wappalyzer-menu" context="wappalyzer-menu"
popup="wappalyzer-apps" popup="wappalyzer-apps"
onmouseover="wappalyzer.hoverTimeout = setTimeout(function() { document.getElementById('wappalyzer-apps').openPopup(document.getElementById('wappalyzer-container'), 'after_end'); }, 200);"
onmouseout="clearTimeout(wappalyzer.hoverTimeout);"
> >
<image <image
id="wappalyzer-icon" id="wappalyzer-icon"
@ -38,6 +36,7 @@
<menuseparator/> <menuseparator/>
<menuitem label="&wappalyzer.donate;" oncommand="wappalyzer.openTab(wappalyzer.homeUrl + 'donate/');"/> <menuitem label="&wappalyzer.donate;" oncommand="wappalyzer.openTab(wappalyzer.homeUrl + 'donate/');"/>
<menuitem label="&wappalyzer.feedback;" oncommand="wappalyzer.openTab(wappalyzer.homeUrl + '?redirect=feedback');"/> <menuitem label="&wappalyzer.feedback;" oncommand="wappalyzer.openTab(wappalyzer.homeUrl + '?redirect=feedback');"/>
<menuitem label="&wappalyzer.twitter;" oncommand="wappalyzer.openTab(wappalyzer.twitterUrl);"/>
<menuitem label="&wappalyzer.home;" oncommand="wappalyzer.openTab(wappalyzer.homeUrl);"/> <menuitem label="&wappalyzer.home;" oncommand="wappalyzer.openTab(wappalyzer.homeUrl);"/>
</menupopup> </menupopup>
</hbox> </hbox>

@ -11,7 +11,11 @@
<!ENTITY wappalyzer.labels "Icons, text and popup"> <!ENTITY wappalyzer.labels "Icons, text and popup">
<!ENTITY wappalyzer.icons "Icons and popup"> <!ENTITY wappalyzer.icons "Icons and popup">
<!ENTITY wappalyzer.popup "Popup only"> <!ENTITY wappalyzer.popup "Popup only">
<!ENTITY wappalyzer.popupOnHover "Show popup">
<!ENTITY wappalyzer.onHover "On hover and click">
<!ENTITY wappalyzer.onClick "On click only">
<!ENTITY wappalyzer.categories "Categories"> <!ENTITY wappalyzer.categories "Categories">
<!ENTITY wappalyzer.twitter "Twitter">
<!ENTITY wappalyzer.home "Go to Wappalyzer"> <!ENTITY wappalyzer.home "Go to Wappalyzer">
<!ENTITY wappalyzer.privacy "Privacy"> <!ENTITY wappalyzer.privacy "Privacy">
<!ENTITY wappalyzer.donate "Donate"> <!ENTITY wappalyzer.donate "Donate">

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -6,6 +6,7 @@ pref('wappalyzer.newInstall', true);
pref('wappalyzer.showApps', 1); pref('wappalyzer.showApps', 1);
pref('wappalyzer.customApps', ''); pref('wappalyzer.customApps', '');
pref('wappalyzer.version', ''); pref('wappalyzer.version', '');
pref('wappalyzer.popupOnHover', true);
pref('wappalyzer.cat1', true); pref('wappalyzer.cat1', true);
pref('wappalyzer.cat2', true); pref('wappalyzer.cat2', true);

@ -1,11 +1,9 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!--DOCTYPE overlay SYSTEM "chrome://wappalyzer/locale/overlay.dtd"-->
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest"> <Description about="urn:mozilla:install-manifest">
<em:id>wappalyzer@crunchlabz.com</em:id> <em:id>wappalyzer@crunchlabz.com</em:id>
<em:version>1.15.2</em:version> <em:version>1.16.0</em:version>
<em:type>2</em:type> <em:type>2</em:type>
<em:unpack>true</em:unpack> <em:unpack>true</em:unpack>

Binary file not shown.