Отсканируй на iPhone, чтобы установить
Made this a long time ago but here you go anyways
Что нового
Версия 3.98
Fixed
Что делает
Действий: 40-
Ask for InputEmail
-
Get Text from Input
-
If
-
Show NotificationCan't be blank
-
If
-
If
-
Show NotificationPlease remove the space
-
If
-
If
-
Split Text
-
Get Item from List
-
Get Item from List
-
Text
-
Open URLs
-
If
-
If
-
Show NotificationPlease add @
-
If
-
If
-
Show NotificationCan't only be a .
-
If
-
If
-
Show NotificationCan't begin with .
-
If
-
If
-
Show NotificationCan't end with .
-
If
-
If
-
Show NotificationCan't just be @
-
If
-
If
-
Show NotificationCan't begin with @
-
If
-
If
-
Show NotificationCan't end with @
-
If
-
If
-
Show NotificationPlease add .
-
If
-
Show NotificationUnknown Error
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#include 'actions/web'
#include 'actions/text'
#define color darkblue
#define glyph shield
const AskForInput = prompt("Email", false)
const Text = getText(AskForInput)
if !Text {
showNotification("Can't be blank", "Error", false)
} else {
if Text contains " " {
showNotification("Please remove the space", "Error", false)
} else {
if Text contains "@" && Text contains "." {
const SplitText = splitText(Text, "@")
getLastItem(SplitText)
getLastItem(SplitText)
const Text1 = "https://accounts.google.com/AddSession?Email={}%40{}&continue=https%3A%2F%2Fwww.google.com%2F"
openURL(Text1)
} else {
if Text !contains "@" {
showNotification("Please add @", "Error", false)
} else {
if Text == "." {
showNotification("Can't only be a .", "Error", false)
} else {
if Text beginsWith "." {
showNotification("Can't begin with .", "Error", false)
} else {
if Text endsWith "." {
showNotification("Can't end with .", "Error", false)
} else {
if Text == "@" {
showNotification("Can't just be @", "Error", false)
} else {
if Text beginsWith "@" {
showNotification("Can't begin with @", "Error", false)
} else {
if Text endsWith "@" {
showNotification("Can't end with @", "Error", false)
} else {
if Text !contains "." {
showNotification("Please add .", "Error", false)
} else {
showNotification("Unknown Error", "Error", false)
}
}
}
}
}
}
}
}
}
}
}
Открыть в Cherri Playground
Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.
Оценки и отзывы
Написать отзыв–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Пока нет отзывов. Поделись мнением первым!
Реклама
Ещё от coltensus
Вам также может понравиться
Реклама