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

Commit

Permalink
Fix Flash loading in Private window
Browse files Browse the repository at this point in the history
Also address #3835 by not
allowing Flash to be allowed persistently.

Auditors: @sririambv

Test Plan:
1. open http://homestarrunner.com/ in a private tab
2. right click to allow Flash once
3. flash should be allowed
4. close the private tab
5. open a regular tab and open http://homestarrunner.com/. flash should be blocked.
  • Loading branch information
diracdeltas committed Sep 30, 2016
1 parent 795ec14 commit 45b3e64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 0 additions & 4 deletions js/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,6 @@ class Main extends ImmutableComponent {
}

get allSiteSettings () {
const activeFrame = FrameStateUtil.getActiveFrame(this.props.windowState)
if (activeFrame && activeFrame.get('isPrivate')) {
return this.props.appState.get('temporarySiteSettings')
}
return this.props.appState.get('siteSettings')
}

Expand Down
15 changes: 9 additions & 6 deletions js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,13 +778,16 @@ function mainTemplateInit (nodeProps, frame) {
click: () => {
appActions.changeSiteSetting(pageOrigin, 'flash', 1)
}
}, {
label: locale.translation('allowFlashAlways'),
click: () => {
const expirationTime = Date.now() + 7 * 24 * 3600 * 1000
appActions.changeSiteSetting(pageOrigin, 'flash', expirationTime)
}
})
if (!frame.get('isPrivate')) {
template.push({
label: locale.translation('allowFlashAlways'),
click: () => {
const expirationTime = Date.now() + 7 * 24 * 3600 * 1000
appActions.changeSiteSetting(pageOrigin, 'flash', expirationTime)
}
})
}
return template
}

Expand Down

0 comments on commit 45b3e64

Please sign in to comment.