Fixed Firefox panel links and tabs.js error

main
Elbert Alias 11 years ago
parent ccb04dde94
commit aea6135586

@ -27,11 +27,13 @@
a.setAttribute('href', '#'); a.setAttribute('href', '#');
a.addEventListener('click', function(e) { (function(appName) {
e.preventDefault(); a.addEventListener('click', function(e) {
e.preventDefault();
self.port.emit('goToUrl', 'applications/' + appName.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '')); self.port.emit('goToUrl', 'applications/' + appName.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, ''));
}); });
}(appName));
img.setAttribute('src', 'images/icons/' + appName + '.png'); img.setAttribute('src', 'images/icons/' + appName + '.png');
img.setAttribute('height', '16'); img.setAttribute('height', '16');
@ -58,11 +60,13 @@
a.setAttribute('href', '#'); a.setAttribute('href', '#');
a.addEventListener('click', function(e) { (function(appName) {
e.preventDefault(); a.addEventListener('click', function(e) {
e.preventDefault();
self.port.emit('goToUrl', 'categories/' + message.categories[cat]); self.port.emit('goToUrl', 'categories/' + message.categories[cat]);
}); });
}(appName));
label.setAttribute('class', 'category'); label.setAttribute('class', 'category');

@ -1,31 +1,33 @@
(function() { (function() {
var lastEnv = []; var lastEnv = [];
if ( document.contentType === 'text/html' ) { try {
var if ( document && document.documentElement && document.contentType === 'text/html' ) {
html = document.documentElement.outerHTML var
env = []; html = document.documentElement.outerHTML
env = [];
self.port.emit('log', 'init'); self.port.emit('log', 'init');
if ( html.length > 50000 ) { if ( html.length > 50000 ) {
html = html.substring(0, 25000) + html.substring(html.length - 25000, html.length); 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', { self.port.emit('analyze', {
hostname: location.hostname, hostname: location.hostname,
url: location.href, url: location.href,
analyze: { env: env } analyze: { html: html }
}); });
}, 1000);
} setTimeout(function() {
var env = Object.keys(unsafeWindow).slice(0, 500);
self.port.emit('analyze', {
hostname: location.hostname,
url: location.href,
analyze: { env: env }
});
}, 1000);
}
} catch (e) { }
}()); }());

@ -8,7 +8,7 @@
"description": "Identifies software on the web", "description": "Identifies software on the web",
"author": "Elbert Alias", "author": "Elbert Alias",
"license": "GPLv3", "license": "GPLv3",
"version": "3.0.4", "version": "3.0.5",
"main": "driver", "main": "driver",
"preferences": [{ "preferences": [{
"name": "tracking", "name": "tracking",