Posts

Showing posts from January, 2025

Extract all individual images from multi-image HEIC files in Shortcuts on iOS and macOS

A shortcut for iOS and macOS that can for example be used to extract all the individual images from Apple's multi-image wallpaper files. Can also be used to batch convert both single-image and multi-image HEIC files to JPEG. Seems like every HEIC-compatible app on the App Store is only able to extract the first image from multi-image HEIC files. Same with the Convert Image action in Shortcuts app. There's also a Get Frames from Image action, but that's only for animated GIF and photo burst files, according to the description. It actually accepts HEIC files as well, but unfortunately only the main image get's extracted here too. What about tricking the action to extract the others too by changing the file extension to gif , without the resulting images ending up as GIFs, despite the troubling extension name? That's exactly what this shortcut is doing.

URL scheme for viewing currently stored website data on iOS Safari

If you want to view or delete website data for specific sites in Safari for iOS, use the following URL to get directly to the page you finally arrive on after locating the Website Data button somewhere on the page you opened after locating the Advanced button somewhere on the page you opened after locating the Safari button somewhere on the page you opened after locating the Apps button somewhere on the Settings main page: prefs:root=SAFARI&path=ADVANCED/REMOVE_WEBSITE_DATA

Take a screenshot of the current macOS window with a single click or keyboard shortcut

A macOS shortcut that simply copies a screenshot of the current app's frontmost window to the clipboard — a lot quicker than pressing shift-command-4, then spacebar and then left-clicking the window when the pointer turns into a camera symbol (if you even managed to remember the super-secret procedure). To make the shortcut run from a keyboard shortcut, click the 'i' button at the top of the sidebar, then the 'Add Keyboard Shortcut' button, and then press your keyboard combination. You have to wait some time for the keyboard shortcut to be activated systemwide (less than a minute), but if you restart the app you want the screenshot from, it will work immediately. Download the shortcut here .

Web inspector and console bookmarklet that bypasses CSP

Great if you're a Safari user on iOS and don't want to connect your device to a Mac to have this functionality. Works on most CSP-restricted pages, except pages with maximum security policies like github.com and developer.mozilla.org . The bookmarklet contains the entire Eruda JavaScript library as a base64-encoded string in order to bypass the script-src-elem CSP restrictions. If you have concerns about the safety of the bookmarklet, you can always decode the base64 string and compare it to the original script (v3.4.1).

Run JavaScript actions in Shortcuts app without data: URLs, external apps or APIs

It's already possible to run JavaScript code natively in Shortcuts app through the data: URL method 1) , but this one is less complicated and easier to remember. 1. Inside a Text action, create an HTML document containing script code that writes its output to a visible element 2. Either convert the document with the Make Rich Text from HTML action or use the Set Name action and set the name to index.html (or another name with a html extension). 3. Convert the result from the previous step with the Make PDF action 2) (use default settings) 4. Instead of using the Get Text from Input action to extract the text, use the Combine Text [with newlines] action which also converts the input to plain text. This is because the length of the output could cause multiple PDF pages being produced, which end up becoming separate Shortcuts list items that you would have needed to combine either way. Example shortuct here . 1. "Using JavaScript in your shortcuts"—reddit.com 2. T...

Python dialog box bookmarklet for running code in current web browser tab

With this bookmarklet you can run Python code inside a dialog box on the web page you're currently viewing. Works on most pages, but not on pages with very strict content security policies.

Crop images to circle or heart in Shortcuts on iOS and macOS

A shortcut for iOS and macOS that converts an image to the shape of a circle, heart, square or app icon. The source image can be any aspect ratio — just make sure what you want to include is in the middle part of the image. Download the shortcut here .

Spoof user agent bookmarklet

Reloads the current web page with the user agent of your choice. Doesn't work on every site (DuckDuckGo, for example) and stops working as soon as you navigate away from the page. Some sites use other detection methods so they still see the real user agent. Tested to work on iOS browsers and macOS Safari.