Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
extend setInterval to help with #4139 until we have a better fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Oct 6, 2016
1 parent 3f3e69a commit aafa62a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/extensions/brave/content/scripts/flashListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,20 @@ if (chrome.contentSettings.flashActive != 'allow' ||
})
}
replaceAdobeLinks()
let interval = setInterval(replaceAdobeLinks, 1000)
let interval = setInterval(replaceAdobeLinks, 3000)
document.addEventListener('visibilitychange', () => {
clearInterval(interval)
if (document.visibilityState !== 'hidden') {
interval = setInterval(replaceAdobeLinks, 1000)
interval = setInterval(replaceAdobeLinks, 3000)
}
})
})()
insertFlashPlaceholders()
let interval = setInterval(insertFlashPlaceholders, 1000)
let interval = setInterval(insertFlashPlaceholders, 3000)
document.addEventListener('visibilitychange', () => {
clearInterval(interval)
if (document.visibilityState !== 'hidden') {
interval = setInterval(insertFlashPlaceholders, 1000)
interval = setInterval(insertFlashPlaceholders, 3000)
}
})
}
4 changes: 2 additions & 2 deletions app/extensions/brave/content/scripts/passwordManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ if (chrome.contentSettings.passwordManager == 'allow') {
}

autofillPasswordListener()
let interval = setInterval(autofillPasswordListener, 1000)
let interval = setInterval(autofillPasswordListener, 3000)
document.addEventListener('visibilitychange', () => {
clearInterval(interval)
if (document.visibilityState !== 'hidden') {
interval = setInterval(autofillPasswordListener, 1000)
interval = setInterval(autofillPasswordListener, 3000)
}
})
}
Expand Down

1 comment on commit aafa62a

@bbondy
Copy link
Member

@bbondy bbondy commented on aafa62a Oct 12, 2016

Choose a reason for hiding this comment

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

++

Please sign in to comment.