Login About Gallery
[Embed-a-Update]
COMMENT
This shortcut is for shortcut developers only. Users of shortcuts with Embed-a-Update do not have to install anything.
SCRIPTING
Repeat
Count
COMMENT
[Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] Set ID and Version below. Make sure to update Version every time you update your shortcut.
DICTIONARY
ID
2672
Version
1.1.2
VARIABLES
Set variable
LocalData
to
Dictionary
SCRIPTING
Get current IP address
Options Under Construction
SCRIPTING
Count
Items
in
Current IP Address
SCRIPTING
If
Count
is
0
COMMENT
[Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] Could not check for updates, there is no internet connection.
Otherwise
URL
https://routinehub.co/api/v1/shortcuts/
LocalData
/versions/latest
NETWORK
Get contents of
URL
Options Under Construction
SCRIPTING
If
result
contains
success
DICTIONARY
current
LocalData
TEXT
<html><head></head><body><script> // Embed-a-Engine 1.0 function cmp (a, b) { let pa = a.split('.'); let pb = b.split('.'); for (let i = 0; i < Math.max(pa.length, pb.length); i++) { let na = Number(pa[i]); let nb = Number(pb[i]); if (isNaN(na)) na = 0; if (isNaN(nb)) nb = 0; if (na > nb) return "RollbackAvailable"; if (nb > na) return "UpdateAvailable"; } return "NoChanges"; }; let data =
CompareVersionsData
; document.write(cmp(data.current, data.new)); </script></body></html>
URL
data:text/html,
CompareVersionsHTML
SAFARI
Get contents of web page at
URL
SCRIPTING
If
Contents of Web Page
is
NoChanges
COMMENT
[Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] No updates are available at this time.
Otherwise
SCRIPTING
If
Contents of Web Page
is
RollbackAvailable
TEXT
A rollback is available:
LocalData
Remote
Otherwise
TEXT
An update is available:
LocalData
Remote
End If
SCRIPTING
Choose from Menu
Install result (Version)
URL
https://routinehub.co/download/
Remote
SAFARI
Open
URL
SCRIPTING
Exit shortcut with
URL
Not now
End Menu
End If
Otherwise
SCRIPTING
Show alert
Informational Message
Title
optional
Show Cancel Button
End If
End If
End Repeat
TEXT
<dict> <key>WFWorkflowActionIdentifier</key> <string>is.workflow.actions.comment</string> <key>WFWorkflowActionParameters</key> <dict> <key>WFCommentActionText</key> <string>[[Embed-a-Here]]</string> </dict> </dict>
SHORTCUTS
Get my shortcuts
SCRIPTING
Choose from
My Shortcuts
Prompt
optional
Select Multiple
VARIABLES
Set variable
shortcut
to
Selected Item
SCRIPTING
Set name of
shortcut
to
a.plist
SCRIPTING
Set name of
Renamed Item
to
a.plist
SCRIPTING
Otherwise
SCRIPTING
Show alert
Informational Message
Title
optional
Show Cancel Button
SCRIPTING
Exit shortcut with
Result
End If
SCRIPTING
Choose from Menu
Embed-a-Update!
URL
https://raw.githubusercontent.com/pfgithub/embed-a-update/master/embed.plist
NETWORK
Get contents of
URL
Options Under Construction
End Menu
DOCUMENTS
Case Sensitive
Regular Expression
SCRIPTING
Set name of
Updated Text
to
shortcut
.shortcut
DOCUMENTS
Get link to
Renamed Item
SAFARI

Showcuts

Magic Vars

Screenshot

Submitted Anonymously 9 days ago

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

0