Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luke Hagan
committed
Jan 22, 2012
0 parents
commit 341014a
Showing
13 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
.DS_Store |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?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"> | ||
<?xml version="1.0"?> | ||
<dict> | ||
<key>CFBundleAllowMixedLocalizations</key> | ||
<true/> | ||
<key>LSUIElement</key> | ||
<true/> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>applet</string> | ||
<key>CFBundleIconFile</key> | ||
<string>applet</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>ChromeHelper</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleSignature</key> | ||
<string>aplt</string> | ||
<key>LSMinimumSystemVersionByArchitecture</key> | ||
<dict> | ||
<key>x86_64</key> | ||
<string>10.6</string> | ||
</dict> | ||
<key>CFBundleURLTypes</key> | ||
<array> | ||
<dict> | ||
<key>CFBundleURLName</key> | ||
<string>chromehelper</string> | ||
<key>CFBundleURLSchemes</key> | ||
<array> | ||
<string>chromehelper</string> | ||
</array> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
APPLaplt |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License | ||
=============== | ||
|
||
Copyright (c) 2012 Luke Hagan <lukehagan.com>. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?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>Author</key> | ||
<string>Luke Hagan</string> | ||
<key>Builder Version</key> | ||
<string>7534.52.7</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>Open in Chrome</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.lukehagan.openinchrome</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>Chrome</key> | ||
<dict> | ||
<key>Global Page</key> | ||
<string>global.html</string> | ||
<key>Toolbar Items</key> | ||
<array> | ||
<dict> | ||
<key>Identifier</key> | ||
<string>openinchrome</string> | ||
<key>Image</key> | ||
<string>arrow.png</string> | ||
<key>Label</key> | ||
<string>Open in Chrome</string> | ||
<key>Tool Tip</key> | ||
<string>Open in Chrome</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
<key>Content</key> | ||
<dict> | ||
<key>Scripts</key> | ||
<dict/> | ||
</dict> | ||
<key>Description</key> | ||
<string>Opens current web address in Chrome</string> | ||
<key>ExtensionInfoDictionaryVersion</key> | ||
<string>1.0</string> | ||
<key>Permissions</key> | ||
<dict> | ||
<key>Website Access</key> | ||
<dict> | ||
<key>Include Secure Pages</key> | ||
<true/> | ||
<key>Level</key> | ||
<string>All</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- | ||
Open in Chrome Safari Extension | ||
by Luke Hagan <lukehagan.com> | ||
created 2012-01-22 | ||
released under the MIT license (see LICENSE.md for details) | ||
--> | ||
|
||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<title>global page</title> | ||
<script type="text/javascript"> | ||
|
||
function performCommand(event) { | ||
if (event.command === "openinchrome") { | ||
var currentURL = event.target.browserWindow.activeTab.url; | ||
if (currentURL) { | ||
event.target.browserWindow.activeTab.url = "chromehelper://" + currentURL.split("://")[1]; | ||
} | ||
} | ||
} | ||
|
||
function validateCommand(event) { | ||
if (event.command === "reload-page") { | ||
// Disable the button if there is no URL loaded in the tab. | ||
event.target.disabled = !event.target.browserWindow.activeTab.url; | ||
} | ||
} | ||
|
||
// register with application: | ||
safari.application.addEventListener("command", performCommand, false); | ||
safari.application.addEventListener("validate", validateCommand, false); | ||
|
||
</script> | ||
</head> | ||
<body> </body> |
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Open in Chrome | ||
|
||
Safari extension that opens the current page in Chrome. See [this post](http://daringfireball.net/2010/11/flash_free_and_cheating_with_google_chrome) by John Gruber for the "why" on this one. | ||
|
||
Note: the extension depends on an AppleScript application to communicate with Chrome, so it will not work on Windows. | ||
|
||
## Usage | ||
|
||
1. [Download]() and extract the ZIP file | ||
2. Install the extension (double-click OpenInChrome.safariextz) | ||
3. Put the ChromeHelper app anywhere you want and double-click it to register with Mac OS X (nothing will happen yet) | ||
4. Click the Open in Chrome arrow button in Safari to open the current page in Chrome | ||
|