-
-
Save bomberstudios/647282 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>beforeRunningCommand</key> | |
<string>nop</string> | |
<key>bundleUUID</key> | |
<string>A9237092-D694-450A-8C8F-F9005D932664</string> | |
<key>command</key> | |
<string>osascript -e 'tell application "Safari" to set theSource to do JavaScript "window.document.documentElement.outerHTML" in document 1'</string> | |
<key>input</key> | |
<string>none</string> | |
<key>name</key> | |
<string>Get Generated Source from Safari</string> | |
<key>output</key> | |
<string>afterSelectedText</string> | |
<key>uuid</key> | |
<string>BCA87288-8CAB-4691-9A06-F8C38619FD1D</string> | |
</dict> | |
</plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- based on John Gruber's original Safari Source in BBEdit script | |
-- http://daringfireball.net/2003/01/safari_source_in_bbedit | |
-- and duct tape, and modified to work with TextMate | |
tell application "Safari" to set theSource to do JavaScript "window.document.documentElement.outerHTML" in document 1 | |
tell application "TextMate" | |
activate | |
set tmp to (do shell script "mktemp /tmp/textmate.XXXXXX") | |
open tmp | |
insert theSource | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment