Skip to content

Commit

Permalink
refactor storage save (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkio authored Sep 15, 2017
1 parent 1f5fdb5 commit a6d951a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/popout/popout.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ chrome.tabs.executeScript(
);

function toggleAllMasks() {
console.log('Toggling...');
allMasksEnabled = !allMasksEnabled;
chrome.storage.local.set({ isMasked: allMasksEnabled }, () => {
allMasksEnabled ? injectEnableAllMasks() : injectDisableAllMasks();
Expand Down
12 changes: 7 additions & 5 deletions src/popout/shorten-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ function getSettings() {
}

function saveSettings(alias, event, channel, shortenedLink, longLink) {
chrome.storage.sync.set({ alias: $alias.val() || '' });
chrome.storage.sync.set({ event: $event.val() || '' });
chrome.storage.sync.set({ channel: $channel.val() || '' });
chrome.storage.sync.set({ shortenedLink: $shortenedLink.el.href || '' });
chrome.storage.sync.set({ longLink: $longLink.html() });
chrome.storage.sync.set({
alias: $alias.val() || '',
event: $event.val() || '',
channel: $channel.val() || '',
shortenedLink: $shortenedLink.el.href || '',
longLink: $longLink.html()
});
}

0 comments on commit a6d951a

Please sign in to comment.