Skip to content

Commit

Permalink
Fix for not saving new preset settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ejci committed Jul 12, 2015
1 parent 635a6ae commit f56a7ef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extension/common/presets.js
Original file line number Diff line number Diff line change
@@ -1,5 1,5 @@
var presets = (function() {
'use strict';
'use strict';
var list = [];
var selected = false;

Expand Down
12 changes: 9 additions & 3 deletions extension/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 177,9 @@ var init = function(prs) {
switch (ev.target.value) {
case 'action::save':
modal.confirm('Do you want to save "' selected.name '" preset?', function() {
for (var i = 0; i < selected.gains.length; i )
selected.gains[i] = getValue('ch-eq-slider-' (i 1))
for (var i = 0; i < selected.gains.length; i ) {
selected.gains[i] = getValue('ch-eq-slider-' (i 1));
}
console.log('action::save', selected);
presets.setPreset(selected);
});
Expand All @@ -188,8 189,13 @@ var init = function(prs) {
modal.prompt('New preset name', function(name) {
if (name && name.length > 0) {
var preset = JSON.parse(JSON.stringify(selected));
for (var i = 0; i < preset.gains.length; i ) {
preset.gains[i] = getValue('ch-eq-slider-' (i 1));
}
preset.name = name;
presets.setNewPreset(preset)
presets.setNewPreset(preset);
presets.setSelected(name);

}
}, function() {
});
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
#Audio EQ for Chrome

With [Audio EQ for Chrome](https://chrome.google.com/webstore/detail/lfafdlnjaliaghpjdajmlcnnblkgcefh/null) you can control your audio and video from all tabs in one place.
With [Audio EQ for Chrome](https://chrome.google.com/webstore/detail/lfafdlnjaliaghpjdajmlcnnblkgcefh/) you can control your audio and video from all tabs in one place.
More info [here](http://lab.ejci.net/Chrome-Audio-EQ/).

For best results install HTML5ify (https://chrome.google.com/webstore/detail/html5ify/jikbjpjgjmmdhcmlagappehlpiljoaop).
Expand Down

0 comments on commit f56a7ef

Please sign in to comment.