Skip to content

Commit

Permalink
added isActive condition to animate timeout callback
Browse files Browse the repository at this point in the history
  • Loading branch information
capJavert committed Jun 17, 2018
1 parent c11b7b1 commit 4d614f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/assets/js/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ browser.runtime.onMessage.addListener(function(request, sender, sendResponse) {
case 'idle':
if (settings.isActive) {
setTimeout(function(){
if (!settings.isActive) {
return;
}

browser.tabs.query({active: true, currentWindow: true}, function(tabs) {
if (tabs.length > 0) {
browser.tabs.sendMessage(
Expand Down

0 comments on commit 4d614f4

Please sign in to comment.