Created
November 6, 2011 03:47
-
-
Save pdxmph/1342437 to your computer and use it in GitHub Desktop.
Add a URL from Chrome to Safari's reading list
This file contains hidden or 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
#!/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) |
Would be awesome to have a Chrome extension - especially if it worked on Windows and Linux.
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
Works great, thanks. You need to run the following command:
sudo gem install rb-appscript.
Would be nice to make a Chrome extension.