07-21-2023, 08:30 PM
I have a lot of tabs open in Firefox. After I close Firefox and then run it again, the tabs are there. That's all right.
However, from time to time, Firefox crashes and my tabs are lost. How do I get the open tabs and backup the list to some file?
(With tabs in a file, I can also use [Git][1], [SVN][2], or whatever to store them and optionally find some link 'that I saw in my browser but can't remember what it was'.)
**What I got so far:**
I'm able to get some [URLs][3], but that's doesn't seem to be exactly what I see in Firefox:
$c = ((gc c:\Users\..\AppData\Roaming\Mozilla\Firefox\Profiles\xfvj8vd5.default\sessionstore.js ) -join '')
$sess = [Jayrock.Json.Conversion.JsonConvert]::Import( $c.trim('()') )
$sess.windows[0].tabs |
% { $_.entries } |
% { $_.url } |
Select-Object -Unique
*Please, don't tell me "use this addon or that addon". I really would like do it as I described.*
[1]:
However, from time to time, Firefox crashes and my tabs are lost. How do I get the open tabs and backup the list to some file?
(With tabs in a file, I can also use [Git][1], [SVN][2], or whatever to store them and optionally find some link 'that I saw in my browser but can't remember what it was'.)
**What I got so far:**
I'm able to get some [URLs][3], but that's doesn't seem to be exactly what I see in Firefox:
$c = ((gc c:\Users\..\AppData\Roaming\Mozilla\Firefox\Profiles\xfvj8vd5.default\sessionstore.js ) -join '')
$sess = [Jayrock.Json.Conversion.JsonConvert]::Import( $c.trim('()') )
$sess.windows[0].tabs |
% { $_.entries } |
% { $_.url } |
Select-Object -Unique
*Please, don't tell me "use this addon or that addon". I really would like do it as I described.*
[1]:
[To see links please register here]
[2]:[To see links please register here]
[3]:[To see links please register here]