Login About Gallery
YTScript.shortcut
Accepts
Safari Web Pages and URLs
DICTIONARY
Author
net00
VersionID
1E13
RID
6300
DICTIONARY
optLists
3 items
configVars
6 items
icons
5 items
VARIABLES
Set variable
mainResources
to
mainResources
TEXT
Match
redoSettings|el\=detailpage
in
Shortcut Input
Case Sensitive
SCRIPTING
If
Matches
does not have any value
NETWORK
Get contents of
https://routinehub.co/api/v1/shortcuts/
RID
/versions/latest
Options Under Construction
DOCUMENTS
Get text from
Contents of URL
SCRIPTING
SCRIPTING
Choose from Menu
Update Directly
DOCUMENTS
Replace
^.+?(?=\/shortcut)
with
shortcuts:/
in
Contents of URL
Case Sensitive
Regular Expression
SAFARI
SCRIPTING
Exit shortcut with
Result
Skip This Time
End Menu
End If
End If
DOCUMENTS
Get File
Service
iCloud Drive
Show Document Picker
File Path
/Shortcuts/example.txt
Error If Not Found
SCRIPTING
If
File
does not have any value
SCRIPTING
If
Shortcut Input
is not
redoSettings
SCRIPTING
Show alert
Missing Settings
Title
Missing Settings
Show Cancel Button
Otherwise
SCRIPTING
Show alert
Reconfiguring Settings
Title
Reconfiguring Settings
Show Cancel Button
End If
SCRIPTING
Choose from
mainResources
Prompt
Video Save Location
Select Multiple
SCRIPTING
Choose from
mainResources
Prompt
Audio Save Location
Select Multiple
SCRIPTING
Choose from
mainResources
Prompt
Download Notification Alerts
Select Multiple
SCRIPTING
Get
Value
for
Chosen Item
in
mainResources
SCRIPTING
Get
Value
for
Chosen Item
in
mainResources
SCRIPTING
Get
Value
for
Chosen Item
in
mainResources
TEXT
{"videoSave":"
Dictionary Value
","audioSave":"
Dictionary Value
","allowNotifs":"
Dictionary Value
"}
SCRIPTING
Set name of
Text
to
YTScriptSetup.json
DOCUMENTS
Service
iCloud Drive
Ask Where to Save
Destination Path
/Shortcuts/YTScriptSetup.json
Overwrite If File Exists
SCRIPTING
Show alert
Configuration Complete
Title
Configuration Complete
Show Cancel Button
SCRIPTING
Exit shortcut with
Result
End If
DICTIONARY
videoSave
audioSave
allowNotifs
SCRIPTING
If
Shortcut Input
does not have any value
WEB
Get URLs from
Clipboard
VARIABLES
Set variable
ytInput
to
URLs
Otherwise
VARIABLES
Set variable
ytInput
to
Shortcut Input
End If
TEXT
Match
\byoutube|\byoutu\.be(?!$)|(?<=v\=).{11}|(?<=youtu\.be\/).{11}|(?<=embed\/).{11}
in
ytInput
Case Sensitive
SCRIPTING
Count
Items
in
urlEleMatches
SCRIPTING
If
urlElements
is greater than or equal to
2
SCRIPTING
Get
Last Item
from
urlEleMatches
VARIABLES
Set variable
ytID
to
Item from List
SCRIPTING
If
ytInput
is
el=detailpage
URL
https://www.youtube.com/get_video_info?video_id=
ytID
&
ytInput
Otherwise
URL
https://www.youtube.com/get_video_info?video_id=
ytID
End If
NETWORK
Get contents of
If Result
Options Under Construction
SCRIPTING
Get dictionary from
Contents of URL
SCRIPTING
DOCUMENTS
Replace
\+(?!\+)
with
in
Dictionary Value
Case Sensitive
Regular Expression
VARIABLES
Set variable
ytFTitle
to
Updated Text
TEXT
Match
^.{30}
in
ytFTitle
Case Sensitive
SCRIPTING
Count
Characters
in
ytFTitle
SCRIPTING
If
Count
is greater than
30
TEXT
Current Video:
Matches
...
Otherwise
TEXT
Current Video:
ytFTitle
End If
VARIABLES
Set variable
titleInfo
to
If Result
VARIABLES
Set variable
thumbURL
to
Dictionary Value
SCRIPTING
Get type of
ytInput
SCRIPTING
If
Type
contains
Safari
SAFARI
Run JavaScript on
ytInput
Options Under Construction
SCRIPTING
Get
First Item
from
JavaScript Result
SCRIPTING
If
Item from List
does not contain
Mobile
SCRIPTING
Show alert
Incompatible Website
Title
Incompatible Website
Show Cancel Button
SCRIPTING
Exit shortcut with
Result
End If
SCRIPTING
Get
Last Item
from
JavaScript Result
VARIABLES
Set variable
ytMaxQURL
to
Item from List
Otherwise
SCRIPTING
Get dictionary from
streamingData
SCRIPTING
Get dictionary from
formats
SCRIPTING
Get
First Item
from
Dictionary
SCRIPTING
Get
Value
for
url
in
Item from List
VARIABLES
Set variable
ytMinQURL
to
Dictionary Value
SCRIPTING
Get
Last Item
from
Dictionary
SCRIPTING
Get
Value
for
url
in
Item from List
VARIABLES
Set variable
ytMaxQURL
to
Dictionary Value
SCRIPTING
If
ytMaxQURL
does not have any value
SCRIPTING
If
ytInput
is
el=detailpage
SCRIPTING
Show alert
Protected Stream
Title
Protected Stream
Show Cancel Button
TEXT
<html> <head> <title>YTScript - Redirect</title> </head> <body onload="YTopen()"> <script> function YTopen() { window.location = "https://www.youtube.com/watch?v=
ytID
"; } </script> </body> </html>
URL
data:text/html,
Text
SAFARI
Open
URL
SCRIPTING
Exit shortcut with
Result
Otherwise
TEXT
el=detailpage
SCRIPTING
Set name of
ytInput
to
Text
SHORTCUTS
Run
YTScript
Show While Running
SCRIPTING
Exit shortcut with
Result

Showcuts

Magic Vars

Screenshot

Submitted by 1118073 3 years ago

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

0

106 more actions