-
Notifications
You must be signed in to change notification settings - Fork 975
add tor menu items, make tor switch per tab #14467
Conversation
fix #14459 test plan: 1. every menu that says 'open in new private tab' should also have an item that says 'open in new tor tab' 2. opening in a new tor tab should show the tor indicator on 3. opening in a new private tab should show the tor indicator off 4. ddg is enabled by default for now but can be turned off 5. cmd+click should open in the same type as the current tab 6. turning the tor switch on/off in a new tab should work 7. in a tor tab, right-click should show 'open in new tor tab' first
js/constants/appConfig.js
Outdated
@@ -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': false, | |||
'search.use-alternate-private-search-engine': true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debatable; alternative (can be done in follow-up) is to make DDG a per-tab setting like Tor
Test Plan: Check that the DDG switch in regular private tabs doesn't affect tor tabs and that the DDG switch in about:preferences for Tor tabs doesn't affect regular private tabs. Also check that DDG is default on for tor tabs.
* change "make private tabs" to "make this tab" * move DDG section below tor section in about:newtab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. I especially like that the 'Open this link in New Private Tab [with Tor]' menu items are re-ordered if the current tab is / is not Tor.
Spotted one functional issue, and one wording question.
ensureAtLeastOneWindow({ | ||
url: 'about:newtab', | ||
isPrivate: true, | ||
isTor: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not result in a tor tab when there are 0 windows open, which is a common macOS scenario (as judging from the number of issues that were raised when I had a similar bug!).
In order to fix this we simply need to make the openFramesInWindow
function inside app/browser/windows.js aware of the tor:
property for the createTabRequested
options argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch thanks!
@@ -27,6 +27,8 @@ privateTabText1=Whether or not you use Tor, private tabs are not logged in page | |||
privateTabTitle=This is a Private Tab | |||
privateTabTorTitle=Make private tabs much more private with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change, perhaps we should not make it seem like a global setting a more like a setting just for the current tab: 'Make this tab much more private with Tor'?
js/contextMenus.js
Outdated
template.push( | ||
openInNewPrivateTabMenuItem(link, frame.get('tabId')), | ||
openInNewPrivateTabMenuItem(link, frame.get('tabId'), isTor), | ||
openInNewPrivateTabMenuItem(link, frame.get('tabId'), !isTor), | ||
openInNewWindowMenuItem(link, frame.get('isPrivate'), frame.get('partitionNumber')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug: this should send isTor as the last argument
1. opening a new tor tab with no open windows should open a window with a tor tab 2. right-click 'open in new window' from a tor tab should open the link in a new window with a tor tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all works great
fix #14459
test plan:
item that says 'open in new tor tab'
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests