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">
<prefpane label="&wappalyzer.options;">
<preferences>
<preference id="wappalyzer-location" name="wappalyzer.location" type="int" />
<preference id="wappalyzer-auto-detect" name="wappalyzer.autoDetect" type="bool"/>
<preference id="wappalyzer-enable-tracking" name="wappalyzer.enableTracking" type="bool"/>
<preference id="wappalyzer-show-app-names" name="wappalyzer.showAppNames" type="int" />
@ -23,6 +24,19 @@
<column flex="1"/>
</columns>
<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>
<hbox align="center">
<label control="wappalyzer-auto-detect" value="&wappalyzer.detect;:"/>

@ -44,6 +44,10 @@ wappalyzer =
wappalyzer.enableTracking = wappalyzer.prefs.getBoolPref('enableTracking');
wappalyzer.newInstall = wappalyzer.prefs.getBoolPref('newInstall');
var locationPref = wappalyzer.prefs.getIntPref('location');
wappalyzer.moveLocation(locationPref);
// Open page after installation
if ( wappalyzer.newInstall )
{
@ -52,10 +56,13 @@ wappalyzer =
wappalyzer.browser.addEventListener('load', wappalyzer.installSuccess, false);
}
// Listen messages sent from the content process
messageManager.addMessageListener('wappalyzer:onPageLoad', wappalyzer.onContentPageLoad);
if ( typeof(messageManager) != 'undefined' )
{
// 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
wappalyzer.browser.addProgressListener(wappalyzer.urlChange, Components.interfaces.nsIWebProgress.NOTIFY_LOCATION);
@ -65,7 +72,7 @@ wappalyzer =
},
log: function(message) {
return;
//return;
var consoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
@ -87,7 +94,7 @@ wappalyzer =
switch(data)
{
case 'autoDetect':
wappalyzer.autoDetect = wappalyzer.prefs.getBoolPref('autoDetect');
wappalyzer.autoDetect = wappalyzer.prefs.getBoolPref('autoDetect');
break;
case 'enableTracking':
@ -95,10 +102,33 @@ wappalyzer =
break;
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;
}
var e = document.getElementById(containerId);
var container = document.getElementById('wappalyzer-container');
e.appendChild(container);
},
onPageLoad: function(event)
@ -107,6 +137,11 @@ wappalyzer =
var doc = event.originalTarget;
if ( !doc.request )
{
wappalyzer.request = false;
}
wappalyzer.analyzePage(
doc.location.href,
doc.documentElement.innerHTML,
@ -144,8 +179,10 @@ wappalyzer =
wappalyzer.request = doc.request;
wappalyzer.currentTab = false;
wappalyzer.analyzePage(
doc.location.href,
doc.location.href ? doc.location.href : '',
doc.documentElement ? doc.documentElement.innerHTML : '',
[],
false,
@ -169,6 +206,8 @@ wappalyzer =
onLocationChange: function(progress, request, url)
{
wappalyzer.log('urlChange.onLocationChange');
if ( !url )
{
wappalyzer.prevUrl = '';
@ -201,6 +240,8 @@ wappalyzer =
if ( href == wappalyzer.browser.contentDocument.location.href )
{
wappalyzer.currentTab = true;
wappalyzer.clearDetectedApps();
}
}
@ -315,11 +356,11 @@ wappalyzer =
{
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 )
@ -494,9 +535,9 @@ wappalyzer =
if ( !wappalyzer.isMobile )
{
// 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
e = document.getElementById('wappalyzer-app-stats');

@ -11,10 +11,10 @@
<stringbundleset id="stringbundleset">
<stringbundle id="wappalyzer-strings" src="chrome://wappalyzer/locale/overlay.properties" />
</stringbundleset>
<hbox id="urlbar-icons">
<hbox>
<hbox
id="wappalyzer-urlbar"
id="wappalyzer-container"
context="wappalyzer-menu"
>
<image
@ -40,38 +40,11 @@
</menu>
</menupopup>
</hbox>
</hbox>
</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"/>
<hbox id="urlbar-icons"></hbox>
<menupopup id="wappalyzer-menu" position="at_pointer">
<menuitem label="&wappalyzer.options;" oncommand="
window.openDialog('chrome://wappalyzer/content/options.xul', 'wappalyzer-options', 'chrome, centerscreen, modal');
"/>
<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>
-->
<statusbar id="status-bar">
<statusbarpanel id="wappalyzer-statusbar" class="statusbarpanel-iconic"></statusbarpanel>
</statusbar>
</overlay>

@ -3,6 +3,9 @@
<!ENTITY wappalyzer.options "Settings">
<!ENTITY wappalyzer.enableTracking "Allow Wappalyzer to collect anonymous data">
<!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.auto "Automatically">
<!ENTITY wappalyzer.manual "On click">

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

@ -1,4 +1,5 @@
pref('wappalyzer.autoDetect', true);
pref('wappalyzer.location', 0);
pref('wappalyzer.enableTracking', true);
pref('wappalyzer.newInstall', true);
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#">
<Description about="urn:mozilla:install-manifest">
<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:targetApplication>