简体   繁体   English

在Chrome启动时打开多个窗口

[英]Open multiple windows on chrome start

I work in a situation where the computer I use is inconsistent, and I often have never logged onto the computer I'm working on before. 我在使用的计算机不一致的情况下工作,而且我以前从未登录过正在使用的计算机。 As such, I use chrome and launch most of the things I need using the "on startup" option. 因此,我使用chrome并使用“启动时”选项启动所需的大多数东西。 My issue is that I have a page that I would like to open in a separate window. 我的问题是我有一个页面想要在单独的窗口中打开。 I've done some finagling with a javascript bookmarklet that does something similar to what I want, but it isn't perfect. 我用javascript书签完成了一些工作,该书签的功能类似于我想要的,但并不完美。

javascript:window.open("http://google.com","_blank","foobar"); javascript:window.close();

This will open a new window at google.com as expected, however It has a few flaws: 这将按预期在google.com上打开一个新窗口,但是它存在一些缺陷:

  • The window is not fullscreen. 窗口不是全屏的。 It will always open at a smaller window size, and is horribly inconsistent on where it will show up. 它将始终以较小的窗口大小打开,并且在显示位置上非常不一致。
  • It isn't a standard window, I can't type in the address bar, add tabs, see my bookmarks bar, or use javascript. 这不是标准窗口,无法输入地址栏,添加标签,查看书签栏或使用javascript。
  • I honestly don't know what the second and third parameters in window.open do, the window will open in a tab instead of a window if I don't have them, but it doesn't care what is there. 老实说,我不知道window.open中的第二个和第三个参数有什么作用,如果我没有这些参数,则该窗口将在选项卡中打开,而不是在一个窗口中打开,但它不在乎那里有什么

I have attempted passing javascript commands through the window.open command, but the window refuses to do any of them. 我试图通过window.open命令传递javascript命令,但是窗口拒绝执行其中任何一个。
I understand that this is the type of thing that shouldn't be decided by a webpage, and should be left to a user. 我知道这是一种不应由网页决定的事情,应该留给用户。 But I am the user... 但是我是用户...

I believe that most of the parameters you mentioned (fullscreen window, window size, other window features) are specified in the third argument of window.open() . 我相信您提到的大多数参数(全屏窗口,窗口大小,其他窗口功能)都是在window.open()的第三个参数中指定的。 For example: 例如:

window.open("http://google.com","_blank","fullscreen=yes;menubar=yes;titlebar=yes")

would open http://google.com in a new window ( _blank ) in fullscreen view ( fullscreen=yes; ) and render the menubar and titlebar ( menubar=yes;titlebar=yes ). 将在全屏视图( fullscreen=yes; )的新窗口( _blank )中打开http://google.com并呈现菜单栏和标题栏( menubar=yes;titlebar=yes )。 A list of standard values is provided at w3schools.com and developer.mozilla.org w3schools.comdeveloper.mozilla.org中提供了标准值列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM