Fixed tooltip and toolbar error

main
Elbert Alias 11 years ago
parent 9fbd28a9ab
commit fed0b7d59e

@ -36,12 +36,20 @@ img {
text-decoration: none;
}
.detected-app a:hover .label {
text-decoration: underline;
.detected-app a .label .name {
border-bottom: 1px dotted #999;
}
.detected-app a:hover .category {
text-decoration: underline;
.detected-app a:hover .label .name {
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 {

@ -16,14 +16,14 @@
html =
'<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">' +
'<img src="images/icons/' + appName + '.png"/>' +
'<span class="label">' + appName + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' +
'<img src="images/icons/' + appName + '.png" width="16" height="16">' +
'<span class="label"><span class="name">' + appName + '</span>' + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '</span>' +
'</a>';
message.apps[appName].cats.forEach(function(cat) {
html +=
'<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>';
});

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

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

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

@ -1,10 +1,11 @@
name = Wappalyzer
noAppsDetected = No applications detected
clickForDetails = Click for details
preferences = Options
categories = Categories
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_description = Uncheck to display toolbar button.

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

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

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

@ -8,7 +8,7 @@
"description": "Identifies software on the web",
"author": "Elbert Alias",
"license": "GPLv3",
"version": "3.0.1",
"version": "3.0.2",
"main": "driver",
"preferences": [{
"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 ) {
// 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) ) {
w.ping.hostnames[hostname] = { applications: {}, meta: {} };
}

Loading…
Cancel
Save