Skip to content

platform/import/browser-import

Defined in: app/src/platform/import/browser-import.ts:105

Finds the profiles of other browsers on this computer and imports their bookmarks, history and open tabs. It reads copies of the databases, so a browser that is open keeps working, and it never writes to another browser’s files.

new BrowserImporter(target, environment): BrowserImporter

Defined in: app/src/platform/import/browser-import.ts:113

ImportTarget

Receives the bookmarks and history.

ImportEnvironment

Where to look.

BrowserImporter

findBrowsers(): BrowserProfile[]

Defined in: app/src/platform/import/browser-import.ts:119

The profiles of other browsers, Chromium-based browsers first.

BrowserProfile[]

importBrowser(id, kinds, labels): ImportResult

Defined in: app/src/platform/import/browser-import.ts:136

Imports from a profile that findBrowsers found. Bookmarks go into a new folder of the other bookmarks, which replaces the folder of an earlier import of the same profile. Open tabs are returned, for the browser process to open.

string

The profile’s id.

ImportKinds

What to import.

ImportLabels

Folder titles.

ImportResult

Defined in: app/src/platform/import/browser-import.ts:8

A profile of another browser that the import can read.

readonly browser: string

Defined in: app/src/platform/import/browser-import.ts:12

The browser, such as “Google Chrome”.

readonly id: string

Defined in: app/src/platform/import/browser-import.ts:10

Identifies the profile in later calls; the import only reads profiles it found itself.

readonly profile: string

Defined in: app/src/platform/import/browser-import.ts:14

The profile’s name in that browser.

readonly tabs: boolean

Defined in: app/src/platform/import/browser-import.ts:16

Whether the browser keeps its open tabs in a form the import reads.


Defined in: app/src/platform/import/browser-import.ts:38

A window of open tabs to open again.

readonly active: number

Defined in: app/src/platform/import/browser-import.ts:41

Index of the tab that was active.

readonly tabs: readonly object[]

Defined in: app/src/platform/import/browser-import.ts:39


Defined in: app/src/platform/import/browser-import.ts:53

Where the import looks for other browsers.

readonly optional appData?: string

Defined in: app/src/platform/import/browser-import.ts:57

%APPDATA% and %LOCALAPPDATA% on Windows.

readonly optional configHome?: string

Defined in: app/src/platform/import/browser-import.ts:60

$XDG_CONFIG_HOME on Linux.

readonly home: string

Defined in: app/src/platform/import/browser-import.ts:55

readonly optional localAppData?: string

Defined in: app/src/platform/import/browser-import.ts:58

readonly platform: string

Defined in: app/src/platform/import/browser-import.ts:54

readonly temp: string

Defined in: app/src/platform/import/browser-import.ts:62

A folder for copies of the databases, which their browsers may hold open.


Defined in: app/src/platform/import/browser-import.ts:20

What to import.

readonly bookmarks: boolean

Defined in: app/src/platform/import/browser-import.ts:21

readonly history: boolean

Defined in: app/src/platform/import/browser-import.ts:22

readonly tabs: boolean

Defined in: app/src/platform/import/browser-import.ts:23


Defined in: app/src/platform/import/browser-import.ts:27

Titles of the folders that the import creates, in the language of the browser’s UI.

readonly folder: string

Defined in: app/src/platform/import/browser-import.ts:29

The folder that holds the imported bookmarks, such as “Imported from Firefox”.

readonly menu: string

Defined in: app/src/platform/import/browser-import.ts:32

readonly mobile: string

Defined in: app/src/platform/import/browser-import.ts:34

readonly other: string

Defined in: app/src/platform/import/browser-import.ts:33

readonly toolbar: string

Defined in: app/src/platform/import/browser-import.ts:31

Firefox’s bookmarks toolbar, menu, other bookmarks and mobile bookmarks.


Defined in: app/src/platform/import/browser-import.ts:45

What an import did. Data that could not be read is named in failed.

readonly bookmarks: number

Defined in: app/src/platform/import/browser-import.ts:46

readonly failed: readonly ("history" | "bookmarks" | "tabs")[]

Defined in: app/src/platform/import/browser-import.ts:49

readonly history: number

Defined in: app/src/platform/import/browser-import.ts:47

readonly windows: readonly ImportedWindow[]

Defined in: app/src/platform/import/browser-import.ts:48


Defined in: app/src/platform/import/browser-import.ts:66

Where the profile database receives imported data.

importBookmarks(folderTitle, tree, source): number

Defined in: app/src/platform/import/browser-import.ts:71

Adds bookmarks in a folder of the other bookmarks, in place of the folder of an earlier import from the same source; returns how many there were.

string

readonly ImportedBookmark[]

string

number

importHistory(visits): number

Defined in: app/src/platform/import/browser-import.ts:73

Adds pages to the history; returns how many were new.

readonly ImportedVisit[]

number