Fixed tooltip and toolbar error

main
Elbert Alias 11 years ago
parent 9fbd28a9ab
commit fed0b7d59e

@ -36,12 +36,20 @@ img {
text-decoration: none; text-decoration: none;
} }
.detected-app a:hover .label { .detected-app a .label .name {
text-decoration: underline; border-bottom: 1px dotted #999;
} }
.detected-app a:hover .category { .detected-app a:hover .label .name {
text-decoration: underline; border-bottom: 1px solid #333;
}
.detected-app a .category .name {
border-bottom: 1px solid transparent;
}
.detected-app a:hover .category .name {
border-bottom: 1px solid #999;
} }
.label { .label {

@ -16,14 +16,14 @@
html = html =
'<div class="detected-app">' + '<div class="detected-app">' +
'<a target="_blank" href="https://wappalyzer.com/applications/' + appName.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '') + '?utm_source=firefox&utm_medium=panel&utm_campaign=extensions">' + '<a target="_blank" href="https://wappalyzer.com/applications/' + appName.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '') + '?utm_source=firefox&utm_medium=panel&utm_campaign=extensions">' +
'<img src="images/icons/' + appName + '.png"/>' + '<img src="images/icons/' + appName + '.png" width="16" height="16">' +
'<span class="label">' + appName + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' + '<span class="label"><span class="name">' + appName + '</span>' + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' +
'</a>'; '</a>';
message.apps[appName].cats.forEach(function(cat) { message.apps[appName].cats.forEach(function(cat) {
html += html +=
'<a target="_blank" href="https://wappalyzer.com/categories/' + message.categories[cat] + '?utm_source=firefox&utm_medium=panel&utm_campaign=extensions">' + '<a target="_blank" href="https://wappalyzer.com/categories/' + message.categories[cat] + '?utm_source=firefox&utm_medium=panel&utm_campaign=extensions">' +
'<span class="category">' + message.categoryNames[cat] + '</span>' + '<span class="category"><span class="name">' + message.categoryNames[cat] + '</span></span>' +
'</a>'; '</a>';
}); });

