Skip to content

Instantly share code, notes, and snippets.

@pauladam
Created November 21, 2011 19:54
Show Gist options
  • Select an option

  • Save pauladam/1383731 to your computer and use it in GitHub Desktop.

Select an option

Save pauladam/1383731 to your computer and use it in GitHub Desktop.
Copy open safari tabs to Chrome
#!/usr/local/bin/macruby
framework "ScriptingBridge"
safari = SBApplication.applicationWithBundleIdentifier("com.apple.Safari")
safari.windows.each {|window|
window.tabs.each { |tab|
cmd = "open -a '/Applications/Google\ Chrome.app/' #{tab.URL}"
`#{cmd}`
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment