On macOS Safari, you can create a new Safari window by dragging a tab out of the tab bar.
On Chrome across platforms, you can command (or control) click on tabs to select multiple tabs, and then when you drag out a tab it will create a new window with tabs.
I like this feature of Chrome and always try to do it in Safari. However, command clicking tabs does not select multiple tabs. Is there any way to take multiple tabs from a Safari window and convert them into a new window?
tell app "Safari"
block: make a new window withtell (make new document) to if it exists then set W to the front window
. Then, in theory, you might be able tomove (every tab of window 2 whose URL contains "twitter.com") to the front window
. May not work; or may need tweaking. If it does, there's scope for some nifty ways to implement this.