Escanea con tu iPhone para instalar
Vista previa
Usage:
Minimize any YouTube video you want from safari or YouTube application.
Novedades
Versión 1.0
First release
Qué hace
49 acciones-
CommentAuthor: Ari R. Abdulla Usage: Minimize any YouTube video you want.
-
If
-
Get Type
-
Set VariableShortcut Type
-
If
-
Text
-
If
-
Run JavaScript on Web Page
-
Stop This Shortcut
-
If
-
Show Alert
-
Stop This Shortcut
-
If
-
Text
-
Set VariableShortcut Text
-
If
-
Set VariableShortcut Input
-
Nothing
-
If
-
Show Alert
-
Stop This Shortcut
-
If
-
Get Clipboard
-
If
-
Set VariableShortcut Input
-
Nothing
-
If
-
If
-
Set VariableShortcut Input
-
Nothing
-
If
-
Show Alert
-
Stop This Shortcut
-
URL…
-
Set VariableLink
-
If
-
Nothing
-
If
-
Replace Text
-
Set VariableLink
-
Text
-
Run Script Inlinedk.simonbs.Scriptable
-
Get Dictionary from Input
-
Get Dictionary Value
-
Set VariableFinalURL
-
Open URLs
-
Wait
-
Open App
-
Stop This Shortcut
Ver como código
Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.
#include 'actions/web'
#define color darkblue
#define glyph shrinkArrow
/*
Author: Ari R. Abdulla
Usage:
Minimize any YouTube video you want.
*/
if ShortcutInput {
typeOf(ShortcutInput)
@ShortcutType
if @ShortcutType contains "Safari" {
const Text = "{ShortcutInput}"
if Text contains "youtube.com" {
runJavaScriptOnWebpage("let v = document.querySelector('video');\nv.addEventListener('webkitpresentationmodechanged', (e)=>e.stopPropagation(), true);\n\nsetTimeout(()=>v.webkitSetPresentationMode('picture-in-picture'), 3000);\n\ncompletion()")
stop()
} else {
confirm("It seems that it's not a YouTube Link!!!")
stop()
}
} else {
@ShortcutText = "{ShortcutInput}"
if @ShortcutText contains "youtube.com" {
@ShortcutInput = @ShortcutText
} else {
confirm("It seems that it's not a YouTube Link!!!")
stop()
}
}
} else {
const Clipboard = getClipboard()
if Clipboard contains "youtube.com" {
@ShortcutInput = Clipboard
} else {
if Clipboard contains "youtu.be" {
@ShortcutInput = Clipboard
} else {
confirm("First copy one YouTube link!")
stop()
}
}
}
url(@ShortcutInput)
@Link
if @Link contains "watch" {
} else {
replaceText("youtu.be/", "youtube.com/watch?v=", @Link)
@Link
}
rawAction("dk.simonbs.Scriptable.RunScriptInlineIntent", {
"Show-texts": true,
"Show-urls": true,
"ShowWhenRun": false,
"runInApp": false,
"script": "let url = \\\"{@Link}\\\", \\ncitem = \\\"Download Video\\\";\\n{}"
})
const Dictionary = getDictionary(Output)
@FinalURL = Dictionary['url']
openURL(@FinalURL)
wait(5)
openApp("com.google.ios.youtube")
stop()
Abrir en Cherri Playground
Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.
Valoraciones y reseñas
Escribe una reseña–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!
Publicidad
Más de arirafiq
También te puede gustar
Publicidad