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.addEventListener('click', function(e) {
e.preventDefault();
(function(appName) {
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('height', '16');
@ -58,11 +60,13 @@
a.setAttribute('href', '#');
a.addEventListener('click', function(e) {
e.preventDefault();
(function(appName) {
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');

@ -1,31 +1,33 @@
(function() {
var lastEnv = [];
if ( document.contentType === 'text/html' ) {
var
html = document.documentElement.outerHTML
env = [];
try {
if ( document && document.documentElement && document.contentType === 'text/html' ) {
var
html = document.documentElement.outerHTML
env = [];
self.port.emit('log', 'init');
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);
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: { 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",
"author": "Elbert Alias",
"license": "GPLv3",
"version": "3.0.4",
"version": "3.0.5",
"main": "driver",
"preferences": [{
"name": "tracking",