Chrome driver options

main
ElbertF 13 years ago
parent b07b8b6541
commit e7eeedd990

@ -1,4 +1,7 @@
{
"github": { "message": "Fork Wappalyzer on GitHub!" },
"twitter": { "message": "Follow Wappalyzer on Twitter" },
"website": { "message": "Go to wappalyzer.com" },
"options": { "message": "Wappalyzer Options" },
"optionsSave": { "message": "Save options" },
"optionsSaved": { "message": "Saved" },

@ -44,3 +44,16 @@ a:active {
#options-saved {
display: none;
}
#about {
border-top: 1px solid #eee;
margin-top: 21px;
}
#about img {
vertical-align: middle;
}
#about button {
line-height: 30px;
}

@ -58,18 +58,35 @@ img {
text-align: center;
}
#buttons {
margin-top: 12px;
overflow: hidden;
}
#buttons button {
height: 32px;
}
#analyze-headers {
border: 1px solid #eee;
border-radius: 3px;
cursor: pointer;
display: none;
line-height: 30px;
margin-top: 7px;
text-align: center;
float: left;
width: 158px;
}
#analyze-headers.pending {
background: url('../images/pending.gif') center center no-repeat;
color: #999;
background-image: url('../images/pending2.gif');
background-position: center center;
background-repeat: no-repeat;
text-indent: -999px;
}
#options {
background-image: url('../images/options.png');
background-position: center center;
background-repeat: no-repeat;
float: right;
height: 32px;
-webkit-padding-end: 0;
-webkit-padding-start: 0;
min-width: 32px;
width: 32px;
}

@ -5,6 +5,10 @@ $(function() {
init: function() {
options.load();
$('#github' ).click(function() { window.open(wappalyzer.config.githubURL); });
$('#twitter' ).click(function() { window.open(wappalyzer.config.twitterURL); });
$('#wappalyzer').click(function() { window.open(wappalyzer.config.websiteURL); });
$('#options-save').click(options.save);
},

@ -5,12 +5,16 @@ var wappalyzer = {};
pollHeaders: null,
init: function() {
$('#options').click(function() {
window.open(chrome.extension.getURL('options.html'));
});
chrome.tabs.getSelected(null, function(tab) {
if ( tab.url.match(/https?:\/\//) ) {
$('#detected-apps').html('<div class="empty">' + chrome.i18n.getMessage('noAppsDetected') + '</div>');
$('#analyze-headers').show().click(function() {
$(this).addClass('pending');
$('#analyze-headers').removeAttr('disabled').click(function() {
$(this).attr('disabled', 'disabled');
chrome.extension.sendRequest({ id: 'fetch_headers', tab: tab });
@ -19,7 +23,7 @@ var wappalyzer = {};
} else {
$('#detected-apps').html('<div class="empty">' + chrome.i18n.getMessage('nothingToDo') + '</div>');
$('#analyze-headers').hide();
$('#analyze-headers').attr('disabled', 'disabled');
}
});
@ -32,7 +36,7 @@ var wappalyzer = {};
if ( response.tabCache.analyzed.indexOf('headers') > 0 ) {
clearTimeout(popup.pollHeaders);
$('#analyze-headers').hide().removeClass('pending');
$('#analyze-headers').removeAttr('disabled');
}
if ( response.tabCache.count > 0 ) {
@ -65,5 +69,5 @@ var wappalyzer = {};
}
}
popup.init();
$(function() { popup.init(); });
})();

@ -4,10 +4,13 @@
<head>
<title data-i18n="options">Wappalyzer Options</title>
<link rel="icon" href="images/icon_hot.png">
<link rel="stylesheet" href="css/widgets.css">
<link rel="stylesheet" href="css/options.css">
<script src="js/ga.js"></script>
<script src="js/wappalyzer.js"></script>
<script src="js/lib/jquery.min.js"></script>
<script src="js/defaults.js"></script>
<script src="js/options.js"></script>
@ -23,5 +26,12 @@
<p>
<button id="options-save" data-i18n="optionsSave"></button> <span id="options-saved" data-i18n="optionsSaved"></span>
</p>
<div id="about">
<p>
<button id="github" ><img src="images/github.png" width="16" height="16" alt=""/> <span data-i18n="github" ></span></button>
<button id="twitter" ><img src="images/twitter.png" width="16" height="16" alt=""/> <span data-i18n="twitter"></span></button>
<button id="wappalyzer"><img src="images/icon_hot.png" width="16" height="16" alt=""/> <span data-i18n="website"></span></button>
</p>
</body>
</html>

@ -4,6 +4,7 @@
<head>
<title>Popup</title>
<link rel="stylesheet" href="css/widgets.css">
<link rel="stylesheet" href="css/popup.css">
<script src="js/ga.js"></script>
@ -15,6 +16,9 @@
<body>
<div id="detected-apps"></div>
<div id="analyze-headers" data-i18n="analyzeHeaders"></div>
<div id="buttons">
<button id="analyze-headers" data-i18n="analyzeHeaders" disabled="disabled"></button>
<button id="options"></button>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 566 B