diff --git a/drivers/bookmarklet/index.html b/drivers/bookmarklet/index.html
index 4c74e5d7d..a550be879 100644
--- a/drivers/bookmarklet/index.html
+++ b/drivers/bookmarklet/index.html
@@ -40,42 +40,55 @@
(function() {
- var exists = window.document.getElementById('wappalyzer-container');
+ var
+ d = document,
+ e = d.getElementById('wappalyzer-container')
+ ;
- if ( exists !== null ) { window.document.body.removeChild(exists); }
+ if ( e !== null ) { d.body.removeChild(e); }
var
- url = 'http://wappalyzer.com/bookmarklet/',
- d = window.document,
- container = d.createElement('div'),
- pending = d.createElement('div'),
- style = d.createElement('link'),
- script1 = d.createElement('script'),
- script2 = d.createElement('script'),
- script3 = d.createElement('script')
+ u = 'http://wappalyzer.com/bookmarklet/',
+ t = new Date().getTime(),
+ c = d.createElement('div'),
+ p = d.createElement('div'),
+ l = d.createElement('link'),
+ s = d.createElement('script')
;
- container.setAttribute('id', 'wappalyzer-container');
+ c.setAttribute('id', 'wappalyzer-container');
+
+ l.setAttribute('rel', 'stylesheet');
+ l.setAttribute('href', u + 'css/wappalyzer.css');
+
+ d.head.appendChild(l);
+
+ p.setAttribute('id', 'wappalyzer-pending');
+ p.setAttribute('style', 'background-image: url(' + u + 'images/pending.gif) !important');
+
+ c.appendChild(p);
+
+ s.setAttribute('src', u + 'js/wappalyzer.js?' + t);
+
+ s.onload = function() {
+ s = d.createElement('script');
- pending .setAttribute('id', 'wappalyzer-pending');
- pending .setAttribute('style', 'background-image: url(' + url + 'images/pending.gif) !important');
+ s.setAttribute('src', u + 'js/apps.js?' + t);
- style.setAttribute('rel', 'stylesheet');
- style.setAttribute('href', url + 'css/wappalyzer.css');
+ s.onload = function() {
+ s = d.createElement('script');
- script1.setAttribute('src', url + 'js/wappalyzer.js');
- script2.setAttribute('src', url + 'js/apps.js');
- script3.setAttribute('src', url + 'js/driver.js');
+ s.setAttribute('src', u + 'js/driver.js?' + t);
- d.head.appendChild(style);
+ c.appendChild(s);
+ };
- container.appendChild(pending);
+ c.appendChild(s);
+ };
- container.appendChild(script1);
- container.appendChild(script2);
- container.appendChild(script3);
+ c.appendChild(s);
- d.body.appendChild(container);
+ d.body.appendChild(c);
})();
diff --git a/drivers/bookmarklet/js/driver.js b/drivers/bookmarklet/js/driver.js
index 8f0c292cb..eb5d2db9e 100644
--- a/drivers/bookmarklet/js/driver.js
+++ b/drivers/bookmarklet/js/driver.js
@@ -70,10 +70,7 @@
for ( i in window ) { env.push(i); }
- w.analyze(domain, url, {
- html: d.documentElement.innerHTML,
- env: env
- });
+ w.analyze(domain, url, { html: d.documentElement.innerHTML, env: env });
},
getResponseHeaders: function() {
@@ -101,9 +98,7 @@
}
});
- w.analyze(domain, url, {
- headers: responseHeaders
- });
+ w.analyze(domain, url, { headers: responseHeaders });
}
}
}
@@ -115,6 +110,8 @@
* Display apps
*/
displayApps: function() {
+ w.log('func: diplayApps');
+
var
category,
html
@@ -127,7 +124,7 @@
''
;
- if ( false && w.detected[url] != null && w.detected[url].length ) {
+ if ( w.detected[url] != null && w.detected[url].length ) {
w.detected[url].map(function(app, i) {
html +=
'
' +