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

Commit

Permalink
turn tor to default off
Browse files Browse the repository at this point in the history
fix #14124
  • Loading branch information
diracdeltas authored and bsclifton committed Jun 23, 2018
1 parent 641156b commit aedc36f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
8 changes: 0 additions & 8 deletions app/browser/reducers/aboutNewTabReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ const aboutNewTabReducer = (state, action) => {
torEnabled: action.value
}
})
if (action.value === true) {
// Also enable DDG
state = aboutNewTabState.mergeDetails(state, {
newTabPageDetail: {
useAlternativePrivateSearchEngine: action.value
}
})
}
}
}
return state
Expand Down
15 changes: 11 additions & 4 deletions js/about/newprivatetab.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,22 @@ const useAlternativePrivateSearchEngineDataKeys = ['newTabDetail', 'useAlternati
const torEnabled = ['newTabDetail', 'torEnabled']
const torFAQ = 'https://github.com/brave/browser-laptop/wiki/Using-Tor-in-Brave#faq'

const onChangeTor = (value) => {
aboutActions.changeSetting(settings.USE_TOR_PRIVATE_TABS, value)
if (value === true) {
// Also change DDG to enabled since Google is unusable with Tor.
aboutActions.changeSetting(settings.USE_ALTERNATIVE_PRIVATE_SEARCH_ENGINE, value)
}
aboutActions.recreateTorTab(value)
}

class NewPrivateTab extends React.Component {
onChangePrivateSearch (e) {
aboutActions.changeSetting(settings.USE_ALTERNATIVE_PRIVATE_SEARCH_ENGINE, e.target.value)
}

onChangeTor (e) {
aboutActions.changeSetting(settings.USE_TOR_PRIVATE_TABS, e.target.value)
aboutActions.recreateTorTab(e.target.value)
onChangeTor(e.target.value)
}

onClickPrivateSearchTitle () {
Expand All @@ -39,8 +47,7 @@ class NewPrivateTab extends React.Component {

onClickTorTitle () {
const newSettingValue = !this.props.newTabData.getIn(torEnabled)
aboutActions.changeSetting(settings.USE_TOR_PRIVATE_TABS, newSettingValue)
aboutActions.recreateTorTab(newSettingValue)
onChangeTor(newSettingValue)
}

render () {
Expand Down
4 changes: 2 additions & 2 deletions js/constants/appConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module.exports = {
'general.spellcheck-languages': Immutable.fromJS(['en-US']),
'search.default-search-engine': 'Google',
'search.offer-search-suggestions': false, // false by default for privacy reasons
'search.use-alternate-private-search-engine': true, // true for DDG search in Private Tab since Tor is enabled
'search.use-alternate-private-search-engine': false,
'tabs.switch-to-new-tabs': false,
'tabs.paint-tabs': true,
'tabs.tabs-per-page': 20,
Expand All @@ -174,7 +174,7 @@ module.exports = {
'security.autoplay.media': autoplayOption.ALWAYS_ALLOW,
'security.flash.installed': false,
'security.site-isolation-enabled': false,
'tor.private-tabs.enabled': true,
'tor.private-tabs.enabled': false,
'shields.blocked-count-badge': true,
'shields.compact-bravery-panel': false,
// sync
Expand Down

0 comments on commit aedc36f

Please sign in to comment.