// Name: Move Active Chrome Tab to New Window // Description: Moves the active tab in the current Chrome window to a new window via AppleScript. // Author: tayiorbeii // GitHub: tayiorbeii import "@johnlindquist/kit" const info = await applescript(` try tell application "Google Chrome" if (count of windows) is 0 then return "" set theTab to active tab of front window set theTitle to title of theTab set theURL to URL of theTab return theTitle & "||" & theURL end tell on error return "" end try `) if (!info) { await notify("No active Chrome tab found") exit() } const [title, url] = info.split("||") await applescript(` tell application "Google Chrome" to activate delay 0.1 tell application "System Events" tell process "Google Chrome" click menu item "Move Tab to New Window" of menu 1 of menu bar item "Tab" of menu bar 1 end tell end tell `) await notify(`Moved tab to new window: ${title || url || "Untitled"}`)