Skip to content

Instantly share code, notes, and snippets.

@cmittendorf
Created October 18, 2014 11:30
Show Gist options
  • Save cmittendorf/8dd260b1a69098baa1f2 to your computer and use it in GitHub Desktop.
Save cmittendorf/8dd260b1a69098baa1f2 to your computer and use it in GitHub Desktop.
open Safari HTML source in BBEdit using new Yosemite JavaScript automation
var Safari = Application ("Safari")
if (Safari.documents().length > 0) {
var source = Safari.documents()[0].source()
Application("BBEdit").Document({"contents":source, "source language":"HTML"}).make()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment