Added option to automatically analyze headers to Chrome driver

main
ElbertF 12 years ago
parent e7eeedd990
commit 8675ddbaf6

@ -5,8 +5,10 @@
"options": { "message": "Wappalyzer Options" },
"optionsSave": { "message": "Save options" },
"optionsSaved": { "message": "Saved" },
"optionAutoAnalyzeHeaders": { "message": "Analyze headers automatically on click" },
"optionTracking": { "message": "Anonymously send reports on detected applications to wappalyzer.com for research" },
"analyzeHeaders": { "message": "Analyze headers" },
"analyzeHeadersDone": { "message": "Completed" },
"nothingToDo": { "message": "Nothing to do here." },
"noAppsDetected": { "message": "No applications detected." },
"categoryName1": { "message": "CMS" },

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

@ -0,0 +1,4 @@
var defaults = {
autoAnalyzeHeaders: 0,
tracking: 1
};

@ -19,13 +19,18 @@ $(function() {
}
}
if ( parseInt(options.opts.autoAnalyzeHeaders) ) {
$('#option-auto-analyze-headers').attr('checked', 'checked');
}
if ( parseInt(options.opts.tracking) ) {
$('#option-tracking').attr('checked', 'checked');
}
},
save: function() {
options.opts.tracking = $('#option-tracking').is(':checked') ? 1 : 0;
options.opts.autoAnalyzeHeaders = $('#option-auto-analyze-headers').is(':checked') ? 1 : 0;
options.opts.tracking = $('#option-tracking' ).is(':checked') ? 1 : 0;
for ( option in options.opts ) {
localStorage[option] = options.opts[option];

@ -9,17 +9,23 @@ var wappalyzer = {};
window.open(chrome.extension.getURL('options.html'));
});
$('#analyze-headers').text(chrome.i18n.getMessage('analyzeHeaders')).removeAttr('disabled');
chrome.tabs.getSelected(null, function(tab) {
if ( tab.url.match(/https?:\/\//) ) {
$('#detected-apps').html('<div class="empty">' + chrome.i18n.getMessage('noAppsDetected') + '</div>');
$('#analyze-headers').removeAttr('disabled').click(function() {
$('#analyze-headers').click(function() {
$(this).attr('disabled', 'disabled');
chrome.extension.sendRequest({ id: 'fetch_headers', tab: tab });
popup.pollHeaders = setInterval(popup.displayApps, 100);
});
if ( parseInt(localStorage['autoAnalyzeHeaders']) ) {
$('#analyze-headers').click();
}
} else {
$('#detected-apps').html('<div class="empty">' + chrome.i18n.getMessage('nothingToDo') + '</div>');
@ -34,9 +40,11 @@ var wappalyzer = {};
chrome.tabs.getSelected(null, function(tab) {
chrome.extension.sendRequest({ id: 'get_apps', tab: tab }, function(response) {
if ( response.tabCache.analyzed.indexOf('headers') > 0 ) {
if ( popup.pollHeaders != null ) {
clearTimeout(popup.pollHeaders);
$('#analyze-headers').removeAttr('disabled');
$('#analyze-headers').text(chrome.i18n.getMessage('analyzeHeadersDone'));
}
}
if ( response.tabCache.count > 0 ) {

@ -1,7 +1,7 @@
{ "name": "Wappalyzer",
"homepage_url": "http://wappalyzer.com",
"description": "Identifies software on the web",
"version": "2.3",
"version": "2.4",
"default_locale": "en",
"manifest_version": 2,
"icons": {

@ -19,6 +19,10 @@
<body>
<h1 data-i18n="options"></h1>
<p>
<label for="option-auto-analyze-headers"><input id="option-auto-analyze-headers" type="checkbox"> <span data-i18n="optionAutoAnalyzeHeaders"></span></label>
</p>
<p>
<label for="option-tracking"><input id="option-tracking" type="checkbox"> <span data-i18n="optionTracking"></span></label>
</p>