|
|
@ -1,6 +1,8 @@
|
|
|
|
"use strict";
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
(function() {
|
|
|
|
|
|
|
|
var lastEnv = null;
|
|
|
|
|
|
|
|
|
|
|
|
addEventListener('DOMContentLoaded', function() {
|
|
|
|
addEventListener('DOMContentLoaded', function() {
|
|
|
|
removeEventListener('DOMContentLoaded', onLoad, false);
|
|
|
|
removeEventListener('DOMContentLoaded', onLoad, false);
|
|
|
|
|
|
|
|
|
|
|
@ -8,10 +10,16 @@
|
|
|
|
}, false);
|
|
|
|
}, false);
|
|
|
|
|
|
|
|
|
|
|
|
function onLoad() {
|
|
|
|
function onLoad() {
|
|
|
|
if ( content.document.contentType != 'text/html' ) { return };
|
|
|
|
if ( content.document.contentType != 'text/html' ) { return; }
|
|
|
|
|
|
|
|
|
|
|
|
content.document.documentElement.addEventListener('load', function() {
|
|
|
|
content.document.documentElement.addEventListener('load', function() {
|
|
|
|
|
|
|
|
var env = Object.keys(content.wrappedJSObject);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( env.join() !== lastEnv ) {
|
|
|
|
|
|
|
|
lastEnv = env.join();
|
|
|
|
|
|
|
|
|
|
|
|
sendAsyncMessage('wappalyzer', { env: Object.keys(content.wrappedJSObject) });
|
|
|
|
sendAsyncMessage('wappalyzer', { env: Object.keys(content.wrappedJSObject) });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
removeEventListener('load', onLoad, true);
|
|
|
|
removeEventListener('load', onLoad, true);
|
|
|
|
}, true);
|
|
|
|
}, true);
|
|
|
@ -31,7 +39,6 @@
|
|
|
|
sendAsyncMessage('wappalyzer', {
|
|
|
|
sendAsyncMessage('wappalyzer', {
|
|
|
|
hostname: content.location.hostname,
|
|
|
|
hostname: content.location.hostname,
|
|
|
|
html: html,
|
|
|
|
html: html,
|
|
|
|
env: Object.keys(content.wrappedJSObject),
|
|
|
|
|
|
|
|
url: content.location.href
|
|
|
|
url: content.location.href
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|