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', '#');
(function(appName) {
a.addEventListener('click', function(e) { a.addEventListener('click', function(e) {
e.preventDefault(); 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', '#');
(function(appName) {
a.addEventListener('click', function(e) { a.addEventListener('click', function(e) {
e.preventDefault(); 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,7 +1,8 @@
(function() { (function() {
var lastEnv = []; var lastEnv = [];
if ( document.contentType === 'text/html' ) { try {
if ( document && document.documentElement && document.contentType === 'text/html' ) {
var var
html = document.documentElement.outerHTML html = document.documentElement.outerHTML
env = []; env = [];
@ -28,4 +29,5 @@
}); });
}, 1000); }, 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",