Skip to content

Commit 63b4cb2

Browse files
committed
add support for arc
Signed-off-by: Jakub Chodorowicz <[email protected]> Add support for Arc Signed-off-by: Jakub Chodorowicz <[email protected]>
1 parent 95647ce commit 63b4cb2

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
📆 2023-07-29
2+
version 1.1
3+
- addded support for [Arc](https://arc.net/)

copy-markdown-url-and-title.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Required parameters:
44
// @raycast.schemaVersion 1
55
// @raycast.title Copy Markdown URL and Title
6-
// @raycast.mode compact
6+
// @raycast.mode silent
77
//
88
// Optional parameters:
99
// @raycast.packageName Copy Markdown URL and Title
@@ -13,6 +13,7 @@
1313
// @raycast.description Copy URL and title from the current browser as markdown.
1414
// @raycast.author Jakub Chodorowicz
1515
// @raycast.authorURL https://github.com/chodorowicz
16+
// script version 1.1
1617

1718
const systemEvents = Application("System Events");
1819
const frontProcess = systemEvents.processes.whose({ frontmost: true })[0];
@@ -31,7 +32,9 @@ const chromiumBrowsers = [
3132
"Vivaldi",
3233
];
3334
const webkitBrowser = ["Safari", "Webkit"];
34-
const theRest = ["Firefox"];
35+
// Arc fails when trying to run JXA automation on it (📆 2023-07-29)
36+
// so we're using here traditional systemEvents approach
37+
const theRest = ["Firefox", "Arc"];
3538

3639
if (chromiumBrowsers.includes(appName)) {
3740
const activeWindow = Application(appName).windows[0];
@@ -56,12 +59,11 @@ if (webkitBrowser.includes(appName)) {
5659

5760
if (theRest.includes(appName)) {
5861
systemEvents.keystroke("l", { using: "command down" });
59-
delay(0.1);
62+
delay(0.2);
6063
systemEvents.keystroke("c", { using: "command down" });
61-
delay(0.1);
62-
/// escape 2x - clear the selection of address bar
63-
// systemEvents.keyCode(53);
64-
// systemEvents.keyCode(53);
64+
delay(0.2);
65+
/// escape clear the selection of address bar
66+
systemEvents.keyCode(53);
6567
url = app.theClipboard();
6668
title = frontProcess
6769
.windows()

0 commit comments

Comments
 (0)