Open-in-Chrome
Open-in-Chrome copied to clipboard
Close current tab in Safari
After clicking the action to open the current tab in Chrome, I'd love to automatically close it in Safari.
(I use Safari as my personal browser so it's set as default. For work I use Chrome because it allows me to easily paste images from my clipboard)
This is an applescript that works standalone, but when I tried to put the relevant Safari closing part into the ChromeHelper.applescript it doesn't work. This was my first attempt at AppleScript so I am not sure even if I am doing the right thing as there is an extension and the helper app that Open-in-Chrome is tied to.
tell application "Safari" set vURL to URL of current tab of window 1 end tell
tell application "Google Chrome" if windows ≠ {} then make new tab at the end of window 1 with properties {URL:vURL} else make new window set URL of (active tab of window 1) to vURL end if
activate
end tell
tell application "Safari" close current tab of front window without saving end tell