Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / applescript / examples / copy_html.applescript
blobfd7b4e0a0869517ef19e5013be11a93511e0021a
1 -- Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 -- Use of this source code is governed by a BSD-style license that can be
3 -- found in the LICENSE file.
5 -- This script copies the HTML of a tab to a TextEdit document.
6 tell application "Chromium"
7 tell tab 1 of window 1 to view source
8 repeat while (loading of tab 2 of window 1)
9 end repeat
10 tell tab 2 of window 1 to select all
11 tell tab 2 of window 1 to copy selection
12 end tell
14 tell application "TextEdit"
15 set text of document 1 to the clipboard
16 end tell