You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: declarations/src/main/kotlin/alarms/alarms.kt
+13-4Lines changed: 13 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@ import webextensions.Event
6
6
/**
7
7
* @param name Name of this alarm.
8
8
* @param scheduledTime Time when the alarm is scheduled to fire, in milliseconds past the epoch.
9
-
* @param periodInMinutes When present, signals that the alarm triggers periodically after so many minutes.
9
+
* @param periodInMinutes When present, signals that the alarm triggers periodically after so many
10
+
minutes.
10
11
*/
11
12
classAlarm(
12
13
varname:String,
@@ -15,9 +16,15 @@ class Alarm(
15
16
)
16
17
17
18
/**
18
-
* Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if 'when' is provided), after 'delayInMinutes' minutes from the current time (if 'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and 'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after that many minutes.
19
+
* Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if
20
+
'when' is provided), after 'delayInMinutes' minutes from the current time (if
21
+
'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current
22
+
time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and
23
+
'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after
24
+
that many minutes.
19
25
* @param when Time when the alarm is scheduled to first fire, in milliseconds past the epoch.
20
-
* @param delayInMinutes Number of minutes from the current time after which the alarm should first fire.
26
+
* @param delayInMinutes Number of minutes from the current time after which the alarm should first
27
+
fire.
21
28
* @param periodInMinutes Number of minutes after which the alarm should recur repeatedly.
22
29
*/
23
30
classAlarmInfo(
@@ -34,7 +41,9 @@ external class AlarmsNamespace {
34
41
val onAlarm:Event<(name:Alarm) ->Unit>
35
42
36
43
/**
37
-
* Creates an alarm. After the delay is expired, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
44
+
* Creates an alarm. After the delay is expired, the onAlarm event is fired. If there is another
45
+
alarm with the same name (or no name if none is specified), it will be cancelled and
Copy file name to clipboardExpand all lines: declarations/src/main/kotlin/bookmarks/bookmarks.kt
+40-17Lines changed: 40 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,34 @@ import kotlin.js.Promise
4
4
importwebextensions.Event
5
5
6
6
/**
7
-
* Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default). */
7
+
* Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that
8
+
this node was configured by the system administrator or by the custodian of a supervised
9
+
user. Omitted if the node can be modified by the user and the extension (default). */
8
10
typealiasBookmarkTreeNodeUnmodifiable=String
9
11
10
12
/**
11
13
* Indicates the type of a BookmarkTreeNode, which can be one of bookmark, folder or separator. */
12
14
typealiasBookmarkTreeNodeType=String
13
15
14
16
/**
15
-
* A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.
16
-
* @param id The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
17
+
* A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within
18
+
their parent folder.
19
+
* @param id The unique identifier for the node. IDs are unique within the current profile, and they
20
+
remain valid even after the browser is restarted.
17
21
* @param parentId The <code>id</code> of the parent folder. Omitted for the root node.
18
22
* @param index The 0-based position of this node within its parent folder.
19
23
* @param url The URL navigated to when a user clicks the bookmark. Omitted for folders.
20
24
* @param title The text displayed for the node.
21
-
* @param dateAdded When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>).
22
-
* @param dateGroupModified When the contents of this folder last changed, in milliseconds since the epoch.
23
-
* @param unmodifiable Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
24
-
* @param type Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or separator.
25
+
* @param dateAdded When this node was created, in milliseconds since the epoch (<code>new
26
+
Date(dateAdded)</code>).
27
+
* @param dateGroupModified When the contents of this folder last changed, in milliseconds since the
28
+
epoch.
29
+
* @param unmodifiable Indicates the reason why this node is unmodifiable. The <var>managed</var>
30
+
value indicates that this node was configured by the system administrator or by the
31
+
custodian of a supervised user. Omitted if the node can be modified by the user and the
32
+
extension (default).
33
+
* @param type Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or
34
+
separator.
25
35
* @param children An ordered list of children of this node.
26
36
*/
27
37
classBookmarkTreeNode(
@@ -40,7 +50,8 @@ class BookmarkTreeNode(
40
50
/**
41
51
* Object passed to the create() function.
42
52
* @param parentId Defaults to the Other Bookmarks folder.
43
-
* @param type Indicates the type of BookmarkTreeNode to create, which can be one of bookmark, folder or separator.
53
+
* @param type Indicates the type of BookmarkTreeNode to create, which can be one of bookmark,
54
+
folder or separator.
44
55
*/
45
56
classCreateDetails(
46
57
varparentId:String? = null,
@@ -55,8 +66,10 @@ class CreateDetails(
55
66
typealiasIdOrIdList=Any
56
67
57
68
/**
58
-
* An object specifying properties and values to match when searching. Produces bookmarks matching all properties.
59
-
* @param query A string of words and quoted phrases that are matched against bookmark URLs and titles.
69
+
* An object specifying properties and values to match when searching. Produces bookmarks matching
70
+
all properties.
71
+
* @param query A string of words and quoted phrases that are matched against bookmark URLs and
72
+
titles.
60
73
* @param url The URL of the bookmark; matches verbatim. Note that folders have no URL.
61
74
* @param title The title of the bookmark; matches verbatim.
62
75
*/
@@ -67,7 +80,10 @@ class Query(
67
80
)
68
81
69
82
/**
70
-
* Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or an object. If an object, the properties <code>query</code>, <code>url</code>, and <code>title</code> may be specified and bookmarks matching all specified properties will be produced. */
83
+
* Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or
84
+
an object. If an object, the properties <code>query</code>, <code>url</code>, and
85
+
<code>title</code> may be specified and bookmarks matching all specified properties will be
@@ -100,14 +116,16 @@ external class BookmarksNamespace {
100
116
val onCreated:Event<(id:String, bookmark:BookmarkTreeNode) ->Unit>
101
117
102
118
/**
103
-
* Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.
119
+
* Fired when a bookmark or folder is removed. When a folder is removed recursively, a single
120
+
notification is fired for the folder, and none for its contents.
104
121
*
105
122
* @param id null
106
123
* @param removeInfo null */
107
124
val onRemoved:Event<(id:String, removeInfo:RemoveInfo) ->Unit>
108
125
109
126
/**
110
-
* Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.
127
+
* Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes
128
+
trigger this.
111
129
*
112
130
* @param id null
113
131
* @param changeInfo null */
@@ -151,17 +169,20 @@ external class BookmarksNamespace {
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
172
+
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object
173
+
produce BookmarkTreeNodes matching all specified properties.
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
178
+
* Searches for BookmarkTreeNodes matching the given query. Queries specified with an object
179
+
produce BookmarkTreeNodes matching all specified properties.
* Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' and 'url' are supported.
195
+
* Updates the properties of a bookmark or folder. Specify only the properties that you want to
196
+
change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only
Copy file name to clipboardExpand all lines: declarations/src/main/kotlin/browserAction/browserAction.kt
+51-14Lines changed: 51 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,14 @@ import tabs.Tab
6
6
importwebextensions.Event
7
7
8
8
/**
9
-
* Specifies to which tab or window the value should be set, or from which one it should be retrieved. If no tab nor window is specified, the global value is set or retrieved.
10
-
* @param tabId When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited.
11
-
* @param windowId When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited.
9
+
* Specifies to which tab or window the value should be set, or from which one it should be
10
+
retrieved. If no tab nor window is specified, the global value is set or retrieved.
11
+
* @param tabId When setting a value, it will be specific to the specified tab, and will
12
+
automatically reset when the tab navigates. When getting, specifies the tab to get the value
13
+
from; if there is no tab-specific value, the window one will be inherited.
14
+
* @param windowId When setting a value, it will be specific to the specified window. When getting,
15
+
specifies the window to get the value from; if there is no window-specific value, the global
16
+
one will be inherited.
12
17
*/
13
18
classDetails(
14
19
vartabId:Int? = null,
@@ -18,7 +23,8 @@ class Details(
18
23
typealiasColorArray=Array<Int>
19
24
20
25
/**
21
-
* Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element).
26
+
* Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code>
* An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value, with opaque red being <code>#FF0000</code> or <code>#F00</code>. */
38
+
* An array of four integers in the range [0,255] that make up the RGBA color of the badge. For
39
+
example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value,
40
+
with opaque red being <code>#FF0000</code> or <code>#F00</code>. */
33
41
typealiasColorValue=Any
34
42
35
43
/**
@@ -52,7 +60,12 @@ class ImageData() {
52
60
}
53
61
54
62
/**
55
-
* Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' */
63
+
* Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If
64
+
the icon is specified as a dictionary, the actual image to be used is chosen depending on
65
+
screen's pixel density. If the number of image pixels that fit into one screen space unit
66
+
equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected.
67
+
Initially only scales 1 and 2 will be supported. At least one image must be specified. Note
68
+
that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}' */
* Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}' */
80
+
* Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be
81
+
set. If the icon is specified as a dictionary, the actual image to be used is chosen
82
+
depending on screen's pixel density. If the number of image pixels that fit into one screen
83
+
space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be
84
+
selected. Initially only scales 1 and 2 will be supported. At least one image must be
85
+
specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'
86
+
*/
68
87
typealiasPath2=Any
69
88
70
89
/**
71
-
* @param imageData Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'
72
-
* @param path Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'
90
+
* @param imageData Either an ImageData object or a dictionary {size -> ImageData} representing icon
91
+
to be set. If the icon is specified as a dictionary, the actual image to be used is chosen
92
+
depending on screen's pixel density. If the number of image pixels that fit into one screen
93
+
space unit equals <code>scale</code>, then image with size <code>scale</code> * 19 will be
94
+
selected. Initially only scales 1 and 2 will be supported. At least one image must be
95
+
specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19':
96
+
foo}'
97
+
* @param path Either a relative image path or a dictionary {size -> relative image path} pointing
98
+
to icon to be set. If the icon is specified as a dictionary, the actual image to be used is
99
+
chosen depending on screen's pixel density. If the number of image pixels that fit into one
100
+
screen space unit equals <code>scale</code>, then image with size <code>scale</code> * 19
101
+
will be selected. Initially only scales 1 and 2 will be supported. At least one image must
102
+
be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19':
103
+
foo}'
73
104
*/
74
105
classDetails3(
75
106
varimageData:ImageData2? = null,
@@ -81,7 +112,8 @@ class Details3(
81
112
typealiasPopup=Any
82
113
83
114
/**
84
-
* @param popup The html file to show in a popup. If set to the empty string (''), no popup is shown.
115
+
* @param popup The html file to show in a popup. If set to the empty string (''), no popup is
116
+
shown.
85
117
*/
86
118
classDetails4(
87
119
varpopup:Popup
@@ -104,7 +136,8 @@ class Details7(var color: ColorValue)
104
136
105
137
externalclassBrowserActionNamespace {
106
138
/**
107
-
* Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.
139
+
* Fired when a browser action icon is clicked. This event will not fire if the browser action
140
+
has a popup.
108
141
*
109
142
* @param tab null */
110
143
val onClicked:Event<(tab:Tab) ->Unit>
@@ -120,12 +153,15 @@ external class BrowserActionNamespace {
120
153
fungetTitle(details:Details): Promise<String>
121
154
122
155
/**
123
-
* Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.
156
+
* Sets the icon for the browser action. The icon can be specified either as the path to an
157
+
image file or as the pixel data from a canvas element, or as dictionary of either one of
158
+
those. Either the <b>path</b> or the <b>imageData</b> property must be specified.
124
159
*/
125
160
funsetIcon(details:Details3): Promise<Any>
126
161
127
162
/**
128
-
* Sets the html document to be opened as a popup when the user clicks on the browser action's icon.
163
+
* Sets the html document to be opened as a popup when the user clicks on the browser action's
164
+
icon.
129
165
*/
130
166
funsetPopup(details:Details4): Promise<Any>
131
167
@@ -140,7 +176,8 @@ external class BrowserActionNamespace {
140
176
funsetBadgeText(details:Details5): Promise<Any>
141
177
142
178
/**
143
-
* Gets the badge text of the browser action. If no tab nor window is specified is specified, the global badge text is returned.
179
+
* Gets the badge text of the browser action. If no tab nor window is specified is specified,
0 commit comments