Skip to content

Latest commit

 

History

History
86 lines (53 loc) · 1.38 KB

File metadata and controls

86 lines (53 loc) · 1.38 KB

TabsToFile – Development Notes

This document explains key implementation decisions.


Manifest Version 3

TabsToFile uses MV3:

  • Background logic runs in a service worker
  • No persistent background pages
  • No inline scripts allowed

All scripts are external files to satisfy CSP.


Tab collection

Tabs are collected using:

  • chrome.tabs.query({ currentWindow: true })

Only the current window is exported by design.


OS detection

OS is detected using:

  • navigator.platform
  • navigator.userAgent

Output formats:

  • Linux → .desktop
  • Windows → .bat

macOS is intentionally unsupported for now.


Browser selection

Vivaldi identifies itself as Chrome. Because of this, browser detection is user-configurable via the options page.

Stored using:

  • chrome.storage.sync

Supported values:

  • chrome
  • vivaldi

File generation

Launcher files are generated as text and downloaded via:

  • chrome.downloads.download()

Important details:

  • saveAs: false
  • Explicit filename with extension
  • MIME type forces correct extension handling

Why no restore-from-extension logic

TabsToFile intentionally avoids:

  • Session APIs
  • Extension-only restore flows

The generated files work independently of the extension.


Security model

  • No network access
  • No external scripts
  • No tracking
  • No analytics

Everything runs locally.