Отсканируй на iPhone, чтобы установить
Просмотр
DELETED
Что нового
Версия 11.0
DELETED
Что делает
Действий: 15-
CommentMade by QuartzWarrior - Uses tiny url - Stores shortened urls in iCloud/Shortcuts/ReUp/URL
-
Get File
-
If
-
Create Folder
-
Show AlertFirst time running shortcut.
-
Save File
-
If
-
If
-
Ask for InputWhat do you want this link to be called?
-
Get Contents of URLhttp://tinyurl.com/api-create.php?url=…
-
Copy to Clipboard
-
Save File
-
Show NotificationThe URL you had in your clipboard has been changed to …
-
If
-
Show AlertError
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#include 'actions/web'
#include 'actions/documents'
#define color taupe
#define glyph pill
/*
Made by QuartzWarrior
- Uses tiny url
- Stores shortened urls in iCloud/Shortcuts/ReUp/URL
*/
const File = getFileFromFolder(, "ReUp/URL", false)
if !File {
createFolder("ReUp/URL")
alert("This shortcut will take the clipboard and shorten the link to tinyurl. This shortcut will also save the links in iCloud Drive so the data will not be lost.", "First time running shortcut.")
saveFile("ReUp/URL/DELETE_ME.txt")
} else {
if contains "http" {
prompt("What do you want this link to be called?")
const ContentsOfURL = jsonRequest("http://tinyurl.com/api-create.php?url={Clipboard}", "GET", {})
setClipboard(ContentsOfURL)
saveFile("ReUp/URL/{}.txt", ContentsOfURL)
showNotification("The URL you had in your clipboard has been changed to {Clipboard}", "Done! | Success!", false)
} else {
alert("Please have a URL copied.", "Error")
}
}
Открыть в Cherri Playground
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.
Оценки и отзывы
Написать отзыв–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Пока нет отзывов. Поделись мнением первым!
Реклама
Ещё от quartzwarrior
Вам также может понравиться
Реклама