Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 69 #70

Merged
merged 5 commits into from
Feb 14, 2017
Merged

Issue 69 #70

merged 5 commits into from
Feb 14, 2017

Conversation

beshur
Copy link
Member

@beshur beshur commented Feb 12, 2017

  • Updated options saving mechanism - no localStorage no more for providers - only chrome.storage
  • Misc refactoring

background.js Outdated
}

// Get options from chrome.storage.sync.
function restore_options(callback) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restoreOptions уже тогда

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ага, май бэд

content.js Outdated
}

});
this.allowed = allowed;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

providers.filter(provider => provider.enabled).map(provider => provider.uri)

options.js Outdated
for (var i = 0; i < providersCurrent.length; i++) {
providersCurrent[i]['enabled'] = toggler;
providersCurrent = providersCurrent.map(function(item) {
return item.enabled = toggler;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Разве это не boolean возвращает?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

переназначает всем элементам enabled на toggler

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я к тому, что после этого мапа providersCurrent будет массив boolean

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

гм, но как тогда оно работает? я посмотрю позже

Copy link
Member Author

@beshur beshur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated 3f311b2

background.js Outdated
}

// Get options from chrome.storage.sync.
function restore_options(callback) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ага, май бэд

options.js Outdated
for (var i = 0; i < providersCurrent.length; i++) {
providersCurrent[i]['enabled'] = toggler;
providersCurrent = providersCurrent.map(function(item) {
return item.enabled = toggler;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

гм, но как тогда оно работает? я посмотрю позже

@endway endway merged commit 141a9df into master Feb 14, 2017
@endway endway deleted the issue-69 branch February 14, 2017 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants