Skip to content

Commit eb4b455

Browse files
Merge pull request #1030 from JNBARY/patch-1
Update safari-create-reading-list-item.applescript
2 parents 3fba172 + 241b626 commit eb4b455

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

commands/apps/safari/safari-create-reading-list-item.applescript

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,28 @@
88
# Optional parameters:
99
# @raycast.packageName Safari
1010
# @raycast.icon images/safari.png
11-
# @raycast.argument1 { "type": "text", "placeholder": "Link" }
11+
# @raycast.argument1 { "type": "text", "placeholder": "Link, use 'open' for current Safari page" }
1212
# @raycast.argument2 { "type": "text", "placeholder": "Title", "optional": true }
1313

1414
# @Documentation:
1515
# @raycast.author Thomas Paul Mann
16+
# @raycast.author Thomas Paul Mann
1617
# @raycast.authorURL https://github.com/thomaspaulmann
18+
# @raycast.author JNBARY
19+
# @raycast.authorURL https://github.com/JNBARY
1720
# @raycast.description Add a new Reading List item with the given URL. Allows a custom title to be specified.
1821

1922
on run argv
2023
try
2124
set linkArgument to item 1 of argv as text
2225
set titleArgument to item 2 of argv as text
2326

27+
if linkArgument is equal to "open" then
28+
tell application "Safari"
29+
set linkArgument to URL of current tab of window 1 as text
30+
end tell
31+
end if
32+
2433
if titleArgument is equal to "" then
2534
tell application "Safari" to add reading list item linkArgument
2635
else

0 commit comments

Comments
 (0)