我沒有找到任何辦法隱藏在Chrome工具欄,但你可以試試這些腳本:
tell application "Google Chrome"
open location "http://example.com"
tell window 1 to enter presentation mode
end tell
tell application "Google Chrome"
tell (make new window)
set URL of active tab to "http://example.com"
set bounds to {0, 22, 1200, 900}
end tell
activate
end tell
tell application "Safari"
make new document with properties {URL:"http://example.com"}
tell window 1
set bounds to {0, 22, 1200, 900}
end tell
activate
end tell
tell application "System Events" to tell process "Safari"
tell menu "View" of menu bar 1
if exists menu item "Hide Toolbar" then click menu item "Hide Toolbar"
if exists menu item "Hide Status Bar" then click menu item "Hide Status Bar"
if exists menu item "Hide Tab Bar" then click menu item "Hide Tab Bar"
if exists menu item "Hide Bookmarks Bar" then click menu item "Hide Bookmarks Bar"
end tell
end tell
FWIW'告訴視窗1套界限爲{ 0,22,1440,900} end tell'將在macbook air上將新窗口設置爲全屏,因爲1440x900是設備的屏幕分辨率。 –
非常詳細的答案!謝謝。我使用第一個例子 - 簡單的 - 在Chrome上運行JavaScript。謝謝! – nurxyz