vivaldi.readingListPrivate Modders API Reference
Use the vivaldi.readingListPrivate
API to manipulate the reading list.
Types
#ReadingListEntry
Object passed to the update and returned in the get function.
Properties:
- url
string
The url of the entry. This is also the unique key.
- title
string
The title of the entry.
- read
boolean
Has entry been read.
- lastUpdate
number
Last updated in micro seconds since Jan 1st 1970.
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
#onModelChanged
Fired when the reading list data model has changed.
Methods
#add
Add a new entry to the reading list.
Parameters:
- url
string
The url of the entry. This is also the unique key. Only http/https urls are supported.
- title
string
The title of the entry.
#remove
Remove an entry from the reading list.
Parameters:
- url
string
The url of the entry.
#getAll
Returns all reading list entries.
#setReadStatus
Sets the read status on a url.
Parameters:
- url
string
url to set read status on.
- read
boolean
true for read, false for unread.