Save URL from Safari

Is there or has anyone have a script to save URL from safari that saves ONLY active tabs.

I have a script that saves url BUT it saves pinned tabs as well, I don’t want that. Just active tabs. Thank you.

What is an active tab?
And there is the Scripts menu > More Scripts > File Safari Tabs script you can install. That files bookmarks of the tab in the current Safari window. It’s accessed in Safari via the global Scripts menu in the menu bar.

1 Like

I’d assume that is the one in the foreground. OTOH, it seems that pinned tabs are not considered “active” by the OP, not even when they are in the foreground. So “active” probably means something else – but what?

Regardless, the Safari scripting dictionary says this about tab:

source (text, r/o) : The HTML source of the web page currently loaded in the tab.
url (text) : The current URL of the tab.
index (number, r/o) : The index of the tab, ordered left to right.
text (text, r/o) : The text of the web page currently loaded in the tab. Modifications to text aren’t reflected on the web page.
visible (boolean, r/o) : Whether the tab is currently visible.
name (text, r/o) : The name of the tab.

So, no “active” property there. OTOH, one can always doJavaScript on a tab. If the OP can specify a condition a document in an “active” tab must meet, they can use JS to check for that condition.

1 Like

Thank you but the Scripts menu > More Scripts > File Safari Tabs doesn’t help. Saves all tabs including the pinned ones.

I want to save all tabs(any) except the pinned ones.