How to Use JavaScript When Creating Shortcuts

· · Link

Redditor u/keveridge put together a nice guide on how to use JavaScript when creating Shortcuts. JavaScript lets you perform complex actions that would be hard to do with regular shortcut actions.

We make use of the Safari web browser, running within the shortcut, in order to execute the JavaScript. To do so, we:

  • make an HTML file that contains our code and provides an output;

  • pass the contents of the file to Safari as a Data URL;

  • use Get Contents of Web Page to render the page provide the output to the shortcut.

New JavaScript API Brings Apple Live Photos to the Web

· · News

Apple has created a new Javascript API so developers can bring Live Photos to the web. Live Photos are Apple’s way to bring your photos to life. A live photo is a cross between a video and a GIF, but on-demand animation for live photos was limited to iOS and Instagram’s Boomerang feature…until now.