@ -26,12 +26,6 @@
initTab = function(tab) { initTab = function(tab) {
tabCache[tab.id] = { count: 0, appsDetected: [] }; tabCache[tab.id] = { count: 0, appsDetected: [] };
if ( !sp.prefs.urlbar ) {
createWidget();
w.driver.displayApps();
}
tab.on('ready', function(tab) { tab.on('ready', function(tab) {
var worker = tab.attach({ var worker = tab.attach({
contentScriptFile: data.url('js/tab.js') contentScriptFile: data.url('js/tab.js')
@ -63,14 +57,18 @@
w.driver.displayApps(); w.driver.displayApps();
}); });
addIcon = function(url) { addIcon = function(appName) {
var icon = getDocument().createElement('image'); var
icon = getDocument().createElement('image'),
url = appName !== undefined ? 'images/icons/' + appName + '.png' : 'images/icon32.png',
tooltipText = ( appName !== undefined ? appName + ' - ' + require('sdk/l10n').get('clickForDetails') + ' - ' : '' ) + require('sdk/l10n').get('name');
icon.setAttribute('src', data.url(url)); icon.setAttribute('src', data.url(url));
icon.setAttribute('class', 'wappalyzer-icon'); icon.setAttribute('class', 'wappalyzer-icon');
icon.setAttribute('width', '16'); icon.setAttribute('width', '16');
icon.setAttribute('height', '16'); icon.setAttribute('height', '16');
icon.setAttribute('style', 'margin: 0 1px;'); icon.setAttribute('style', 'margin: 0 1px;');
icon.setAttribute('tooltiptext', tooltipText);
getUrlBar().appendChild(icon); getUrlBar().appendChild(icon);
@ -282,19 +280,20 @@
// Add icons // Add icons
if ( count ) { if ( count ) {
for ( appName in tabCache[tabs.activeTab.id].appsDetected ) { for ( appName in tabCache[tabs.activeTab.id].appsDetected ) {
addIcon('images/icons/' + appName + '.png'); addIcon(appName);
} }
} else { } else {
addIcon('images/icon32.png'); addIcon();
} }
} else if ( count ) { } else {
widget.contentURL = data.url('images/icon32_hot.png');
if ( count ) {
// Find the main application to display // Find the main application to display
var var
appName, appName,
found = false; found = false;
widget.contentURL = data.url('images/icon32_hot.png');
w.driver.categoryOrder.forEach(function(match) { w.driver.categoryOrder.forEach(function(match) {
for ( appName in w.detected[url] ) { for ( appName in w.detected[url] ) {
w.apps[appName].cats.forEach(function(cat) { w.apps[appName].cats.forEach(function(cat) {
@ -307,6 +306,7 @@
} }
}); });
} }
}
panel.port.emit('displayApps', { tabCache: tabCache[tabs.activeTab.id], apps: w.apps, categories: w.categories, categoryNames: categoryNames }); panel.port.emit('displayApps', { tabCache: tabCache[tabs.activeTab.id], apps: w.apps, categories: w.categories, categoryNames: categoryNames });
}, },

@ -1,5 +1,6 @@
name = Wappalyzer name = Wappalyzer
noAppsDetected = Keine Applikationen erkannt noAppsDetected = Keine Applikationen erkannt
clickForDetails = Klicken für Details
preferences = Weitere Optionen ... preferences = Weitere Optionen ...
categories = Kategorienverwaltung categories = Kategorienverwaltung

@ -1,5 +1,6 @@
name = Wappalyzer name = Wappalyzer
noAppsDetected = No applications detected noAppsDetected = No applications detected
clickForDetails = Click for details
preferences = Options preferences = Options
categories = Categories categories = Categories

@ -1,10 +1,11 @@
name = Wappalyzer name = Wappalyzer
noAppsDetected = No applications detected noAppsDetected = No applications detected
clickForDetails = Click for details
preferences = Options preferences = Options
categories = Categories categories = Categories
tracking_title = Tracking tracking_title = Tracking
research_description = Anonymously send reports on detected applications to wappalyzer.com for analysis tracking_description = Anonymously send reports on detected applications to wappalyzer.com for analysis
urlbar_title = Display icons in URL bar urlbar_title = Display icons in URL bar
urlbar_description = Uncheck to display toolbar button. urlbar_description = Uncheck to display toolbar button.

@ -1,5 +1,6 @@
name = Wappalyzer name = Wappalyzer
noAppsDetected = Aplicaciones no detectadas noAppsDetected = Aplicaciones no detectadas
clickForDetail = Clic para detalles
preferences = Opciones preferences = Opciones
categories = Categorías categories = Categorías

@ -1,5 +1,6 @@
name = Wappalyzer name = Wappalyzer
noAppsDetected = Pas d'applications détectées noAppsDetected = Pas d'applications détectées
clickForDetails = Cliquer pour détails
preferences = Plus d'options... preferences = Plus d'options...
categories = Gérer les catégories categories = Gérer les catégories

@ -1,5 +1,6 @@
name = Wappalyzer name = Wappalyzer
noAppsDetected = Geen applicaties gedetecteerd noAppsDetected = Geen applicaties gedetecteerd
clickForDetails = Klik voor details
preferences = Meer opties... preferences = Meer opties...
categories = Beheer categorien categories = Beheer categorien

@ -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.1", "version": "3.0.2",
"main": "driver", "main": "driver",
"preferences": [{ "preferences": [{
"name": "tracking", "name": "tracking",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 638 B

@ -445,7 +445,7 @@ var wappalyzer = (function() {
if ( w.detected[url][app].getConfidence() >= 100 ) { if ( w.detected[url][app].getConfidence() >= 100 ) {
// Per hostname // Per hostname
if ( /(www.)?((.+?)\.(([a-z]{2,3}\.)?[a-z]{2,6}))$/.test(hostname) && !/((local|dev(elopment)?|stag(e|ing)?|test(ing)?|demo(shop)?|admin|google)\.|\/admin|\.local)/.test(url) ) { if ( /(www.)?((.+?)\.(([a-z]{2,3}\.)?[a-z]{2,6}))$/.test(hostname) && !/((local|dev(elopment)?|stag(e|ing)?|test(ing)?|demo(shop)?|admin|google|cache)\.|\/admin|\.local)/.test(url) ) {
if ( !w.ping.hostnames.hasOwnProperty(hostname) ) { if ( !w.ping.hostnames.hasOwnProperty(hostname) ) {
w.ping.hostnames[hostname] = { applications: {}, meta: {} }; w.ping.hostnames[hostname] = { applications: {}, meta: {} };
} }