Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2310)

Unified Diff: chrome/browser/cocoa/applescript/examples/copy_html.applescript

Issue 3180006: Cleaned up the SDEF... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/applescript/examples/copy_html.applescript
===================================================================
--- chrome/browser/cocoa/applescript/examples/copy_html.applescript (revision 0)
+++ chrome/browser/cocoa/applescript/examples/copy_html.applescript (revision 0)
@@ -0,0 +1,16 @@
+-- Copyright (c) 2010 The Chromium Authors. All rights reserved.
+-- Use of this source code is governed by a BSD-style license that can be
+-- found in the LICENSE file.
+
+-- This script copies the HTML of a tab to a TextEdit document.
+tell application "Chromium"
+ tell tab 1 of window 1 to view source
+ repeat while (loading of tab 2 of window 1)
+ end repeat
+ tell tab 2 of window 1 to select all
+ tell tab 2 of window 1 to copy selection
+end tell
+
+tell application "TextEdit"
+ set text of document 1 to the clipboard
+end tell

Powered by Google App Engine
This is Rietveld 408576698