(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 ( i in window ) 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; document.getElementById('wappalyzer-iframe').contentDocument.body.innerHTML = '' + '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
'; } document.getElementById('wappalyzer-iframe').contentDocument.body.innerHTML += html; document.getElementById('wappalyzer-iframe').style.height = 300; }, /** * Go to URL */ goToURL: function(args) { window.open(args.url); } }; w.init(); })();