You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
657 B
32 lines
657 B
(function() {
|
|
var lastEnv = [];
|
|
|
|
if ( document.contentType === 'text/html' ) {
|
|
var
|
|
html = document.documentElement.outerHTML
|
|
env = [];
|
|
|
|
self.port.emit('log', 'init');
|
|
|
|
if ( html.length > 50000 ) {
|
|
html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length);
|
|
}
|
|
|
|
self.port.emit('analyze', {
|
|
hostname: location.hostname,
|
|
url: location.href,
|
|
analyze: { html: html }
|
|
});
|
|
|
|
setTimeout(function() {
|
|
var env = Object.keys(unsafeWindow).slice(0, 500);
|
|
|
|
self.port.emit('analyze', {
|
|
hostname: location.hostname,
|
|
url: location.href,
|
|
analyze: { env: env }
|
|
});
|
|
}, 1000);
|
|
}
|
|
}());
|