Romain Posted July 18, 2022 Posted July 18, 2022 (edited) 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 view-source:{query} 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 July 18, 2022 by Romain
vitor Posted July 18, 2022 Posted July 18, 2022 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now