add option to keep icon static

main
DaAwesomeP 8 years ago
parent 548fe2191d
commit 8d458f7765

@ -6,6 +6,7 @@
"optionsSave": { "message": "Save options" },
"optionsSaved": { "message": "Saved" },
"optionUpgradeMessage": { "message": "Tell me about upgrades" },
"optionChangeIcon": { "message": "Change the icon in the toolbar to the first detected application instead of the Wappalyzer logo" },
"optionTracking": { "message": "Anonymously send reports on detected applications to wappalyzer.com for research" },
"nothingToDo": { "message": "Nothing to do here." },
"noAppsDetected": { "message": "No applications detected." },

@ -1,5 +1,6 @@
var defaults = {
autoAnalyzeHeaders: 0,
upgradeMessage: 1,
changeIcon: 1,
tracking: 1
};

@ -215,7 +215,9 @@
icon = 'converted/' + icon + '.png';
}
browser.pageAction.setIcon({ tabId: tab.id, path: 'images/icons/' + icon });
if (parseInt(localStorage['changeIcon'], 10)) {
browser.pageAction.setIcon({ tabId: tab.id, path: 'images/icons/' + icon });
}
found = true;
}

@ -27,6 +27,10 @@ document.addEventListener('DOMContentLoaded', function() {
d.getElementById('option-upgrade-message').setAttribute('checked', 'checked');
}
if ( parseInt(options.opts.changeIcon) ) {
d.getElementById('option-change-icon').setAttribute('checked', 'checked');
}
if ( parseInt(options.opts.tracking) ) {
d.getElementById('option-tracking').setAttribute('checked', 'checked');
}
@ -36,6 +40,7 @@ document.addEventListener('DOMContentLoaded', function() {
var option;
options.opts.upgradeMessage = d.getElementById('option-upgrade-message').checked ? 1 : 0;
options.opts.changeIcon = d.getElementById('option-change-icon' ).checked ? 1 : 0;
options.opts.tracking = d.getElementById('option-tracking' ).checked ? 1 : 0;
for ( option in options.opts ) {

@ -29,6 +29,7 @@
<p>
<label for="option-upgrade-message"><input id="option-upgrade-message" type="checkbox"> <span data-i18n="optionUpgradeMessage">Tell me about upgrades</span></label>
<label for="option-change-icon"><input id="option-change-icon" type="checkbox"> <span data-i18n="optionChangeIcon">Change the icon in the toolbar to the first detected application instead of the Wappalyzer logo</span></label>
<label for="option-tracking"><input id="option-tracking" type="checkbox"> <span data-i18n="optionTracking">Anonymously send reports on detected applications to wappalyzer.com for research</span></label>
</p>

Loading…
Cancel
Save