Skip to content

Instantly share code, notes, and snippets.

@jame-zhang
Created December 6, 2018 11:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jame-zhang/06e5f0ec8d6cec1869359747928c1207 to your computer and use it in GitHub Desktop.
Save jame-zhang/06e5f0ec8d6cec1869359747928c1207 to your computer and use it in GitHub Desktop.
open url or chrome password setting tab in chrome, if chrome is running then make new tab, otherwise make new window
on alfred_script(q)
if not (q starts with "http://") and not (q start with "pw")
set q to "http://" & q
end if
tell application "/Applications/Google Chrome.app"
if it is running then
if (q start with "pw")
open location "chrome://settings/passwords"
else
open location q
end if
else
make new window
if (q start with "pw")
set q to "chrome://settings/passwords"
end if
set URL of active tab of window 1 to q
end if
end tell
end alfred_script
@zzzzzhangyanqiu
Copy link

this is very great!!!!!

@horieva
Copy link

horieva commented Nov 21, 2021

Hello, thank you for that script. But when I save it into file and double click my latest Alfred 4 says OOps!
"The workflow you are trying to import is invalid."
Can I solve that?

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