3

我正在为 SlimTimer.com 创建一个桌面链接,我需要它以设置的窗口宽度打开。

[Desktop Entry]
Name=SlimTimer
Comment=Webapp for SlimTimer
Type=Application
Exec=webapp-container http://slimtimer.com/client/
Terminal=false
X-Ubuntu-Touch=true
X-Ubuntu-StageHint=SideStage

我试图模仿的原始链接是

<a href="javascript:newwindow=window.open('http://slimtimer.com/client/',
'','resizable=1,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,
width=175,height=450');newwindow.focus();" id="timer-link">Open Timer</a>

有没有办法做到这一点?或者我是否必须使用 JavaScript 函数创建自己的页面来调整大小并使用“onload”重定向?

根据 webapp-container 有一个全屏选项,但我看不到宽度或高度。

Usage: webapp-container [-h|--help] [--fullscreen] [--maximized] [--inspector] [--app-id=APP_ID] [--homepage=URL] [--webapp=name] [--webappModelSearchPath=PATH] [--webappUrlPatterns=URL_PATTERNS] [--enable-back-forward] [--enable-addressbar] [--store-session-cookies] [URL]

Options:
  -h, --help                          display this help message and exit
  --fullscreen                        display full screen
  --maximized                         opens the application maximized
  --inspector                         run a remote inspector on port 9221
  --app-id=APP_ID                     run the application with a specific APP_ID
  --homepage=URL                      override any URL passed as an argument
  --webapp=name                       try to match the webapp by name with an installed integration script
  --webappModelSearchPath=PATH        alter the search path for installed webapps and set it to PATH. PATH can be an absolute or path relative to CWD
  --webappUrlPatterns=URL_PATTERNS    list of comma-separated url patterns (wildcard based) that the webapp is allowed to navigate to

Chrome options (if none specified, no chrome is shown by default):
  --enable-back-forward               enable the display of the back and forward buttons
  --enable-addressbar                 enable the display of the address bar
  --store-session-cookies             store session cookies on disk
4

0 回答 0