ShareShortcuts
Fazer fork de “Link Shortener”

Criou algo novo a partir deste atalho? Compartilhe como uma derivação: ela se torna um atalho seu, que você gerencia, e as duas páginas têm links entre si para que arandomguy24 receba o crédito.

  1. 1Obtenha o atalho e altere-o no app Atalhos. Dê a ele um nome próprio.
  2. 2Compartilhe pelo app Atalhos e copie o link do iCloud.
  3. 3Volte aqui, cole o link e descreva o que mudou, por exemplo: “Adicionei uma etapa que usa a Apple Intelligence para personalizar o texto.”
Downloads
41K
Salvo
1
Ações
59
Categoria
Productivity
Versão
1.0
Idioma
EN

Pré-visualização

A link shortener You can also use with iOS or iPadOS 14 Credits: I used [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] for the update system Also on Routinehub.co https://routinehub.co/shortcut/12150/

Novidades

Versão 1.0

First release

Histórico de versões
1.0 12 de jun de 2022

First release

O que ele faz

59 ações
  1. Comment
    Made by @ArandomGuy24 for RoutineHub and ShareShortcuts.com https://www.routinehub.co/user/ArandomGuy24 https://shareshortcuts.com/u/arandomguy24/ Also I used [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] for the update system https://routinehub.co/shortcut/2672/
  2. Comment
    Using RoutineHub UpdateKit api
  3. Get URLs from Input
  4. Set Variable
    input
  5. Repeat
  6. Dictionary
  7. Set Variable
    LocalData
  8. Get IP Address
  9. Count
  10. If
  11. Show Alert
  12. If
  13. URL
    https://routinehub.co/api/v1/shortcuts/…/versions/latest
  14. Get Contents of URL
    …
  15. If
  16. Dictionary
  17. Text
  18. URL
    data:text/html,…
  19. Get Contents of Web Page
  20. If
  21. If
  22. If
  23. Text
  24. If
  25. Text
  26. Choose from Menu
    … … Update checking with [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ]
  27. Choose from Menu
    Install result (Version)
  28. URL
    https://routinehub.co/download/…
  29. Open URLs
  30. Stop and Output
  31. Choose from Menu
    Later
  32. If
  33. Show Alert
  34. If
  35. Ask for Input
    What link do you want to shorten?
  36. Set Variable
    input
  37. URL
    https://shorter.tins.ml/api/new?url=…
  38. Get Contents of URL
    …
  39. Get Dictionary Value
  40. Set Variable
    link
  41. If
  42. Get Contents of URL
    …
  43. Get Dictionary Value
  44. Set Variable
    status
  45. Show Alert
  46. If
  47. Choose from Menu
    Success …
  48. Choose from Menu
    Save to clipboard
  49. Copy to Clipboard
  50. Show Alert
  51. Choose from Menu
  52. Choose from Menu
    Shorten more
  53. Run Shortcut
    Link Shortener
  54. Choose from Menu
    Exit
  55. Stop This Shortcut
  56. Choose from Menu
    Shorten more links
  57. Run Shortcut
    Link Shortener
  58. Choose from Menu
    Exit
  59. Stop This Shortcut

Ver como código
Beta

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 blue
#define glyph chainlink

/*
Made by @ArandomGuy24 for RoutineHub and ShareShortcuts.com

https://www.routinehub.co/user/ArandomGuy24

https://shareshortcuts.com/u/arandomguy24/


Also I used [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] for the update system
https://routinehub.co/shortcut/2672/
*/
// Using RoutineHub UpdateKit api

getURLs(ShortcutInput)
@input

repeat _ for nil {
	@LocalData = {
		"RoutineHub ID": "12150",
		"Version": "0.06"
	}
	const CurrentIPAddress = getExternalIP()
	const Count = count(CurrentIPAddress)
	if Count == 0 {
		confirm("[Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] Could not check for updates, there is no internet connection.")
	} else {
		url("https://routinehub.co/api/v1/shortcuts/{@LocalData['ID']}/versions/latest")
		const result = downloadURL()
		if result contains "success" {
			const CompareVersionsData = {
				"current": "{@LocalData['Version']}",
				"new": "{result['Version']}"
			}
			const CompareVersionsHTML = "<html><head></head><body><script>\n// Embed-a-Engine 1.0\nfunction cmp (a, b) {\nlet pa = a.split('.');\nlet pb = b.split('.');\nfor (let i = 0; i < Math.max(pa.length, pb.length); i++) {\nlet na = Number(pa[i]);\nlet nb = Number(pb[i]);\nif (isNaN(na)) na = 0;\nif (isNaN(nb)) nb = 0;\nif (na > nb) return \\"RollbackAvailable\\";\nif (nb > na) return \\"UpdateAvailable\\";\n}\nreturn \\"NoChanges\\";\n};\nlet data = {CompareVersionsData};\ndocument.write(cmp(data.current, data.new));\n</script></body></html>"
			url("data:text/html,{CompareVersionsHTML}")
			const ContentsOfWebPage = getWebpageContents()
			if ContentsOfWebPage == "NoChanges" {
			} else {
				if ContentsOfWebPage == "RollbackAvailable" {
				} else {
				}
				menu "{}\n\n{result['Notes']}\n\nUpdate checking with [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ]" {
				item "Install {result['Version']}":
					const URL = url("https://routinehub.co/download/{result['id']}")
					openURL(URL)
					output(URL)
				item :
				}
			}
		} else {
			alert("Could not check for updates because of a RoutineHub error:\n\n{result['message']}", "")
		}
	}
}

if !@input {
	prompt("What link do you want to shorten?", "URL")
	@input
}
url("https://shorter.tins.ml/api/new?url={@input}")
const ContentsOfURL = downloadURL()
@link = ContentsOfURL['short_url']

if !@link {
	const ContentsOfURL1 = downloadURL(@link)
	@status = ContentsOfURL1['message']
	confirm(@status)
} else {
	menu "Success {@link}" {
	item "Save to clipboard":
		setClipboard(@link)
		confirm("Saved")
		menu nil {
		item "Shorten more":
			runSelf()
		item "Exit":
			stop()
		}
	item "Shorten more links":
		runSelf()
	item "Exit":
		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 arandomguy24

Ver tudo

Você também pode gostar

Ver tudo
Publicidade