3

Front-End Dev Shortcuts in iOS 15 | CSS-Tricks

 2 years ago
source link: https://css-tricks.com/front-end-dev-shortcuts-in-ios-15/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
ios

Front-End Dev Shortcuts in iOS 15

Geoff Graham on

Sep 29, 2021 (Updated on Sep 30, 2021)

Take your JavaScript to the next level at .

I was pretty stoked when Chris shared a way to “View Source” on mobile. Sure, it’s not the same as a built-in feature but it allows iOS users like myself a way to peek at a site’s code the same way folks on Android can by prepending view-source: to a URL.

I was curious what sorts of dev-related tools might be baked right into my iPhone, so I dug around. It’s actually a perfect time to do that with iOS 15 fresh out of the oven and all.

The iOS Shortcuts app might be the most underrated app of all. It’s sorta like IFTTT or Zapier for iOS in that you get these hooks you can play around with to make one app respond to another and do things. Like dim the lights in my house when Marvin Gaye hits the HomePod. Useful stuff like that.

And guess what? Turns out there are a few pre-made Shortcuts recipes that can be useful for front-end developers. And you can grab them right in the Shortcuts app’s Gallery.

IMG_5122.png?resize=473%2C1024&ssl=1
IMG_5135.png?resize=473%2C1024&ssl=1
IMG_5136.png?resize=473%2C1024&ssl=1
IMG_5134.png?resize=473%2C1024&ssl=1

View source (for realzzz)

Of course, there’s a pre-fab shortcut to view the source of any webpage.

Now, when I’m on a webpage, I can ask Siri to view source, or open the Share Sheet to trigger the shortcut.

IMG_5124.jpg?resize=1125%2C2436&ssl=1The option is added to the Share Sheet.
IMG_5125.png?resize=1125%2C2436&ssl=1Notice the option to share the source.

This would be perfect if we have line numbers, syntax highlighting, a mono font (seriously!), zooming, and… OK, maybe it’s far from perfect.

Grab all the images on a page

This is another Shortcuts gem. Open a webpage and ask Siri to “get images from page.” Now, I’m no fan of scraping assets off webpages, especially in bulk, but not all image collection has to be nefarious.

IMG_5127.jpeg?resize=1125%2C2436&ssl=1It’s also available in the Share Sheet.
IMG_5126.png?resize=1125%2C2436&ssl=1Sorry, not sorry.

Wayback Machine

How fun is this?! Someone had the idea to create a shortcut that opens the current page in the Wayback Machine to see past versions.

IMG_5128.jpeg?resize=1125%2C2436&ssl=1So cool to see that name in a list of options.
IMG_5129.png?resize=1125%2C2436&ssl=1Saved 7,599 times since 2007? That’s more than once per day!

Edit webpage

I actually think this one is legitimately useful. Say you want to test content in a design and want to see exactly how it looks on mobile. This shortcut basically drops contenteditable on every element on the page.

IMG_5133.jpeg?resize=1125%2C2436&ssl=1
IMG_5132.png?resize=473%2C1024&ssl=1

That’s all! Again, all of these are available right in the iOS Shortcuts app in the Gallery tab. Maybe there are others. Or maybe someone’s made a cool shortcut to share with the rest of us. 😉


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK