Repository: lhagan/Open-in-Chrome Branch: master Commit: 8b245836e121 Files: 16 Total size: 10.7 KB Directory structure: gitextract_8l7h_eg5/ ├── .gitignore ├── ChromeHelper.app/ │ └── Contents/ │ ├── Info.plist │ ├── MacOS/ │ │ └── applet │ ├── PkgInfo │ ├── Resources/ │ │ ├── Scripts/ │ │ │ └── main.scpt │ │ ├── applet.icns │ │ ├── applet.rsrc │ │ └── description.rtfd/ │ │ └── TXT.rtf │ └── _CodeSignature/ │ └── CodeResources ├── ChromeHelper.applescript ├── LICENSE.md ├── OpenInChrome.safariextension/ │ ├── Info.plist │ └── global.html ├── OpenInChrome.safariextz ├── README.md └── source/ └── ChromeHelper.scpt ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .DS_Store ================================================ FILE: ChromeHelper.app/Contents/Info.plist ================================================ CFBundleAllowMixedLocalizations CFBundleDevelopmentRegion English CFBundleExecutable applet CFBundleIconFile applet CFBundleIdentifier com.lukehagan.openinchrome CFBundleInfoDictionaryVersion 6.0 CFBundleName ChromeHelper CFBundlePackageType APPL CFBundleSignature aplt CFBundleURLTypes CFBundleURLName chromehelper CFBundleURLSchemes chromehelper LSMinimumSystemVersionByArchitecture x86_64 10.6 LSRequiresCarbon WindowState dividerCollapsed eventLogLevel -1 name ScriptWindowState positionOfDivider 333 savedFrame 45 103 602 597 0 0 1366 746 selectedTabView event log ================================================ FILE: ChromeHelper.app/Contents/PkgInfo ================================================ APPLaplt ================================================ FILE: ChromeHelper.app/Contents/Resources/description.rtfd/TXT.rtf ================================================ {\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf200 {\fonttbl} {\colortbl;\red255\green255\blue255;} } ================================================ FILE: ChromeHelper.app/Contents/_CodeSignature/CodeResources ================================================ files Resources/Scripts/main.scpt IGrsA05+qj5LSutOSqq6F7OqPqg= Resources/applet.icns sINd6lbiqHD5dL8c6u79cFvVXhw= Resources/applet.rsrc XtTEOXd8ccgxy3Gk09El8IOUUSY= Resources/description.rtfd/TXT.rtf K2wQWGeAmNawg1ZDnKNKyrxN1Bk= files2 Resources/Scripts/main.scpt IGrsA05+qj5LSutOSqq6F7OqPqg= Resources/applet.icns sINd6lbiqHD5dL8c6u79cFvVXhw= Resources/applet.rsrc XtTEOXd8ccgxy3Gk09El8IOUUSY= Resources/description.rtfd/TXT.rtf K2wQWGeAmNawg1ZDnKNKyrxN1Bk= rules ^Resources/ ^Resources/.*\.lproj/ optional weight 1000 ^Resources/.*\.lproj/locversion.plist$ omit weight 1100 ^version.plist$ rules2 .*\.dSYM($|/) weight 11 ^(.*/)?\.DS_Store$ omit weight 2000 ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ nested weight 10 ^.* ^Info\.plist$ omit weight 20 ^PkgInfo$ omit weight 20 ^Resources/ weight 20 ^Resources/.*\.lproj/ optional weight 1000 ^Resources/.*\.lproj/locversion.plist$ omit weight 1100 ^[^/]+$ nested weight 10 ^embedded\.provisionprofile$ weight 20 ^version\.plist$ weight 20 ================================================ FILE: ChromeHelper.applescript ================================================ (* Open in Chrome (Helper app) by Luke Hagan created 2012-01-22 released under the MIT license (see LICENSE.md for details) based on Use AppleScript to open current Safari URL in Google Chrome by TJ Luoma http://www.tuaw.com/2011/03/14/use-applescript-to-open-current-safari-url-in-google-chrome/ *) on open location theURL -- split URL string to remove the chromehelper:// prefix set theURL to rightString(theURL, "://") tell application id "com.google.Chrome" -- open Chrome if it's not open, create a new window if none exists, bring into focus activate -- delay to make sure window is open before we start doing anything delay 0.5 -- if Chrome's active tab is non-blank, create a new tab -- if a blank tab is active, just use that -- otherwise, make a new window -- based on a script by scott.c.jordan -- http://www.tuaw.com/2011/03/14/use-applescript-to-open-current-safari-url-in-google-chrome/#aolc=A0yOBA if (count of (every window where visible is true)) is greater than 0 then if URL of active tab of front window is not "chrome://newtab/" then tell front window make new tab end tell end if else make new window end if set URL of active tab of front window to "http://" & theURL activate end tell end open location -- split theString into two parts based on a delimiter and return the rightmost part -- note: only works properly if the delimiter appears only once in the string on rightString(theString, theDelimiter) -- save current delimiters for later set currentDelimiters to AppleScript's text item delimiters -- set new delimiter set AppleScript's text item delimiters to theDelimiter -- create an array of items set array to every text item of theString -- return the rightmost part of the string return item 2 of array end rightString ================================================ FILE: LICENSE.md ================================================ The MIT License =============== Copyright (c) 2012 Luke Hagan . 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. ================================================ FILE: OpenInChrome.safariextension/Info.plist ================================================ Author Luke Hagan Builder Version 9537.75.14 CFBundleDisplayName Open in Chrome CFBundleIdentifier com.lukehagan.openinchrome CFBundleInfoDictionaryVersion 6.0 CFBundleShortVersionString 1.1 CFBundleVersion 1 Chrome Global Page global.html Toolbar Items Identifier openinchrome Image arrow.png Label Open in Chrome Tool Tip Open in Chrome Content Scripts Description Opens current web address in Chrome ExtensionInfoDictionaryVersion 1.0 Permissions Website Access Include Secure Pages Level All ================================================ FILE: OpenInChrome.safariextension/global.html ================================================ global page ================================================ FILE: README.md ================================================ **Note**: this project is no longer maintained and probably doesn't work in the latest version of macOS/Safari. # 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](https://github.com/lhagan/Open-in-Chrome/zipball/master) 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 ## Version History **2014-06-29**: Code sign ChromeHelper app (for Gatekeeper, issue #3). **2014-06-08**: Fix an issue causing Chrome to open in Parallels instead of the native version (issue #2). **2014-01-07**: Add retina toolbar icon. **2013-07-22**: Fix an issue that caused OS X to report that the ChromeHelper application is damaged. **2012-12-12**: Bug fix - make sure that Chrome always brings itself to the front (instead of hiding behind Safari). **2012-01-23**: Initial release.