Go back to top

vivaldi.importData Modders API Reference

Use the vivaldi.importData.getProfiles to display installed browsers.

Types

#import_types

ENUM

⚠ NO DESCRIPTION PROVIDED

  • internet_explorer
  • firefox
  • safari
  • bookmarks_file
  • opera
  • opera_bookmark
  • chrome
  • chromium
  • vivaldi
  • yandex
  • opera_opium_beta
  • opera_opium_dev
  • brave
  • edge
  • edge_chromium
  • thunderbird
  • opera_opium
  • unknown
  • #UserProfileItem

    UserProfileItem. Contains info for userprofile

    Properties:

    profileDisplayName
    string

    The profile display name.

    profileName
    string

    The profile name.

    #ProfileItem

    ProfileItem.

    Properties:

    import_type
    import_types

    The type of import profile item

    name
    string

    Import item name.

    index
    integer

    The profile item index.

    history
    boolean

    Does profile support history.

    favorites
    boolean

    Does profile support favorites.

    passwords
    boolean

    Does profile support passwords.

    supportsMasterPassword
    boolean

    Does profile support a master password to decode passwords.

    speeddial
    boolean

    Does profile support Speed Dial.

    notes
    boolean

    Does profile support notes.

    email
    boolean

    Does profile support email.

    contacts
    boolean

    Does profile support contacts.

    supportsStandaloneImport
    boolean

    Does profile support standalone import with a dialog.

    hasDefaultInstall
    boolean

    Is a default installation detected (for Opera 12 and Vivaldi).

    willShowDialogType
    string

    When import starts and custom profile or file import is selected, this returns what dialog will be shown, if any. Possible values are 'file', 'folder' and 'none'.

    profilePath
    string

    Is the path on disk to the detected profile

    mailPath
    string

    The path on disk to the detected mail profile

    UserProfiles

    ⚠ NO DESCRIPTION PROVIDED

    Array of:

    • UserProfileItem

    Listeners

    How to use listeners

    Each listener type has the same functions, used for each listener API in the same way:

    .addListener(function callback)

    Adds a function to a listener for an event

    .removeListener(function callback)

    Removes a function to a listener for an event

    .hasListener(function callback)

    Returns a boolean if a function is attached to a listener for an event

    .hasListeners()

    Returns a boolean if a listener has any attached functions

    .dispatch()

    Returns array of promises dispatched to the listener

    #onImportStarted

    Fired when a import session has started.

    #onImportEnded

    Fired when a import session has ended.

    Parameters:

    error_count
    integer

    Number of data types that failed to import.

    #onImportItemStarted

    Fired when a import session for a data type has started.

    Parameters:

    item
    string

    Name of data type.

    #onImportItemEnded

    Fired when a import session for a data type has ended.

    Parameters:

    item
    string

    Name of data type.

    #onImportItemFailed

    Fired when a import session for a data type has failed.

    Parameters:

    item
    string

    Name of data type.

    error
    string

    Error message that can be shown to the user.

    Methods

    #getProfiles

    Retrieves import data profiles.

    #startImport

    Start import process.

    Parameters:

    profileIndex
    integer

    Index of the profile we want to import. This is a null based index of results from getProfiles.

    askUserForFileLocation
    boolean

    Show file dialog to user.

    profileName
    string

    Name of profile.

    typesToImport
    object

    ⚠ NO DESCRIPTION PROVIDED

    Object Properties:

    history
    boolean

    ⚠ NO DESCRIPTION PROVIDED

    favorites
    boolean

    ⚠ NO DESCRIPTION PROVIDED

    passwords
    boolean

    ⚠ NO DESCRIPTION PROVIDED

    speeddial
    boolean

    ⚠ NO DESCRIPTION PROVIDED

    notes
    boolean

    ⚠ NO DESCRIPTION PROVIDED

    masterPassword
    (optional)
    string

    ⚠ NO DESCRIPTION PROVIDED

    importPath
    (optional)
    string

    ⚠ NO DESCRIPTION PROVIDED

    callback

    ⚠ NO DESCRIPTION PROVIDED

    #openThunderbirdMailbox

    Opens Thunderbird mailbox from disk and seek to seekPosition. If called with already opened file it only seeks to seekPosition. If called with a new path it closes the current file and opens the new one.

    Parameters:

    path
    string

    Path to mailbox.

    seekPosition
    (optional)
    string

    Seek to this position after opening, serialized as a string because V8's integer type is too small for large mbox files.

    callback

    Callback function returning file size.

    Parameters:

    fileSize
    string

    Size of mailbox file in bytes. Suitable for using seekPosition/fileSize as a status indicator ratio. Serialized as a string because V8's integer type is too small for large mbox files.

    #closeThunderbirdMailbox

    Closes currently open thunderbird mailbox, if any

    #readMessageFromThunderbirdMailbox

    Read one message from currently open Thunderbird mailbox.

    Parameters:

    callback

    Callback function containing message

    Parameters:

    message
    string

    Contents of the message just read

    seekPosition
    string

    Seek position in file after reading. Returns -1 if all messages have been read. Serialized as a string because V8's integer type is too small for large mbox files.