How to show source of URL on the browser?

207 views
Skip to first unread message

Ricardo Fernández Serrata

unread,
Jul 18, 2021, 8:05:50 PM7/18/21
to Automate
 I want to make a flow that when the user shares a URL, the flow opens the source code of the website/webpage on the foreground browser. I know how to use Foreground App & When Content Shared blocks, my problem is with App Start. I have tried using both App Start and Content View to open the shared URL with "view-source:" prepended to it, which definitely works manually on Chrome, but none of those blocks recognize Chrome as capable of supporting that URI Scheme.

The easiest solution would be to use HTTP Request to download the webpage as a .txt file instead of .html, an then use Content View to let the user select a plaintext viewer. Buy I still want to open the URL on the browser, to avoid redownloading the same file just to view it. How can I force the foreground browser (or at least, the default browser) to open view-source scheme URLs?

Henrik "The Developer" Lindqvist

unread,
Jul 23, 2021, 8:41:22 AM7/23/21
to Automate
I doesn't seem Chrome allow apps to open view-source: URLs:

Using the HTTP request block probably doesn't produce an accurate source, since it may depend on the User-Agent, cookies, whatever.

Ricardo Fernández Serrata

unread,
Jul 24, 2021, 2:12:53 AM7/24/21
to Automate
Oh :( . Well, at least I found another workaround, but it's more manual. The shared URL can be used in a Clipboard Set while prepending "view-source:" so the user only needs to share and paste. A more automatic alternative would be to use Interact, but I need to read more documentation, I don't use that block very often
Reply all
Reply to author
Forward
0 new messages