From 70ed691ffa0064c6b8e2bf3543628d7441615d4b Mon Sep 17 00:00:00 2001 From: ElbertF Date: Sun, 8 Jan 2012 13:26:17 +1100 Subject: [PATCH] Work on bookmarklet driver --- drivers/bookmarklet/bookmarklet.html | 24 ++++++++++++++++++++---- drivers/bookmarklet/index.html | 5 ----- drivers/bookmarklet/js/driver.js | 12 ++++++++---- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/drivers/bookmarklet/bookmarklet.html b/drivers/bookmarklet/bookmarklet.html index 893cf2334..bae7d0099 100644 --- a/drivers/bookmarklet/bookmarklet.html +++ b/drivers/bookmarklet/bookmarklet.html @@ -28,13 +28,17 @@ - - - - -
diff --git a/drivers/bookmarklet/js/driver.js b/drivers/bookmarklet/js/driver.js index a7ce85064..70c6ce179 100644 --- a/drivers/bookmarklet/js/driver.js +++ b/drivers/bookmarklet/js/driver.js @@ -17,7 +17,7 @@ init: function() { var env = new Array; - for ( var i in top ) env.push(i); + for ( i in window ) env.push(i); window.document.addEventListener('DOMContentLoaded', function() { w.analyze(top.location.host, top.location.href, { @@ -33,7 +33,11 @@ displayApps: function() { var url = top.location.href; - $('#apps').html('
Close'); + document.getElementById('wappalyzer-iframe').contentDocument.body.innerHTML = + '' + + 'Close' + + '' + ; if ( w.detected[url] != null && w.detected[url].length ) { w.detected[url].map(function(app, i) { @@ -60,9 +64,9 @@ html = '
No applications detected
'; } - $('#apps').append(html); + document.getElementById('wappalyzer-iframe').contentDocument.body.innerHTML += html; - $('#wappalyzer-bookmarklet', top.document.body).height($('#apps').height() + 2); + document.getElementById('wappalyzer-iframe').style.height = 300; }, /**