#tabs #firefox #windows #open #mozilla #collect

fxtabs

Collect open tabs on all Mozilla Firefox windows

2 unstable releases

0.2.0 Apr 27, 2022
0.1.0 May 16, 2021

#22 in #tabs

Custom license

4KB
54 lines

fxtabs

Rust crate to collect open tabs on all Mozilla Firefox windows (from the same profile).

Tabs are collected from recovery.jsonlz4 file, where Firefox uses as a persistent backup of open tabs, back and forward button pages, cookies, forms, and other session data.

This file is written almost in real time (there will be only some seconds delay) whenever there is a browsing/tabs action.

Usage

Add the dependency on Cargo.toml:

fxtabs = "<version>"

Collect open tabs:

use fxtabs::open_tabs;

const FILE: &str = "/path/to/sessionstore-backups/recovery.jsonlz4";

fn main() {
    let tabs = open_tabs(FILE).unwrap();
    for t in tabs {
        println!("title: {}\nurl: {}\n", t.title, t.url);
    }
}

Dependencies

~2–3MB
~66K SLoC