Added option to move icons back to status bar, fixed regression issue with FF3.6, several minor bugfixes

main
ElbertF 14 years ago
parent 13e93933e0
commit fb966de89c

@ -10,6 +10,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<prefpane label="&wappalyzer.options;"> <prefpane label="&wappalyzer.options;">
<preferences> <preferences>
<preference id="wappalyzer-location" name="wappalyzer.location" type="int" />
<preference id="wappalyzer-auto-detect" name="wappalyzer.autoDetect" type="bool"/> <preference id="wappalyzer-auto-detect" name="wappalyzer.autoDetect" type="bool"/>
<preference id="wappalyzer-enable-tracking" name="wappalyzer.enableTracking" type="bool"/> <preference id="wappalyzer-enable-tracking" name="wappalyzer.enableTracking" type="bool"/>
<preference id="wappalyzer-show-app-names" name="wappalyzer.showAppNames" type="int" /> <preference id="wappalyzer-show-app-names" name="wappalyzer.showAppNames" type="int" />
@ -23,6 +24,19 @@
<column flex="1"/> <column flex="1"/>
</columns> </columns>
<rows> <rows>
<row>
<hbox align="center">
<label control="wappalyzer-location" value="&wappalyzer.location;:"/>
</hbox>
<hbox align="center">
<menulist preference="wappalyzer-location" id="refresh-interval">
<menupopup>
<menuitem label="&wappalyzer.addressBar;" value="0"/>
<menuitem label="&wappalyzer.statusBar;" value="1"/>
</menupopup>
</menulist>
</hbox>
</row>
<row> <row>
<hbox align="center"> <hbox align="center">
<label control="wappalyzer-auto-detect" value="&wappalyzer.detect;:"/> <label control="wappalyzer-auto-detect" value="&wappalyzer.detect;:"/>

@ -44,6 +44,10 @@ wappalyzer =
wappalyzer.enableTracking = wappalyzer.prefs.getBoolPref('enableTracking'); wappalyzer.enableTracking = wappalyzer.prefs.getBoolPref('enableTracking');
wappalyzer.newInstall = wappalyzer.prefs.getBoolPref('newInstall'); wappalyzer.newInstall = wappalyzer.prefs.getBoolPref('newInstall');
var locationPref = wappalyzer.prefs.getIntPref('location');
wappalyzer.moveLocation(locationPref);
// Open page after installation // Open page after installation
if ( wappalyzer.newInstall ) if ( wappalyzer.newInstall )
{ {
@ -52,10 +56,13 @@ wappalyzer =
wappalyzer.browser.addEventListener('load', wappalyzer.installSuccess, false); wappalyzer.browser.addEventListener('load', wappalyzer.installSuccess, false);
} }
// Listen messages sent from the content process if ( typeof(messageManager) != 'undefined' )
messageManager.addMessageListener('wappalyzer:onPageLoad', wappalyzer.onContentPageLoad); {
// Listen messages sent from the content process
messageManager.addMessageListener('wappalyzer:onPageLoad', wappalyzer.onContentPageLoad);
messageManager.loadFrameScript('chrome://wappalyzer/content/content.js', true); messageManager.loadFrameScript('chrome://wappalyzer/content/content.js', true);
}
// Listen for URL changes // Listen for URL changes
wappalyzer.browser.addProgressListener(wappalyzer.urlChange, Components.interfaces.nsIWebProgress.NOTIFY_LOCATION); wappalyzer.browser.addProgressListener(wappalyzer.urlChange, Components.interfaces.nsIWebProgress.NOTIFY_LOCATION);
@ -65,7 +72,7 @@ wappalyzer =
}, },
log: function(message) { log: function(message) {
return; //return;
var consoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService); var consoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
@ -87,7 +94,7 @@ wappalyzer =
switch(data) switch(data)
{ {
case 'autoDetect': case 'autoDetect':
wappalyzer.autoDetect = wappalyzer.prefs.getBoolPref('autoDetect'); wappalyzer.autoDetect = wappalyzer.prefs.getBoolPref('autoDetect');
break; break;
case 'enableTracking': case 'enableTracking':
@ -95,10 +102,33 @@ wappalyzer =
break; break;
case 'showAppNames': case 'showAppNames':
wappalyzer.showAppNames = wappalyzer.prefs.getIntPref('showAppNames'); wappalyzer.showAppNames = wappalyzer.prefs.getIntPref('showAppNames');
break;
case 'location':
var locationPref = wappalyzer.prefs.getIntPref('location');
wappalyzer.moveLocation(locationPref);
}
},
moveLocation: function(locationPref) {
wappalyzer.log('moveLocation');
var containerId = 'urlbar-icons';
switch ( locationPref )
{
case 1:
containerId = 'wappalyzer-statusbar';
break; break;
} }
var e = document.getElementById(containerId);
var container = document.getElementById('wappalyzer-container');
e.appendChild(container);
}, },
onPageLoad: function(event) onPageLoad: function(event)
@ -107,6 +137,11 @@ wappalyzer =
var doc = event.originalTarget; var doc = event.originalTarget;
if ( !doc.request )
{
wappalyzer.request = false;
}
wappalyzer.analyzePage( wappalyzer.analyzePage(
doc.location.href, doc.location.href,
doc.documentElement.innerHTML, doc.documentElement.innerHTML,
@ -144,8 +179,10 @@ wappalyzer =
wappalyzer.request = doc.request; wappalyzer.request = doc.request;
wappalyzer.currentTab = false;
wappalyzer.analyzePage( wappalyzer.analyzePage(
doc.location.href, doc.location.href ? doc.location.href : '',
doc.documentElement ? doc.documentElement.innerHTML : '', doc.documentElement ? doc.documentElement.innerHTML : '',
[], [],
false, false,
@ -169,6 +206,8 @@ wappalyzer =
onLocationChange: function(progress, request, url) onLocationChange: function(progress, request, url)
{ {
wappalyzer.log('urlChange.onLocationChange');
if ( !url ) if ( !url )
{ {
wappalyzer.prevUrl = ''; wappalyzer.prevUrl = '';
@ -201,6 +240,8 @@ wappalyzer =
if ( href == wappalyzer.browser.contentDocument.location.href ) if ( href == wappalyzer.browser.contentDocument.location.href )
{ {
wappalyzer.currentTab = true; wappalyzer.currentTab = true;
wappalyzer.clearDetectedApps();
} }
} }
@ -315,11 +356,11 @@ wappalyzer =
{ {
if ( wappalyzer.showAppNames == 2 ) if ( wappalyzer.showAppNames == 2 )
{ {
var urlbar = document.getElementById('wappalyzer-urlbar'); var container = document.getElementById('wappalyzer-container');
var tooltiptext = urlbar.getAttribute('tooltiptext') + '\n' + detectedApp; var tooltiptext = container.getAttribute('tooltiptext') + '\n' + detectedApp;
urlbar.setAttribute('tooltiptext', tooltiptext); container.setAttribute('tooltiptext', tooltiptext);
} }
if ( wappalyzer.showAppNames == 3 ) if ( wappalyzer.showAppNames == 3 )
@ -494,9 +535,9 @@ wappalyzer =
if ( !wappalyzer.isMobile ) if ( !wappalyzer.isMobile )
{ {
// Clear tooltip // Clear tooltip
var urlbar = document.getElementById('wappalyzer-urlbar'); var container = document.getElementById('wappalyzer-container');
urlbar.setAttribute('tooltiptext', wappalyzer.strings.getString('wappalyzer.title') + '\n---'); container.setAttribute('tooltiptext', wappalyzer.strings.getString('wappalyzer.title') + '\n---');
// Disable and clear application statistics menu item // Disable and clear application statistics menu item
e = document.getElementById('wappalyzer-app-stats'); e = document.getElementById('wappalyzer-app-stats');

@ -11,10 +11,10 @@
<stringbundleset id="stringbundleset"> <stringbundleset id="stringbundleset">
<stringbundle id="wappalyzer-strings" src="chrome://wappalyzer/locale/overlay.properties" /> <stringbundle id="wappalyzer-strings" src="chrome://wappalyzer/locale/overlay.properties" />
</stringbundleset> </stringbundleset>
<hbox id="urlbar-icons"> <hbox>
<hbox <hbox
id="wappalyzer-urlbar" id="wappalyzer-container"
context="wappalyzer-menu" context="wappalyzer-menu"
> >
<image <image
@ -40,38 +40,11 @@
</menu> </menu>
</menupopup> </menupopup>
</hbox> </hbox>
</hbox> </hbox>
<!-- <hbox id="urlbar-icons"></hbox>
<statusbar id="status-bar">
<statusbarpanel
id="wappalyzer-panel"
label="&wappalyzer.title;"
context="wappalyzer-menu"
>
<image
id="wappalyzer-icon"
onclick="wappalyzer.analyzePage(gBrowser.selectedBrowser.contentDocument, true, true);"
class="wappalyzer-icon"
tooltiptext="&wappalyzer.title;"
label="&wappalyzer.title;"
src="chrome://wappalyzer/skin/icon16x16.ico"/>
<box align="start" id="wappalyzer-detected-apps"/>
<menupopup id="wappalyzer-menu" position="at_pointer"> <statusbar id="status-bar">
<menuitem label="&wappalyzer.options;" oncommand=" <statusbarpanel id="wappalyzer-statusbar" class="statusbarpanel-iconic"></statusbarpanel>
window.openDialog('chrome://wappalyzer/content/options.xul', 'wappalyzer-options', 'chrome, centerscreen, modal'); </statusbar>
"/>
<menuseparator/>
<menuitem label="&wappalyzer.feedback;" oncommand="wappalyzer.openTab(wappalyzer.homeUrl + '?redirect=feedback');"/>
<menuitem label="&wappalyzer.home;" oncommand="wappalyzer.openTab(wappalyzer.homeUrl);"/>
<menuseparator/>
<menu label="&wappalyzer.appStats;" disabled="true">
<menupopup id="wappalyzer-app-stats"/>
</menu>
</menupopup>
</statusbarpanel>
</statusbar>
-->
</overlay> </overlay>

@ -3,6 +3,9 @@
<!ENTITY wappalyzer.options "Settings"> <!ENTITY wappalyzer.options "Settings">
<!ENTITY wappalyzer.enableTracking "Allow Wappalyzer to collect anonymous data"> <!ENTITY wappalyzer.enableTracking "Allow Wappalyzer to collect anonymous data">
<!ENTITY wappalyzer.behavior "Behavior"> <!ENTITY wappalyzer.behavior "Behavior">
<!ENTITY wappalyzer.location "Display icons in">
<!ENTITY wappalyzer.addressBar "Address bar">
<!ENTITY wappalyzer.statusBar "Status bar">
<!ENTITY wappalyzer.detect "Detect applications"> <!ENTITY wappalyzer.detect "Detect applications">
<!ENTITY wappalyzer.auto "Automatically"> <!ENTITY wappalyzer.auto "Automatically">
<!ENTITY wappalyzer.manual "On click"> <!ENTITY wappalyzer.manual "On click">

@ -1,4 +1,4 @@
#wappalyzer-urlbar { #urlbar-icons #wappalyzer-container {
margin-left: 2px; margin-left: 2px;
} }
@ -8,6 +8,10 @@
height: 16px; height: 16px;
} }
#wappalyzer-statubar #wappalyzer-icon {
margin-left: 0 !important;
}
#wappalyzer-detected-apps label { #wappalyzer-detected-apps label {
margin: 0 0 0 .3em; margin: 0 0 0 .3em;
} }

@ -1,4 +1,5 @@
pref('wappalyzer.autoDetect', true); pref('wappalyzer.autoDetect', true);
pref('wappalyzer.location', 0);
pref('wappalyzer.enableTracking', true); pref('wappalyzer.enableTracking', true);
pref('wappalyzer.newInstall', true); pref('wappalyzer.newInstall', true);
pref('wappalyzer.showAppNames', 2); pref('wappalyzer.showAppNames', 2);

@ -5,7 +5,7 @@
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest"> <Description about="urn:mozilla:install-manifest">
<em:id>wappalyzer@crunchlabz.com</em:id> <em:id>wappalyzer@crunchlabz.com</em:id>
<em:version>1.10.0</em:version> <em:version>1.11.1</em:version>
<em:type>2</em:type> <em:type>2</em:type>
<em:targetApplication> <em:targetApplication>