diff --git a/adapters/firefox/content/js/adapter.js b/adapters/firefox/content/js/adapter.js index 46347c6e8..e398528fb 100644 --- a/adapters/firefox/content/js/adapter.js +++ b/adapters/firefox/content/js/adapter.js @@ -72,14 +72,14 @@ // Get response headers onStateChange: function(progress, request, flags, status) { - if ( request.nsIHttpChannel != null && flags & Components.interfaces.nsIWebProgressListener.STATE_STOP ) { + if ( request && request.nsIHttpChannel && flags & Components.interfaces.nsIWebProgressListener.STATE_STOP ) { var headers = new Object(); request.nsIHttpChannel.visitResponseHeaders(function(header, value) { headers[header] = value; }); - w.analyze(progress.currentURI.host, progress.currentURI.spec, { headers: headers }); + if ( progress.currentURI ) w.analyze(progress.currentURI.host, progress.currentURI.spec, { headers: headers }); } } }); @@ -90,7 +90,8 @@ }); }; - window.addEventListener('load', handler, false); + window.addEventListener('load', handler, false); + window.addEventListener('unload', w.adapter.track, false); }, /** @@ -180,7 +181,55 @@ */ goToURL: function(args) { gBrowser.selectedTab = gBrowser.addTab(args.url); - } + }, + + /** + * Anonymously track detected applications + */ + track: function() { + if ( prefs.getBoolPref('tracking') ) { + var report = ''; + + if ( w.history ) { + for ( hostname in w.history ) { + report += '[' + hostname; + + w.history[hostname].map(function(data) { + report += '|' + data.app + ':' + data.hits; + }); + + report += ']'; + }; + + // Make POST request + var request = new XMLHttpRequest(); + + request.open('POST', w.config.websiteURL + 'report/', true); + + request.channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE; + + request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + + request.onreadystatechange = function(e) { + if ( request.readyState == 4 ) { + if ( request.status == 200 ) { + w.history = new Object(); + + w.log('w.adapter.track: ' + report); + } + + report = ''; + + if ( request.close ) request.close(); + + request = false; + } + }; + + request.send('d=' + encodeURIComponent(report)); + } + } + }, }; /** diff --git a/share/images/icons/Chameleon.ico b/share/images/icons/Chameleon.ico new file mode 100644 index 000000000..53cb2873f Binary files /dev/null and b/share/images/icons/Chameleon.ico differ diff --git a/share/images/icons/Drupal Commerce.ico b/share/images/icons/Drupal Commerce.ico new file mode 100644 index 000000000..52184b3a3 Binary files /dev/null and b/share/images/icons/Drupal Commerce.ico differ diff --git a/share/images/icons/Google App Engine.ico b/share/images/icons/Google App Engine.ico new file mode 100644 index 000000000..ee7c943ab Binary files /dev/null and b/share/images/icons/Google App Engine.ico differ diff --git a/share/images/icons/Jo.ico b/share/images/icons/Jo.ico new file mode 100644 index 000000000..c4252f6a7 Binary files /dev/null and b/share/images/icons/Jo.ico differ diff --git a/share/images/icons/OpenGSE.ico b/share/images/icons/OpenGSE.ico new file mode 100644 index 000000000..ee7c943ab Binary files /dev/null and b/share/images/icons/OpenGSE.ico differ diff --git a/share/images/icons/OpenLayers.ico b/share/images/icons/OpenLayers.ico new file mode 100644 index 000000000..975e1cb0d Binary files /dev/null and b/share/images/icons/OpenLayers.ico differ diff --git a/share/images/icons/RequireJS.ico b/share/images/icons/RequireJS.ico new file mode 100644 index 000000000..760b81b96 Binary files /dev/null and b/share/images/icons/RequireJS.ico differ diff --git a/share/images/icons/Sencha Touch.ico b/share/images/icons/Sencha Touch.ico new file mode 100644 index 000000000..ea8c545bb Binary files /dev/null and b/share/images/icons/Sencha Touch.ico differ diff --git a/share/images/icons/UserRules.ico b/share/images/icons/UserRules.ico new file mode 100644 index 000000000..d4ac01bb3 Binary files /dev/null and b/share/images/icons/UserRules.ico differ diff --git a/share/images/icons/XUI.ico b/share/images/icons/XUI.ico new file mode 100644 index 000000000..39f2c6964 Binary files /dev/null and b/share/images/icons/XUI.ico differ diff --git a/share/images/icons/dojo.ico b/share/images/icons/dojo.ico index a75431e26..cfd5d1550 100644 Binary files a/share/images/icons/dojo.ico and b/share/images/icons/dojo.ico differ diff --git a/share/images/icons/jQTouch.ico b/share/images/icons/jQTouch.ico new file mode 100644 index 000000000..d4270825b Binary files /dev/null and b/share/images/icons/jQTouch.ico differ diff --git a/share/images/icons/jQuery Mobile.ico b/share/images/icons/jQuery Mobile.ico new file mode 100644 index 000000000..d4270825b Binary files /dev/null and b/share/images/icons/jQuery Mobile.ico differ diff --git a/share/images/icons/wink.ico b/share/images/icons/wink.ico new file mode 100644 index 000000000..c84560157 Binary files /dev/null and b/share/images/icons/wink.ico differ diff --git a/share/js/apps.js b/share/js/apps.js index c62d82a0d..bf2788be5 100644 --- a/share/js/apps.js +++ b/share/js/apps.js @@ -28,7 +28,8 @@ 22: { name: 'Web server', plural: 'Web servers' }, 23: { name: 'Cache tool', plural: 'Cache tools' }, 24: { name: 'Rich text editor', plural: 'Rich text editors' }, - 25: { name: 'Javascript Graphics', plural: 'Javascript Graphics' } + 25: { name: 'Javascript graphics', plural: 'Javascript graphics' }, + 26: { name: 'Mobile framework', plural: 'Mobile frameworks' } }; w.apps = { @@ -51,6 +52,7 @@ 'Blogger': { cats: { 1: 11 }, meta: { 'generator': /blogger/i }, url: /^(www.)?.+\.blogspot\.com/i }, 'Bugzilla': { cats: { 1: 13 }, html: /<[^>]+(id|title|name)=("|')bugzilla/i }, 'Burning Board': { cats: { 1: 2 }, html: /]+woltlab\.com.+Burning Board/i }, + 'Chameleon': { cats: { 1: 1 }, meta: { 'generator': /chameleon\-cms/i } }, 'chartbeat': { cats: { 1: 10 }, html: /function loadChartbeat\(\) {/i }, 'Chamilo': { cats: { 1: 21 }, meta: { 'generator': /Chamilo/i }, headers: { 'X-Powered-By': /Chamilo/ } }, 'Cherokee': { cats: { 1: 22 }, headers: { 'Server': /Cherokee/i } }, @@ -83,6 +85,7 @@ 'DotNetNuke': { cats: { 1: 1 }, meta: { 'generator': /DotNetNuke/i }, html: /]*(InstanceBeginEditable|Dreamweaver[^>]+target|DWLayoutDefaultTable)|function MM_preloadImages\(\) {)/ }, 'Drupal': { cats: { 1: 1 }, script: /drupal\.js/, html: /(jQuery\.extend\(Drupal\.settings, \{|Drupal\.extend\(\{ settings: \{|]+sites\/(default|all)\/themes\/|]+sites\/(default|all)\/(themes|modules)\/)/i, headers: { 'X-Drupal-Cache': /.*/, 'Expires': /19 Nov 1978/ }, env: /^Drupal$/ }, + 'Drupal Commerce': { cats: { 1: 6 }, html: /id\=\"block\-commerce\-cart\-cart|class\=\"commerce\-product\-field/i }, 'Dynamicweb': { cats: { 1: 1 }, meta: { 'generator': /Dynamicweb/i } }, 'e107': { cats: { 1: 1 }, script: /e107\.js/ }, 'Exhibit': { cats: { 1: 25 }, script: /exhibit.*\.js/, env: /^Exhibit$/ }, @@ -94,6 +97,7 @@ 'FrontPage': { cats: { 1: 20 }, meta: { '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\)/ }, 'Google Analytics': { cats: { 1: 10 }, script: /(\.google\-analytics\.com\/ga\.js|google-analytics\.com\/urchin\.js)/, env: /^gaGlobal$/ }, + 'Google App Engine': { cats: { 1: 22 }, headers: { 'Server': /Google Frontend/i } }, 'Google Font API': { cats: { 1: 17 }, html: /]* href=("|')http:\/\/fonts\.googleapis\.com/ }, 'Google Friend Connect': { cats: { 1: 5 }, script: /google.com\/friendconnect/ }, 'Google Maps': { cats: { 1: 5 }, script: /(maps\.google\.com\/maps\?file=api|maps\.google\.com\/maps\/api\/staticmap)/ }, @@ -108,11 +112,14 @@ 'iWeb': { cats: { 1: 20 }, meta: { 'generator': /iWeb/i } }, 'Jalios': { cats: { 1: 1 }, meta: { 'generator': /Jalios/i } }, 'Javascript Infovis Toolkit': { cats: { 1: 25 }, script: /jit.*\.js/, env: /^\$jit$/ }, + 'Jo': { cats: { 1: 26, 2: 12 }, script: /[^a-zA-Z]jo.*\.js/i }, 'Joomla': { cats: { 1: 1 }, meta: { 'generator': /Joomla/i }, html: /]+name=('|")JTLSHOP|]+OpenCart|route = getURLVar\(("|')route)/i }, 'openEngine': { cats: { 1: 1 }, html: /]+openEngine/i }, + 'OpenGSE': { cats: { 1: 22 }, headers: { 'Server': /GSE/i } }, + 'OpenLayers': { cats: { 1: 5 }, script: /openlayers/, env:/^OpenLayers$/ }, 'osCommerce': { cats: { 1: 6 }, html: /|]*(osCsid|cPath)/i }, 'osCSS': { cats: { 1: 6 }, html: /]+>var reddit = {|]+Powered by Reddit|powered by ]+>reddit<)/i, url: /^(www.)?reddit\.com/ }, 'Redmine': { cats: { 1: 13 }, meta: { 'description': /Redmine/i }, html: /Powered by ]+Redmine/i }, 'Reinvigorate': { cats: { 1: 10 }, html: /reinvigorate\.track\("/ }, + 'RequireJS': { cats: { 1: 12 }, script: /require.*\.js/ , env: /^requirejs$/}, 'S.Builder': { cats: { 1: 1 }, meta: { 'generator': /S\.Builder/i } }, 's9y': { cats: { 1: 1 }, meta: { 'generator': /Serendipity/i } }, 'script.aculo.us': { cats: { 1: 12 }, script: /(scriptaculous|protoaculous)\.js/, env: /^Scriptaculous$/ }, + 'Sencha Touch': { cats: { 1: 26, 2: 12}, script: /sencha\-touch.*\.js/ }, 'ShareThis': { cats: { 1: 5 }, script: /w\.sharethis\.com\// }, 'sIFR': { cats: { 1: 17 }, script: /sifr\.js/ }, 'Site Meter': { cats: { 1: 10 }, script: /sitemeter.com\/js\/counter\.js\?site=/ }, @@ -211,7 +222,8 @@ 'TYPO3': { cats: { 1: 1 }, meta: { 'generator': /TYPO3/i }, html: /(<(script[^>]* src|link[^>]* href)=[^>]*fileadmin)/i, url: /\/typo3/i }, 'Ubercart': { cats: { 1: 6 }, script: /uc_cart\/uc_cart_block\.js/ }, 'Umbraco': { cats: { 1: 1 }, headers: { 'X-Umbraco-Version': /.+/ } }, - 'Underscore.js': { cats: { 1: 12 }, script: /underscore.*\.js/, env: /^_.VERSION$/ }, + 'Underscore.js': { cats: { 1: 12 }, script: /underscore.*\.js/ }, + 'UserRules': { cats: { 1: 13 }, html: /var _usrp =/ , env: /^\_usrp$/ }, 'Vanilla': { cats: { 1: 2 }, html: /]+id=("|')DCSIMG("|')[^>]+webtrends/i }, + 'Webtrends': { cats: { 1: 10 }, html: /]+id=("|')DCSIMG("|')[^>]+webtrends/i, env: /WTOptimize/i }, 'Weebly': { cats: { 1: 1 }, html: /<[^>]+class=("|')weebly/i }, 'WikkaWiki': { cats: { 1: 8 }, meta: { 'generator': /WikkaWiki/ }, html: /Powered by ]+WikkaWiki/i }, + 'wink': { cats: { 1: 26, 2: 12 }, script: /(\_base\/js\/base|wink).*\.js/i, env:/^wink$/ }, 'Wolf CMS': { cats: { 1: 1 }, html: /]+wolfcms.org.+Wolf CMS.+inside/i }, 'Woopra': { cats: { 1: 10 }, script: /static\.woopra\.com/ }, 'WordPress': { cats: { 1: 1, 2: 11 }, meta: { 'generator': /WordPress/i }, html: /]+wp-content/i }, @@ -239,6 +252,7 @@ 'XenForo': { cats: { 1: 2 }, html: /(jQuery\.extend\(true, XenForo|Forum software by XenForo™|]+src=("|')[^>]+xiti.com\/hit.xiti/i }, 'XMB': { cats: { 1: 2 }, html: /