-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restoreOptions
уже тогда
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Разве это не boolean
возвращает?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
переназначает всем элементам enabled
на toggler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я к тому, что после этого мапа providersCurrent
будет массив boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
гм, но как тогда оно работает? я посмотрю позже
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
гм, но как тогда оно работает? я посмотрю позже