New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An ugly trick to open chrome-extension:// urls in the incognito mode #1544
Comments
According to the docs, we can use split incognito mode, and then we'll be able to open our pages in incognito tabs too. We'll probably have to tweak the find history and Vomnibar tabs code slightly, but everything else should transfer over fine. Only tangentially related, but we seem to rely on the background page to discover whether we're in incognito mode or not; chrome.extensions.inIncognitoContext does this synchronously and natively in content scripts. |
From the docs.
It's not clear whether |
It isn't. |
I don't like splitting incognito mode. For me, Vimium is another layer of Chrome UI, without considering if itself is in the incognito mode. |
@gdh1995 with split incognito mode, all settings are persisted via I was also incorrect earlier; all code will function correctly, apart from the few (3-4, if memory serves) lines of code that rely on synchronous settings. Soon I'll get my housemate to push the |
Althoug we can use "split" mode, this trick is still useful if we need to move tabs like "chrome://*" or other extensions'. |
@frederickk Sorry but I think it's necessary to give a tip here: Chrome has completely dropped the trick of moving normal tabs to incognito windows, since version 52. In 2017 I hadn't found any new trick to do so. |
#1532 said
pages/newtab.html
can not be opened in an incognito window, which istrue
.But I want to say, there is a trick to show normal tabs in any incognito window - althought I don't think it should be merged to vimium - just for information and fun.
In Chrome <= 38 (just for I have only 33, 38 and 40):
chrome.tabs.create
a tab withselected: false
# will be open in a normal windowchrome.tabs.move
the tab created to{index: ~, windowId: $incognito_target}
As for Chrome 40, move across incognito modes is forbidden, but there is still a trick:
chrome.tabs.create
a tab withselected: false
chrome.windows.create
a window withincognito: true, tabId: $tab_created.id
chrome.tabs.move
the tab created to{index: ~, windowId: $incognito_target}
Such a tab is
incognito: false
, but indeed in aincognito: true
window.Urls like
chrome://options
can be shown on this way, too.Note:
chrome://downloads/
has a specific incognito versionchrome-search://local-ntp/local-ntp.html
can be opened directlychrome.windows.create
is used to move tabs across incognito modes, but unfortunately it may be treated as a bug and removed by Chrome in the future.The text was updated successfully, but these errors were encountered: