Created
December 26, 2015 18:16
-
-
Save remore/649fa1a021c92dd0a357 to your computer and use it in GitHub Desktop.
Add "search the url at hn/reddit/hatena" context menu by automator on OSX. Fore more info, see: http://good-morning-call.com/2012/05/20/mac%E3%81%AE%E5%8F%B3%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E3%83%A1%E3%83%8B%E3%83%A5%E3%83%BC%E3%81%AB%E9%A0%85%E7%9B%AE%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/
This file contains 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
set urlList to {"http://b.hatena.ne.jp/entry/", "https://www.reddit.com/submit?url=", "https://hn.algolia.com/?sort=byPopularity&prefix&page=0&dateRange=all&type=story&query="} | |
set numURLs to (count urlList) | |
open location (item 1 of urlList) & (get the clipboard) | |
tell application "Safari" | |
activate | |
tell window 1 | |
repeat with i from 2 to (numURLs) | |
set current tab to (make new tab) | |
set URL of document 1 to (item i of urlList) & (get the clipboard) | |
end repeat | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment