Fixed jQuery, show all categories in tooltip

main
Elbert Alias 12 years ago
parent a35571efea
commit 70a9460d13

@ -1694,7 +1694,7 @@
"WebsiteBaker": { "WebsiteBaker": {
"cats": [ 1 ], "cats": [ 1 ],
"meta": { "generator": "WebsiteBaker" }, "meta": { "generator": "WebsiteBaker" },
"implies": [ 'PHP' ] "implies": [ "PHP" ]
}, },
"Webtrekk": { "Webtrekk": {
"cats": [ 10 ], "cats": [ 10 ],

@ -158,7 +158,7 @@
} }
w.detected[url].map(function(app, i) { w.detected[url].map(function(app, i) {
var j, cat, showCat; var j, cat, showCat, categories = [];
for ( i in w.apps[app].cats ) { for ( i in w.apps[app].cats ) {
showCat = false; showCat = false;
@ -168,10 +168,6 @@
} catch(e) { } } catch(e) { }
if ( showCat ) { if ( showCat ) {
if ( prefs.getBoolPref('showIcons') ) {
$('<image>').attr('src', 'chrome://wappalyzer/skin/images/icons/' + app + '.png').attr('tooltiptext', app + ' - ' + strings.getString('wappalyzer.cat' + w.apps[app].cats[i])).prependTo(document.getElementById('wappalyzer-container'));
}
$('<menuseparator>').appendTo(document.getElementById('wappalyzer-menu')); $('<menuseparator>').appendTo(document.getElementById('wappalyzer-menu'));
$('#wappalyzer-menu') $('#wappalyzer-menu')
@ -185,7 +181,9 @@
})); }));
for ( j in w.apps[app].cats ) { for ( j in w.apps[app].cats ) {
var cat = w.apps[app].cats[j]; cat = w.apps[app].cats[j];
categories.push(strings.getString('wappalyzer.cat' + cat));
$('#wappalyzer-menu') $('#wappalyzer-menu')
.append($('<menuitem>') .append($('<menuitem>')
@ -196,6 +194,14 @@
})); }));
} }
if ( prefs.getBoolPref('showIcons') ) {
$('<image>')
.attr('src', 'chrome://wappalyzer/skin/images/icons/' + app + '.png')
.attr('tooltiptext', app + ' - ' + categories.join(', '))
.prependTo(document.getElementById('wappalyzer-container'))
;
}
break; break;
} }
} }

Loading…
Cancel
Save