ShareShortcuts
Dupliquer « Link Shortener »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que arandomguy24 soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
41K
Enregistré
1
Actions
59
Catégorie
Productivity
Version
1.0
Langue
EN

Aperçu

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/

Nouveautés

Version 1.0

First release

Historique des versions
1.0 12 juin 2022

First release

Ce qu’il fait

59 actions
  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

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#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()
	}
}
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Plus de arandomguy24

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité