Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
View Source in BBEdit
tell application "Safari"
set page to current tab of window 1
set title to name of page
set html to source of page
end tell
-- requires BBEdit and the "bbedit" command line utility
do shell script "echo " & quoted form of html & " | bbedit --view-top --clean -t " & quoted form of title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.