Escaneie com o iPhone para instalar
Pré-visualização
Usage:
Minimize any YouTube video you want from safari or YouTube application.
Novidades
Versão 1.0
First release
O que ele faz
49 ações-
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 as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele 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 no Cherri Playground
Descompilado com cherri 2.3.0 (GPL-2.0). Pode precisar de pequenos ajustes antes de compilar.
Avaliações e comentários
Escrever uma avaliação–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Ainda não há avaliações. Seja o primeiro a compartilhar o que você pensa!
Publicidade
Mais de arirafiq
Você também pode gostar
Publicidade