Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Commit b69e135

Browse files
author
Saharsh Yeruva
committed
🐛fix: Notification subtitle shows short link
1 parent 9dcc917 commit b69e135

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ const shortenURL = async (longLink) => {
3131
}
3232
};
3333

34-
const run = (longLink) => {
34+
const run = async (longLink) => {
3535
const startsWIthHTTP = /^http/;
3636
if (startsWIthHTTP.exec(longLink) !== null) {
37-
const notification = `display notification "${longLink}" with title "Link Shortened" subtitle "${shortenURL(
37+
const notification = `display notification "${longLink}" with title "Link Shortened" subtitle "${await shortenURL(
3838
longLink
3939
)}" sound name "purr"`;
4040
applescript.execString(notification);

shorten.app/Contents/document.wflow

+7-16
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
<string>/System/Library/Automator/Run Shell Script.action</string>
5757
<key>ActionName</key>
5858
<string>Run Shell Script</string>
59+
<key>ActionNameComment</key>
60+
<string>Execute Node Script</string>
5961
<key>ActionParameters</key>
6062
<dict>
6163
<key>COMMAND_STRING</key>
@@ -84,7 +86,7 @@
8486
<key>Class Name</key>
8587
<string>RunShellScriptAction</string>
8688
<key>InputUUID</key>
87-
<string>0B0A4597-056F-4F13-A80C-73045575B549</string>
89+
<string>0F203449-94DE-4D80-9E19-7841E6B82969</string>
8890
<key>Keywords</key>
8991
<array>
9092
<string>Shell</string>
@@ -94,9 +96,9 @@
9496
<string>Unix</string>
9597
</array>
9698
<key>OutputUUID</key>
97-
<string>02DEE96C-9F25-4C5F-9986-373F1F15B844</string>
99+
<string>85CB35BD-0DED-4135-8342-705FBAB19673</string>
98100
<key>UUID</key>
99-
<string>4DF2450D-3BA3-484F-B94F-FF3E857B056A</string>
101+
<string>01D4417B-B1D0-4B14-801A-382687E189A7</string>
100102
<key>UnlocalizedApplications</key>
101103
<array>
102104
<string>Automator</string>
@@ -169,6 +171,8 @@
169171
<string>4</string>
170172
</dict>
171173
</dict>
174+
<key>conversionLabel</key>
175+
<integer>0</integer>
172176
<key>isViewVisible</key>
173177
<true/>
174178
<key>location</key>
@@ -182,19 +186,6 @@
182186
</array>
183187
<key>connectors</key>
184188
<dict/>
185-
<key>variables</key>
186-
<array>
187-
<dict>
188-
<key>UUID</key>
189-
<string>5A98951F-9CA1-49F0-8A99-B5F552A313CB</string>
190-
<key>identifier</key>
191-
<string>com.apple.Automator.Variable.AppleScript</string>
192-
<key>name</key>
193-
<string>AppleScript</string>
194-
<key>value</key>
195-
<string>"Text"</string>
196-
</dict>
197-
</array>
198189
<key>workflowMetaData</key>
199190
<dict>
200191
<key>workflowTypeIdentifier</key>

0 commit comments

Comments
 (0)