From fed0b7d59eccf47a04f2b46713f282ff6b4c3394 Mon Sep 17 00:00:00 2001 From: Elbert Alias Date: Sat, 29 Mar 2014 12:18:12 +1100 Subject: [PATCH] Fixed tooltip and toolbar error --- drivers/firefox/data/css/panel.css | 16 +++-- drivers/firefox/data/js/panel.js | 6 +- drivers/firefox/lib/driver.js | 64 +++++++++--------- drivers/firefox/locale/de-DE.properties | 1 + drivers/firefox/locale/en-GB.properties | 1 + drivers/firefox/locale/en-US.properties | 3 +- drivers/firefox/locale/es-ES.properties | 1 + drivers/firefox/locale/fr-FR.properties | 1 + drivers/firefox/locale/nl-NL.properties | 1 + drivers/firefox/package.json | 2 +- .../icons/Javascript Infovis Toolkit.png | Bin 1611 -> 638 bytes share/js/wappalyzer.js | 2 +- 12 files changed, 56 insertions(+), 42 deletions(-) diff --git a/drivers/firefox/data/css/panel.css b/drivers/firefox/data/css/panel.css index d37ac28e6..a4f6661c3 100644 --- a/drivers/firefox/data/css/panel.css +++ b/drivers/firefox/data/css/panel.css @@ -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 { diff --git a/drivers/firefox/data/js/panel.js b/drivers/firefox/data/js/panel.js index 5a4228f7c..252451303 100644 --- a/drivers/firefox/data/js/panel.js +++ b/drivers/firefox/data/js/panel.js @@ -16,14 +16,14 @@ html = '
' + '' + - '' + - '' + appName + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '' + + '' + + '' + appName + '' + ( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ) + '' + ''; message.apps[appName].cats.forEach(function(cat) { html += '' + - '' + message.categoryNames[cat] + '' + + '' + message.categoryNames[cat] + '' + ''; }); diff --git a/drivers/firefox/lib/driver.js b/drivers/firefox/lib/driver.js index 9578ab599..9af8a0382 100644 --- a/drivers/firefox/lib/driver.js +++ b/drivers/firefox/lib/driver.js @@ -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 }); diff --git a/drivers/firefox/locale/de-DE.properties b/drivers/firefox/locale/de-DE.properties index 38b91a334..0ecf54083 100755 --- a/drivers/firefox/locale/de-DE.properties +++ b/drivers/firefox/locale/de-DE.properties @@ -1,5 +1,6 @@ name = Wappalyzer noAppsDetected = Keine Applikationen erkannt +clickForDetails = Klicken für Details preferences = Weitere Optionen ... categories = Kategorienverwaltung diff --git a/drivers/firefox/locale/en-GB.properties b/drivers/firefox/locale/en-GB.properties index b519ab978..98f635d45 100755 --- a/drivers/firefox/locale/en-GB.properties +++ b/drivers/firefox/locale/en-GB.properties @@ -1,5 +1,6 @@ name = Wappalyzer noAppsDetected = No applications detected +clickForDetails = Click for details preferences = Options categories = Categories diff --git a/drivers/firefox/locale/en-US.properties b/drivers/firefox/locale/en-US.properties index efca45ee6..98f635d45 100755 --- a/drivers/firefox/locale/en-US.properties +++ b/drivers/firefox/locale/en-US.properties @@ -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. diff --git a/drivers/firefox/locale/es-ES.properties b/drivers/firefox/locale/es-ES.properties index ab304969f..fc1862a79 100755 --- a/drivers/firefox/locale/es-ES.properties +++ b/drivers/firefox/locale/es-ES.properties @@ -1,5 +1,6 @@ name = Wappalyzer noAppsDetected = Aplicaciones no detectadas +clickForDetail = Clic para detalles preferences = Opciones categories = Categorías diff --git a/drivers/firefox/locale/fr-FR.properties b/drivers/firefox/locale/fr-FR.properties index 531f20b38..58e161b28 100644 --- a/drivers/firefox/locale/fr-FR.properties +++ b/drivers/firefox/locale/fr-FR.properties @@ -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 diff --git a/drivers/firefox/locale/nl-NL.properties b/drivers/firefox/locale/nl-NL.properties index 9d6d63e60..21c64b182 100755 --- a/drivers/firefox/locale/nl-NL.properties +++ b/drivers/firefox/locale/nl-NL.properties @@ -1,5 +1,6 @@ name = Wappalyzer noAppsDetected = Geen applicaties gedetecteerd +clickForDetails = Klik voor details preferences = Meer opties... categories = Beheer categorien diff --git a/drivers/firefox/package.json b/drivers/firefox/package.json index 3ee87c665..6d7e20fee 100644 --- a/drivers/firefox/package.json +++ b/drivers/firefox/package.json @@ -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", diff --git a/share/images/icons/Javascript Infovis Toolkit.png b/share/images/icons/Javascript Infovis Toolkit.png index 3440fc0885f9745cbdf02563537625c3fd2be191..9dfaef63ba449a41b45d3d3cb41ab0e713998453 100644 GIT binary patch delta 586 zcmV-Q0=50i4E_X=Bo78+OGiWi{{a60|De66laV1Ge*+o`I1rf~jl=)|0t-n*K~z}7 ztykM^0x=MrajYc2`9z{Zr2HdM09B-+G(iC=Ac1>qKF$t{S-)~vIG$q)e6{hlEtkvv}jkeQ^Y0Ew}z1P0gf5N6`L@%agmY`Z!b$gy&dl*I99*Ts-c zWQjf2e-B!KLL!OD{w5@`>#3|^F8`x}T2-~`O)b60w!nj@~mp^r)5O8@BujN_7bn(TgunEGCg1=rs53Po}| zPqXrf7F2tw4W{oOSx9*gj=pw07bfVC{F7xVk!sz{a1B;AA3+_Ez zf4J6VGYq!9#>xxTG6>Pk<9F1PSD<~m)s+5&EME0=gLD%R)K7Z`J@7edxR8t2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{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: {} }; }