Squashed a couple of bugs

main
Elbert F 16 years ago
parent 88f1bf158a
commit dc931fa4c8

@ -10,7 +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-auto-detect" name="wappalyzer.autoDetect" 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-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" />
</preferences> </preferences>
@ -28,10 +28,10 @@
<label control="wappalyzer-auto-detect" value="&wappalyzer.detect;:"/> <label control="wappalyzer-auto-detect" value="&wappalyzer.detect;:"/>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<menulist preference="wappalyzer-detect" id="refresh-interval"> <menulist preference="wappalyzer-auto-detect" id="refresh-interval">
<menupopup> <menupopup>
<menuitem label="&wappalyzer.auto;" value="1"/> <menuitem label="&wappalyzer.auto;" value="true"/>
<menuitem label="&wappalyzer.manual;" value="0"/> <menuitem label="&wappalyzer.manual;" value="false"/>
</menupopup> </menupopup>
</menulist> </menulist>
</hbox> </hbox>

@ -14,7 +14,7 @@ wappalyzer =
checkUnique: [], checkUnique: [],
currentTab: false, currentTab: false,
prefs: null, prefs: null,
autoDetect: 1, autoDetect: true,
enableTracking: true, enableTracking: true,
newInstall: false, newInstall: false,
showAppNames: 3, showAppNames: 3,
@ -218,7 +218,7 @@ wappalyzer =
/(www.)?.+\.vox\.com$/i /(www.)?.+\.vox\.com$/i
], ],
init: function() init: function()
{ {
if ( wappalyzer.isBookmarklet ) if ( wappalyzer.isBookmarklet )
{ {
@ -231,17 +231,17 @@ wappalyzer =
wappalyzer.prefs.QueryInterface(Components.interfaces.nsIPrefBranch2); wappalyzer.prefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
wappalyzer.prefs.addObserver('', wappalyzer, false); wappalyzer.prefs.addObserver('', wappalyzer, false);
wappalyzer.autoDetect = wappalyzer.prefs.getIntPref( 'autoDetect');
wappalyzer.showAppNames = wappalyzer.prefs.getIntPref( 'showAppNames'); wappalyzer.showAppNames = wappalyzer.prefs.getIntPref( 'showAppNames');
wappalyzer.autoDetect = wappalyzer.prefs.getBoolPref('autoDetect');
wappalyzer.enableTracking = wappalyzer.prefs.getBoolPref('enableTracking'); wappalyzer.enableTracking = wappalyzer.prefs.getBoolPref('enableTracking');
wappalyzer.newInstall = wappalyzer.prefs.getBoolPref('newInstall'); wappalyzer.newInstall = wappalyzer.prefs.getBoolPref('newInstall');
// Show splash page after installation // Open page after installation
if ( wappalyzer.newInstall ) if ( wappalyzer.newInstall )
{ {
wappalyzer.addTab(wappalyzer.homeUrl + 'install/success/');
wappalyzer.prefs.setBoolPref('newInstall', false); wappalyzer.prefs.setBoolPref('newInstall', false);
gBrowser.addEventListener('load', wappalyzer.installSuccess, false);
} }
// Listen for URL changes // Listen for URL changes
@ -253,7 +253,7 @@ wappalyzer =
{ {
appContent.addEventListener('DOMContentLoaded', wappalyzer.onPageLoad, true); appContent.addEventListener('DOMContentLoaded', wappalyzer.onPageLoad, true);
} }
}, },
observe: function(subject, topic, data) observe: function(subject, topic, data)
{ {
@ -265,7 +265,7 @@ wappalyzer =
switch(data) switch(data)
{ {
case 'autoDetect': case 'autoDetect':
wappalyzer.autoDetect = wappalyzer.prefs.getIntPref('autoDetect'); wappalyzer.autoDetect = wappalyzer.prefs.getBoolPref('autoDetect');
break; break;
case 'enableTracking': case 'enableTracking':
@ -279,12 +279,12 @@ wappalyzer =
} }
}, },
onPageLoad: function(event) onPageLoad: function(event)
{ {
var doc = event.originalTarget; var doc = event.originalTarget;
wappalyzer.analyzePage(doc, true, false); wappalyzer.analyzePage(doc, true, false);
}, },
onUrlChange: function() onUrlChange: function()
{ {
@ -297,7 +297,7 @@ wappalyzer =
{ {
QueryInterface: function( aIID ) QueryInterface: function( aIID )
{ {
if ( aIID.equals(Components.interfaces.nsIWebProgressListener) || if ( aIID.equals(Components.interfaces.nsIWebProgressListener) ||
aIID.equals(Components.interfaces.nsISupportsWeakReference) || aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
aIID.equals(Components.interfaces.nsISupports) ) aIID.equals(Components.interfaces.nsISupports) )
{ {
@ -318,10 +318,10 @@ wappalyzer =
} }
}, },
onStateChange: function(a, b, c, d) {}, onStateChange: function(a, b, c, d) {},
onProgressChange: function(a, b, c, d, e, f) {}, onProgressChange: function(a, b, c, d, e, f) {},
onStatusChange: function(a, b, c, d) {}, onStatusChange: function(a, b, c, d) {},
onSecurityChange: function(a, b, c) {} onSecurityChange: function(a, b, c) {}
}, },
analyzePage: function(doc, doCount, manualDetect) analyzePage: function(doc, doCount, manualDetect)
@ -478,7 +478,7 @@ wappalyzer =
child.setAttribute('label', detectedApp); child.setAttribute('label', detectedApp);
child.setAttribute('class', 'menuitem-iconic'); child.setAttribute('class', 'menuitem-iconic');
child.setAttribute('image', 'chrome://wappalyzer/skin/app_icons/' + detectedApp + '.ico'); child.setAttribute('image', 'chrome://wappalyzer/skin/app_icons/' + detectedApp + '.ico');
child.setAttribute('oncommand', 'gBrowser.selectedTab = gBrowser.addTab(\'' + wappalyzer.homeUrl + 'detail/?app=' + escape(detectedApp) + '\');'); child.setAttribute('oncommand', 'gBrowser.selectedTab = gBrowser.openTab(\'' + wappalyzer.homeUrl + 'detail/?app=' + escape(detectedApp) + '\');');
e.appendChild(child); e.appendChild(child);
*/ */
@ -564,7 +564,7 @@ wappalyzer =
req.close(); req.close();
} }
} };
req.send('d=' + encodeURIComponent(report)); req.send('d=' + encodeURIComponent(report));
} }
@ -618,6 +618,13 @@ wappalyzer =
} }
}, },
installSuccess: function()
{
gBrowser.removeEventListener('load', wappalyzer.installSuccess, false);
wappalyzer.openTab(wappalyzer.homeUrl + 'install/success/');
},
openTab: function(url) openTab: function(url)
{ {
gBrowser.selectedTab = gBrowser.addTab(url); gBrowser.selectedTab = gBrowser.addTab(url);
@ -665,12 +672,12 @@ wappalyzer =
' "><strong>Wappalyzer</strong></div>' + ' "><strong>Wappalyzer</strong></div>' +
' <span id="wappalyzer-bookmarklet-apps"><em>No apps detected</em></span>' + ' <span id="wappalyzer-bookmarklet-apps"><em>No apps detected</em></span>' +
' </div>' + ' </div>' +
' <span style="float: left;"><a href="http://wappalyzer.com" style="color: #332 !important;">home</a> | <a href="http://twitter.com/ElbertF" style="color: #332 !important;">follow me</a></span>' + ' <span style="float: left;"><a href="http://wappalyzer.com" style="color: #332 !important;">home</a> | <a href="http://twitter.com/ElbertF" style="color: #332 !important;">follow me</a></span>' +
' <span style="float: right;">click to close</span>' + ' <span style="float: right;">click to close</span>' +
'</div>' '</div>'
; ;
container.onclick = function() { body.removeChild(container) }; container.onclick = function() { body.removeChild(container); };
body.appendChild(container); body.appendChild(container);

@ -1,4 +1,4 @@
pref('wappalyzer.autoDetect', 1); pref('wappalyzer.autoDetect', true);
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.7.1</em:version> <em:version>1.7.3</em:version>
<em:type>2</em:type> <em:type>2</em:type>
<em:targetApplication> <em:targetApplication>