Posts

Showing posts from January, 2025

Shortcut to extract all individual images from multi-image HEIC files 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. There doesn't seem to be any app on the App Store that's able to extract more than the first image from multi-image HEIC files. Same story 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 with this one 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

Quickly take a screenshot of only the current window on macOS

A macOS shortcut to instantly copy a screenshot of the current app's frontmost window (instead of the entire screen) to the clipboard. No need to bother with the official way by pressing shift-command-4, then spacebar, then after the pointer has turned into a camera symbol, clicking the window you want the screenshot of. To assign a keyboard shortcut to it, open the shortcut in Shortcuts app, click ⓘ in the sidebar, then the Add Keyboard Shortcut button, 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 of, it will work immediately. Download shortcut

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 ( v3.4.1 ) as a base64-encoded string in order to bypass the script-src-elem CSP restrictions. Bookmarklet updated 2025-05-09 10:16 UTC Scroll to bottom Scroll to top

Another way to execute JavaScript code natively in Shortcuts, besides using data: URLs

This method also executes the code in a secure context unlike the data: URL method — letting you take advantage of several features that otherwise aren't available. 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 Make Rich Text from HTML or use Set Name and give it a name with html as extension e.g. index.html (same result with these actions) 3. Convert this to PDF with the Make PDF action — this is the action that executes the JavaScript code 4. Extract the text from the PDF — for short output you can use Get Text from Input , but if the length of the output causes multiple PDF pages being made, you'll be asked to choose which page — If so, extract the text with Combine Text instead. Empty lines aren't preserved with these actions though (probably a bug), but you can use Make Markdown from Rich Text as a workaround, which both preserves empty lines (not re...

Python dialog box bookmarklet — execute code in your 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. Bookmarklet updated 2025-05-11 09:07 UTC

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. Bookmarklet updated 2025-05-09 09:52 UTC