platform/import/browser-import
Classes
Section titled “Classes”BrowserImporter
Section titled “BrowserImporter”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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BrowserImporter(
target,environment):BrowserImporter
Defined in: app/src/platform/import/browser-import.ts:113
Parameters
Section titled “Parameters”target
Section titled “target”Receives the bookmarks and history.
environment
Section titled “environment”Where to look.
Returns
Section titled “Returns”Methods
Section titled “Methods”findBrowsers()
Section titled “findBrowsers()”findBrowsers():
BrowserProfile[]
Defined in: app/src/platform/import/browser-import.ts:119
The profiles of other browsers, Chromium-based browsers first.
Returns
Section titled “Returns”importBrowser()
Section titled “importBrowser()”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.
Parameters
Section titled “Parameters”string
The profile’s id.
What to import.
labels
Section titled “labels”Folder titles.
Returns
Section titled “Returns”Interfaces
Section titled “Interfaces”BrowserProfile
Section titled “BrowserProfile”Defined in: app/src/platform/import/browser-import.ts:8
A profile of another browser that the import can read.
Properties
Section titled “Properties”browser
Section titled “browser”
readonlybrowser:string
Defined in: app/src/platform/import/browser-import.ts:12
The browser, such as “Google Chrome”.
readonlyid: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.
profile
Section titled “profile”
readonlyprofile:string
Defined in: app/src/platform/import/browser-import.ts:14
The profile’s name in that browser.
readonlytabs:boolean
Defined in: app/src/platform/import/browser-import.ts:16
Whether the browser keeps its open tabs in a form the import reads.
ImportedWindow
Section titled “ImportedWindow”Defined in: app/src/platform/import/browser-import.ts:38
A window of open tabs to open again.
Properties
Section titled “Properties”active
Section titled “active”
readonlyactive:number
Defined in: app/src/platform/import/browser-import.ts:41
Index of the tab that was active.
readonlytabs: readonlyobject[]
Defined in: app/src/platform/import/browser-import.ts:39
ImportEnvironment
Section titled “ImportEnvironment”Defined in: app/src/platform/import/browser-import.ts:53
Where the import looks for other browsers.
Properties
Section titled “Properties”appData?
Section titled “appData?”
readonlyoptionalappData?:string
Defined in: app/src/platform/import/browser-import.ts:57
%APPDATA% and %LOCALAPPDATA% on Windows.
configHome?
Section titled “configHome?”
readonlyoptionalconfigHome?:string
Defined in: app/src/platform/import/browser-import.ts:60
$XDG_CONFIG_HOME on Linux.
readonlyhome:string
Defined in: app/src/platform/import/browser-import.ts:55
localAppData?
Section titled “localAppData?”
readonlyoptionallocalAppData?:string
Defined in: app/src/platform/import/browser-import.ts:58
platform
Section titled “platform”
readonlyplatform:string
Defined in: app/src/platform/import/browser-import.ts:54
readonlytemp:string
Defined in: app/src/platform/import/browser-import.ts:62
A folder for copies of the databases, which their browsers may hold open.
ImportKinds
Section titled “ImportKinds”Defined in: app/src/platform/import/browser-import.ts:20
What to import.
Properties
Section titled “Properties”bookmarks
Section titled “bookmarks”
readonlybookmarks:boolean
Defined in: app/src/platform/import/browser-import.ts:21
history
Section titled “history”
readonlyhistory:boolean
Defined in: app/src/platform/import/browser-import.ts:22
readonlytabs:boolean
Defined in: app/src/platform/import/browser-import.ts:23
ImportLabels
Section titled “ImportLabels”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.
Properties
Section titled “Properties”folder
Section titled “folder”
readonlyfolder:string
Defined in: app/src/platform/import/browser-import.ts:29
The folder that holds the imported bookmarks, such as “Imported from Firefox”.
readonlymenu:string
Defined in: app/src/platform/import/browser-import.ts:32
mobile
Section titled “mobile”
readonlymobile:string
Defined in: app/src/platform/import/browser-import.ts:34
readonlyother:string
Defined in: app/src/platform/import/browser-import.ts:33
toolbar
Section titled “toolbar”
readonlytoolbar:string
Defined in: app/src/platform/import/browser-import.ts:31
Firefox’s bookmarks toolbar, menu, other bookmarks and mobile bookmarks.
ImportResult
Section titled “ImportResult”Defined in: app/src/platform/import/browser-import.ts:45
What an import did. Data that could not be read is named in failed.
Properties
Section titled “Properties”bookmarks
Section titled “bookmarks”
readonlybookmarks:number
Defined in: app/src/platform/import/browser-import.ts:46
failed
Section titled “failed”
readonlyfailed: readonly ("history"|"bookmarks"|"tabs")[]
Defined in: app/src/platform/import/browser-import.ts:49
history
Section titled “history”
readonlyhistory:number
Defined in: app/src/platform/import/browser-import.ts:47
windows
Section titled “windows”
readonlywindows: readonlyImportedWindow[]
Defined in: app/src/platform/import/browser-import.ts:48
ImportTarget
Section titled “ImportTarget”Defined in: app/src/platform/import/browser-import.ts:66
Where the profile database receives imported data.
Methods
Section titled “Methods”importBookmarks()
Section titled “importBookmarks()”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.
Parameters
Section titled “Parameters”folderTitle
Section titled “folderTitle”string
readonly ImportedBookmark[]
source
Section titled “source”string
Returns
Section titled “Returns”number
importHistory()
Section titled “importHistory()”importHistory(
visits):number
Defined in: app/src/platform/import/browser-import.ts:73
Adds pages to the history; returns how many were new.
Parameters
Section titled “Parameters”visits
Section titled “visits”readonly ImportedVisit[]
Returns
Section titled “Returns”number