Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
+ send message to tabs to utilize updated settings
Browse files Browse the repository at this point in the history
  • Loading branch information
verbiiyo committed Apr 25, 2018
1 parent 6d30ca6 commit a633c77
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pop-up/settings-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,11 @@ function updateSettings() {
}
}

chrome.storage.sync.set( settings );
chrome.storage.sync.set( settings, function() {
chrome.tabs.query( {}, function( tabs ) {
for ( var i = 0; i < tabs.length; i++ ) {
chrome.tabs.sendMessage( tabs[i].id, { type: "settings-updated" } );
}
} );
} );
}

0 comments on commit a633c77

Please sign in to comment.