File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/osascript
2
+
3
+ # Required parameters:
4
+ # @raycast.schemaVersion 1
5
+ # @raycast.title Download Current URL
6
+ # @raycast.mode silent
7
+
8
+ # Optional parameters:
9
+ # @raycast.packageName Safari
10
+ # @raycast.icon images/safari.png
11
+
12
+ # @Documentation:
13
+ # @raycast.author Michael Bianco
14
+ # @raycast.authorURL https://github.com/iloveitaly
15
+ # @raycast.description Download the currently active tab's URL.
16
+
17
+ tell application " Safari"
18
+ activate
19
+ set currentTab to current tab of window 1
20
+ set theURL to URL of currentTab
21
+ end tell
22
+
23
+ -- Simulate pressing Option key and clicking the link
24
+ tell application " System Events"
25
+ keystroke " l" using {command down} -- Select the address bar (Cmd + L)
26
+ delay 0.5
27
+ keystroke return using {option down} -- Press Option + Return to download the file
28
+ end tell
You can’t perform that action at this time.
0 commit comments