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)
10 tell tab
2 of window 1 to select all
11 tell tab
2 of window 1 to copy selection
14 tell application "TextEdit"
15 set text of document 1 to the clipboard