Jump to content

view-source of any URL in Chrome

Recommended Posts

Hey there,


I'm trying to create a basic workflow to open the source code of any URL in Chrome. Here's the workflow: https://jmp.sh/lOdx57Y


I've tried 


in the Open URL object URL filed but it doesn't work. I get a blank page.


Any hints or any existing workflow for that? I couldn't find any...

Edited by Romain
Link to comment

Welcome @Romain,


Here’s a Workflow for it, with the same keyword as yours. Tested only with Brave, but their AppleScript dictionary is the same.

Simply asking macOS to open the URL (open -a) wasn’t working, neither was changing it on the page with JavaScript (location.href). Seems like it might be a deliberate decision on their part, as with Safari it works (well, it tries to open the page but Safari doesn‘t use view-source:). The solution was to tell it to open a new tab with the URL via JXA.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...