I want to help my friend open a website in a new incognito window when he performs some mouse gestures (custom stroke in Mouse Stroke - Chrome Extension).
How to open new incognito window with Javascript? (Google Chrome)
Asked Answered
mouse stroke eh. –
Ury
you say friend, eh? –
Glower
This is a good question - not for the porn, but for the ability to have two separate sessions on the same website. –
Sombrero
Google lead me here - I was looking for a way to open Facebook/Twitter in incognito windows from a bookmarklet for privacy. Would appreciate any ideas. –
Millisecond
Chrome extensions with the tabs
permission can use the chrome.windows.create
method:
chrome.windows.create({"url": url, "incognito": true});
However, to access it, you'll either need to write your own extension or find an existing one which provides a suitable hook (I don't know whether this can be done with "Mouse Stroke"—I'm too scared to look).
can you recommend a simple chrome extension? –
Nub
@CarlosPliego: it's just HTML and Javascript—write one yourself? developer.chrome.com/extensions –
Hibbert
I dare say this is outdated. In the console it looks like the
windows
object doesn't exist anymore. –
Cynewulf Can you provide an example for what the manifest.json would look like? –
Erdrich
windows.create still works for me given I use it from the background script.
© 2022 - 2024 — McMap. All rights reserved.