|
|
@ -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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( typeof(messageManager) != 'undefined' )
|
|
|
|
|
|
|
|
{
|
|
|
|
// Listen messages sent from the content process
|
|
|
|
// Listen messages sent from the content process
|
|
|
|
messageManager.addMessageListener('wappalyzer:onPageLoad', wappalyzer.onContentPageLoad);
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
@ -97,8 +104,31 @@ wappalyzer =
|
|
|
|
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');
|
|
|
|