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
================================================
<?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>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>applet</string>
<key>CFBundleIconFile</key>
<string>applet</string>
<key>CFBundleIdentifier</key>
<string>com.lukehagan.openinchrome</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>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>chromehelper</string>
<key>CFBundleURLSchemes</key>
<array>
<string>chromehelper</string>
</array>
</dict>
</array>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
<string>10.6</string>
</dict>
<key>LSRequiresCarbon</key>
<true/>
<key>WindowState</key>
<dict>
<key>dividerCollapsed</key>
<false/>
<key>eventLogLevel</key>
<integer>-1</integer>
<key>name</key>
<string>ScriptWindowState</string>
<key>positionOfDivider</key>
<real>333</real>
<key>savedFrame</key>
<string>45 103 602 597 0 0 1366 746 </string>
<key>selectedTabView</key>
<string>event log</string>
</dict>
</dict>
</plist>
================================================
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
================================================
<?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>files</key>
<dict>
<key>Resources/Scripts/main.scpt</key>
<data>
IGrsA05+qj5LSutOSqq6F7OqPqg=
</data>
<key>Resources/applet.icns</key>
<data>
sINd6lbiqHD5dL8c6u79cFvVXhw=
</data>
<key>Resources/applet.rsrc</key>
<data>
XtTEOXd8ccgxy3Gk09El8IOUUSY=
</data>
<key>Resources/description.rtfd/TXT.rtf</key>
<data>
K2wQWGeAmNawg1ZDnKNKyrxN1Bk=
</data>
</dict>
<key>files2</key>
<dict>
<key>Resources/Scripts/main.scpt</key>
<data>
IGrsA05+qj5LSutOSqq6F7OqPqg=
</data>
<key>Resources/applet.icns</key>
<data>
sINd6lbiqHD5dL8c6u79cFvVXhw=
</data>
<key>Resources/applet.rsrc</key>
<data>
XtTEOXd8ccgxy3Gk09El8IOUUSY=
</data>
<key>Resources/description.rtfd/TXT.rtf</key>
<data>
K2wQWGeAmNawg1ZDnKNKyrxN1Bk=
</data>
</dict>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
================================================
FILE: ChromeHelper.applescript
================================================
(*
Open in Chrome (Helper app)
by Luke Hagan <lukehagan.com>
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 <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.
================================================
FILE: OpenInChrome.safariextension/Info.plist
================================================
<?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>9537.75.14</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.1</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>
================================================
FILE: OpenInChrome.safariextension/global.html
================================================
<!--
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>
</html>
================================================
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.
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
Condensed preview — 16 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (13K chars).
[
{
"path": ".gitignore",
"chars": 11,
"preview": "\n.DS_Store\n"
},
{
"path": "ChromeHelper.app/Contents/Info.plist",
"chars": 1455,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ChromeHelper.app/Contents/PkgInfo",
"chars": 8,
"preview": "APPLaplt"
},
{
"path": "ChromeHelper.app/Contents/Resources/description.rtfd/TXT.rtf",
"chars": 102,
"preview": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf1265\\cocoasubrtf200\n{\\fonttbl}\n{\\colortbl;\\red255\\green255\\blue255;}\n}"
},
{
"path": "ChromeHelper.app/Contents/_CodeSignature/CodeResources",
"chars": 2738,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ChromeHelper.applescript",
"chars": 1852,
"preview": "(*\nOpen in Chrome (Helper app)\nby Luke Hagan <lukehagan.com>\ncreated 2012-01-22\nreleased under the MIT license (see LICE"
},
{
"path": "LICENSE.md",
"chars": 1104,
"preview": "The MIT License\n===============\n\nCopyright (c) 2012 Luke Hagan <lukehagan.com>.\n\nPermission is hereby granted, free of c"
},
{
"path": "OpenInChrome.safariextension/Info.plist",
"chars": 1386,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "OpenInChrome.safariextension/global.html",
"chars": 1030,
"preview": "<!--\nOpen in Chrome Safari Extension\nby Luke Hagan <lukehagan.com>\ncreated 2012-01-22\nreleased under the MIT license (se"
},
{
"path": "README.md",
"chars": 1314,
"preview": "**Note**: this project is no longer maintained and probably doesn't work in the latest version of macOS/Safari.\n\n# Open "
}
]
// ... and 6 more files (download for full content)
About this extraction
This page contains the full source code of the lhagan/Open-in-Chrome GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 16 files (10.7 KB), approximately 4.1k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.