(function() { if ( wappalyzer == null ) return; var w = wappalyzer; w.driver = { /** * Log messages to console */ log: function(args) { if ( console != null ) console[args.type](args.message); }, /** * Initialize */ init: function() { var env = new Array; for ( var i in top ) env.push(i); window.document.addEventListener('DOMContentLoaded', function() { w.analyze(top.location.host, top.location.href, { html: top.document.documentElement.innerHTML, env: env }); }); }, /** * Display apps */ displayApps: function() { var url = top.location.href; $('#apps').html('Close'); if ( w.detected[url] != null && w.detected[url].length ) { w.detected[url].map(function(app, i) { var html = '
' + '' + '' + ' ' + app + '' + '' ; for ( cat in w.apps[app].cats ) { html += '' + w.categories[w.apps[app].cats[cat]].name + '' ; } html += '
'; }); } else { html = '
No applications detected
'; } $('#apps').append(html); $('#wappalyzer-bookmarklet', top.document.body).height($('#apps').height() + 2); }, /** * Go to URL */ goToURL: function(args) { window.open(args.url); } }; w.init(); })();