You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tellapplication"Google Chrome"iffrontmostthensetwto window 1if visible of w istrueand (URLof active tabof w) contains"music/listen"then-- Chrome uses minimized instead of miniaturizedset minimized of w totruereturnend ifend ifactivatesetito0repeatwithwin (windows)
setito i +1setjto0repeatwithtin (tabs of w)
setjto j +1ifURLof t contains"music/listen"thenset (active tabindexof w) to j
setindexof w to1tellapplication"System Events"totellprocess"Google Chrome"performaction"AXRaise"ofwindow1-- `set index` doesn't always raise the window-- keystroke "f" using {option down, command down}end tellreturnend ifend repeatend repeatactivatesetwto make new window
-- set URL of active tab of w to "https://play.google.com/music/listen"-- wait for the tab to load so js can rundelay1-- this needs developer access - alternatively use the "set URL" line above
execute of active tabof w javascript "window.open('https://play.google.com/music/listen','window','toolbar=no, menubar=no, location=no, resizable=yes noopener=yes')"close w
end tell
The text was updated successfully, but these errors were encountered:
It would be great if there was a shortcut that creates a new Play Music panel (without tabs etc) or switches to it if it exists. That way,
I have some code at https://github.com/wmertens/global-chrome-tab for opening tabs with a global shortcut, but right now I'm using this applescript:
The text was updated successfully, but these errors were encountered: