mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
启动浏览器实例添加窗口位置参数
This commit is contained in:
parent
0e43a3eac8
commit
28b7225c4d
@ -119,6 +119,7 @@ const startClient = async (options) => {
|
|||||||
proxy = null,
|
proxy = null,
|
||||||
browserPath = getBrowserPath(browserType),
|
browserPath = getBrowserPath(browserType),
|
||||||
windowSize = null,
|
windowSize = null,
|
||||||
|
windowPosition = null,
|
||||||
incognito = false,
|
incognito = false,
|
||||||
headless = false,
|
headless = false,
|
||||||
disableExtensions = false,
|
disableExtensions = false,
|
||||||
@ -150,6 +151,7 @@ const startClient = async (options) => {
|
|||||||
|
|
||||||
const optionArgs = [
|
const optionArgs = [
|
||||||
windowSize ? `--window-size=${windowSize}` : "--start-maximized",
|
windowSize ? `--window-size=${windowSize}` : "--start-maximized",
|
||||||
|
windowPosition ? `--window-position=${windowPosition}` : "",
|
||||||
proxy ? `--proxy-server=${proxy}` : "",
|
proxy ? `--proxy-server=${proxy}` : "",
|
||||||
incognito ? incognitoArg[browserType] : "",
|
incognito ? incognitoArg[browserType] : "",
|
||||||
headless ? "--headless" : "",
|
headless ? "--headless" : "",
|
||||||
|
@ -81,11 +81,18 @@ export const browserCommands = {
|
|||||||
width: 3,
|
width: 3,
|
||||||
},
|
},
|
||||||
windowSize: {
|
windowSize: {
|
||||||
label: "窗口尺寸",
|
label: "窗口尺寸(格式:宽,高)",
|
||||||
component: "VariableInput",
|
component: "VariableInput",
|
||||||
icon: "window",
|
icon: "window",
|
||||||
width: 6,
|
width: 6,
|
||||||
placeholder: "如1920x1080,不设置则最大化",
|
placeholder: "如「1280,720」不设置则最大化",
|
||||||
|
},
|
||||||
|
windowPosition: {
|
||||||
|
label: "窗口位置(格式:x,y)",
|
||||||
|
component: "VariableInput",
|
||||||
|
icon: "location_on",
|
||||||
|
width: 6,
|
||||||
|
placeholder: "如「160,120」不设置为0,0",
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
label: "代理",
|
label: "代理",
|
||||||
@ -98,7 +105,7 @@ export const browserCommands = {
|
|||||||
label: "浏览器路径",
|
label: "浏览器路径",
|
||||||
component: "VariableInput",
|
component: "VariableInput",
|
||||||
icon: "folder",
|
icon: "folder",
|
||||||
width: 12,
|
width: 6,
|
||||||
options: {
|
options: {
|
||||||
dialog: {
|
dialog: {
|
||||||
type: "open",
|
type: "open",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user