Skip to content

Instantly share code, notes, and snippets.

@pdxmph
Created November 6, 2011 03:47
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save pdxmph/1342437 to your computer and use it in GitHub Desktop.
Save pdxmph/1342437 to your computer and use it in GitHub Desktop.
Add a URL from Chrome to Safari's reading list
#!/usr/bin/env ruby -wKU
require "rubygems"
require "appscript"
include Appscript
chrome = app("Google Chrome")
safari = app("Safari")
chrome_tab = chrome.windows[1].active_tab
save_url = chrome_tab.URL.get
save_title = chrome_tab.name.get
safari.add_reading_list_item(save_url, :with_title => save_title)
@peterjenkins
Copy link

Works great, thanks. You need to run the following command:

sudo gem install rb-appscript.

Would be nice to make a Chrome extension.

@J7mbo
Copy link

J7mbo commented Jan 18, 2014

Would be awesome to have a Chrome extension - especially if it worked on Windows and Linux.

@tzarskyz
Copy link

tzarskyz commented Feb 7, 2014

tell application "Google Chrome"
set pageUrl to get URL of active tab of first window
end tell
tell application "Safari" to add reading list item pageUrl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment