Mit dem iPhone scannen, um zu installieren
Vorschau
Usage:
Minimize any YouTube video you want from safari or YouTube application.
Neue Funktionen
Version 1.0
First release
Was er macht
49 Aktionen-
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
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#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()
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von arirafiq
Das gefällt dir vielleicht auch
Werbung