新的Chrome浏览器隐身窗口通过HTML / JS [英] New Chrome Incognito Window via HTML/JS

查看:160
本文介绍了新的Chrome浏览器隐身窗口通过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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