mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
Fix openBrowser AppleScript support for Arc
This commit is contained in:
parent
6efe49abaf
commit
bdb5008c47
|
|
@ -95,6 +95,9 @@ async function tryOpenWithAppleScript({
|
|||
);
|
||||
}
|
||||
|
||||
// Test this manually with:
|
||||
// osascript ./packages/docusaurus/src/commands/utils/openBrowser/openChrome.applescript "http://localhost:8080" "Google Chrome"
|
||||
// osascript ./packages/docusaurus/src/commands/utils/openBrowser/openChrome.applescript "http://localhost:8080" "Arc"
|
||||
async function tryBrowser(browserName: string): Promise<boolean> {
|
||||
try {
|
||||
// This command runs the openChrome.applescript (copied from CRA)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,16 @@ on run argv
|
|||
set theProgram to item 2 of argv
|
||||
end if
|
||||
|
||||
-- Arc: simple open + activate, no tab reuse
|
||||
-- See https://github.com/facebook/docusaurus/issues/11582
|
||||
if theProgram is "Arc" then
|
||||
tell application "Arc"
|
||||
activate
|
||||
open location theURL
|
||||
end tell
|
||||
return
|
||||
end if
|
||||
|
||||
using terms from application "Google Chrome"
|
||||
tell application theProgram
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue