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

Commit

Permalink
Fix netflix notification from tor tabs appearing on normal tabs
Browse files Browse the repository at this point in the history
fix #14227

Test Plan:
1. open tor tab
2. go to https://www.netflix.com
3. you should not see a widevine notification.
4. switch back to a regular tab. no notification should appear.
5. open a non-tor tab and repeat step 2. you should see a widevine
   notification
  • Loading branch information
diracdeltas committed Jun 22, 2018
1 parent bffca1d commit 6d141f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/renderer/components/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ class Main extends React.Component {
const widevinePanelDetail = currentWindow.get('widevinePanelDetail', Immutable.Map())
const loginRequiredDetails = basicAuthState.getLoginRequiredDetail(state, activeTabId)
const focused = isFocused(state)
const isTor = frameStateUtil.isTor(activeFrame)

const props = {}
// used in renderer
Expand All @@ -560,7 +559,7 @@ class Main extends React.Component {
!!currentWindow.get('braveryPanelDetail')
props.showClearData = currentWindow.getIn(['ui', 'isClearBrowsingDataPanelVisible'], false)
props.showImportData = currentWindow.has('importBrowserDataDetail')
props.showWidevine = currentWindow.getIn(['widevinePanelDetail', 'shown']) && !isLinux && !isTor
props.showWidevine = currentWindow.getIn(['widevinePanelDetail', 'shown']) && !isLinux
props.showAutoFillAddress = currentWindow.has('autofillAddressDetail')
props.showAutoFillCC = currentWindow.has('autofillCreditCardDetail')
props.showLogin = !!loginRequiredDetails
Expand Down
5 changes: 5 additions & 0 deletions app/renderer/rendererTabEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,11 @@ function allowRunningWidevinePlugin (tabId, frame) {
* accepted
*/
function showWidevineNotification (tabId, frame, noWidevineCallback, widevineCallback) {
if (frameStateUtil.isTor(frame)) {
// Never show widevine prompts on a Tor tab (needed for
// https://github.com/brave/browser-laptop/issues/13626)
return
}
// https://www.nfl.com is said to be a widevine site but it actually uses Flash for me Oct 10, 2016
const widevineSites = ['https://www.netflix.com',
'http://bitmovin.com',
Expand Down

0 comments on commit 6d141f2

Please sign in to comment.