新的Chrome浏览器隐身窗口通过HTML / JS [英] New Chrome Incognito Window via HTML/JS
问题描述
可能存在重复:
如何用Javascript打开新的隐身窗口? (Google Chrome)
是否可以开启新的隐身窗口我通过超链接上的某些属性或某些JavaScript选择的URL?如果是,我该怎么做?
解决方案
chrome.windows.create({
url:http://www.google.com ,
隐身:true
});
清单中需要标签
权限,但是就是这样。
请注意,上述内容已获得用户的同意,允许该扩展程序进入隐身模式以及其他与制表符相关的权限。我无法100%分辨您是否正在开发扩展程序 - 我认为不是 - 但无论如何,这是扩展解决方案,否则就不存在。
Possible Duplicate:
How to open new incognito window with Javascript? (Google Chrome)
Is it possible to open a new incognito window to a URL of my choosing via either some attributes on a hyperlink or some javascript? If it is, how do I do it?
There's an easy way if (and only if) you're developing an extension:
chrome.windows.create({
url: "http://www.google.com",
incognito: true
});
It requires tabs
permission in the manifest, but that's it.
Note that the above has the user consent to allowing the extension to enter incognito mode, among other tab-related permission. I can't tell 100% whether you're developing an extension -- I assume not -- but in any case that's the extension solution and there isn't one otherwise.
这篇关于新的Chrome浏览器隐身窗口通过HTML / JS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!