ShareShortcuts
Bifurcar “Link Shortener”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que arandomguy24 reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
41K
Guardado
1
Acciones
59
Categoría
Productivity
Versión
1.0
Idioma
EN

Vista previa

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/

Novedades

Versión 1.0

First release

Historial de versiones
1.0 12 de jun. de 2022

First release

Qué hace

59 acciones
  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 las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo 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 en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

Más de arandomguy24

Ver todo

También te puede gustar

Ver todo
Publicidad