@@ -59,115 +59,125 @@ title: Customizer
59
59
60
60
## Subscriptions
61
61
62
- - {@link "NewTab Messages".CustomizerOnBackgroundUpdateSubscription ` customizer_onBackgroundUpdate ` }.
63
- - Sends {@link "NewTab Messages".BackgroundData} whenever needed.
64
- - For example:
65
- - ``` json
66
- {
67
- "background" : { "kind" : " color" , "value" : " color01" }
68
- }
69
- ```
70
- - ```json
71
- {
72
- "background" : { "kind" : " gradient" , "value" : " gradient01" }
73
- }
74
- ```
75
- - ```json
76
- {
77
- "background" : { "kind" : " hex" , "value" : " #cacaca" }
78
- }
79
- ```
80
- - ```json
81
- {
82
- "background" : { "kind" : " default" }
83
- }
84
- ```
85
- - ```json
86
- {
87
- "background" : {
88
- "kind" : " userImage" ,
89
- "value" : { "id" : " abc" , "src" : " ..." , "thumb" : " ..." , "colorScheme" : " light" }
90
- }
91
- }
92
- ```
62
+ ### ` customizer_onBackgroundUpdate `
63
+ - {@link "NewTab Messages".CustomizerOnBackgroundUpdateSubscription}
64
+ - Sends {@link "NewTab Messages".BackgroundData} whenever needed.
65
+ - For example:
66
+ ``` json
67
+ {
68
+ "background" : { "kind" : " color" , "value" : " color01" }
69
+ }
70
+ ```
71
+ ``` json
72
+ {
73
+ "background" : { "kind" : " gradient" , "value" : " gradient01" }
74
+ }
75
+ ```
76
+ ``` json
77
+ {
78
+ "background" : { "kind" : " hex" , "value" : " #cacaca" }
79
+ }
80
+ ```
81
+ ``` json
82
+ {
83
+ "background" : { "kind" : " default" }
84
+ }
85
+ ```
86
+ ``` json
87
+ {
88
+ "background" : {
89
+ "kind" : " userImage" ,
90
+ "value" : { "id" : " abc" , "src" : " ..." , "thumb" : " ..." , "colorScheme" : " light" }
91
+ }
92
+ }
93
+ ```
93
94
94
- - {@link "NewTab Messages".CustomizerOnImagesUpdateSubscription `customizer_onImagesUpdate`}.
95
- - Sends {@link "NewTab Messages".UserImageData} whenever needed.
96
- - For example, this would be pushed into the page following a successful upload
97
- - Note: In that situation, you'd send this followed by `customizer_onBackgroundUpdate` above
98
- - For example:
99
- - ```json
100
- {
101
- "userImages" : [{"id" : " abc" , "src" : " ..." , "thumb" : " ..." , "colorScheme" : " light" }]
102
- }
103
- ```
95
+ ### ` customizer_onImagesUpdate `
96
+ - {@link "NewTab Messages".CustomizerOnImagesUpdateSubscription}.
97
+ - Sends {@link "NewTab Messages".UserImageData} whenever needed.
98
+ - For example, this would be pushed into the page following a successful upload
99
+ - Note: In that situation, you'd send this followed by ` customizer_onBackgroundUpdate ` above
100
+ - For example:
101
+ ``` json
102
+ {
103
+ "userImages" : [{"id" : " abc" , "src" : " ..." , "thumb" : " ..." , "colorScheme" : " light" }]
104
+ }
105
+ ```
104
106
105
- - {@link "NewTab Messages".CustomizerOnColorUpdateSubscription `customizer_onColorUpdate`}.
106
- - Sends {@link "NewTab Messages".UserColorData} whenever needed.
107
- - For example:
108
- - ```json
109
- {
110
- "userColor" : { "kind" : " hex" , "value" : " #cacaca" }
111
- }
112
- ```
113
- or:
114
- - ```json
115
- {
116
- "userColor" : null
117
- }
118
- ```
107
+ ### ` customizer_onColorUpdate `
108
+ - {@link "NewTab Messages".CustomizerOnColorUpdateSubscription}.
109
+ - Sends {@link "NewTab Messages".UserColorData} whenever needed.
110
+ - For example:
111
+ ``` json
112
+ {
113
+ "userColor" : { "kind" : " hex" , "value" : " #cacaca" }
114
+ }
115
+ ```
116
+ or:
117
+ ``` json
118
+ {
119
+ "userColor" : null
120
+ }
121
+ ```
119
122
120
- - {@link "NewTab Messages".CustomizerOnThemeUpdateSubscription `customizer_onThemeUpdate`}.
121
- - Sends {@link "NewTab Messages".ThemeData} whenever needed.
122
- - For example:
123
- - ```json
124
- {
125
- "theme" : " system"
126
- }
127
- ```
123
+ ### ` customizer_onThemeUpdate `
124
+ - {@link "NewTab Messages".CustomizerOnThemeUpdateSubscription}.
125
+ - Sends {@link "NewTab Messages".ThemeData} whenever needed.
126
+ - For example:
127
+ ``` json
128
+ {
129
+ "theme" : " system"
130
+ }
131
+ ```
128
132
129
- - {@link "NewTab Messages".CustomizerAutoOpenSubscription `customizer_autoOpen`}.
130
- - Send this into the page to trigger the customizer to be opened.
133
+ ### ` customizer_autoOpen `
134
+ - {@link "NewTab Messages".CustomizerAutoOpenSubscription}.
135
+ - Send this into the page to trigger the customizer to be opened.
131
136
132
137
## Notifications
133
138
134
- - {@link "NewTab Messages".CustomizerSetBackgroundNotification `customizer_setBackground`}.
135
- - Sends {@link "NewTab Messages".CustomizerSetBackgroundNotify} whenever needed.
136
- - For example:
137
- - ```json
138
- {
139
- "background" : { "kind" : " color" , "value" : " color01" }
140
- }
141
- ```
142
-
143
- - {@link "NewTab Messages".CustomizerSetThemeNotification `customizer_setTheme`}.
144
- - Sends {@link "NewTab Messages".CustomizerSetBackgroundNotify} whenever needed.
145
- - For example:
146
- - ```json
147
- {
148
- "theme" : " light"
149
- }
150
- ```
139
+ ### ` customizer_setBackground `
140
+ - {@link "NewTab Messages".CustomizerSetBackgroundNotification}.
141
+ - Sends {@link "NewTab Messages".CustomizerSetBackgroundNotify} whenever needed.
142
+ - For example:
143
+ ``` json
144
+ {
145
+ "background" : { "kind" : " color" , "value" : " color01" }
146
+ }
147
+ ```
151
148
152
- - {@link "NewTab Messages".CustomizerUploadNotification `customizer_upload`}.
153
- - Sent to trigger a file upload
149
+ ### ` customizer_setTheme `
150
+ - {@link "NewTab Messages".CustomizerSetThemeNotification}.
151
+ - Sends {@link "NewTab Messages".CustomizerSetBackgroundNotify} whenever needed.
152
+ - For example:
153
+ ``` json
154
+ {
155
+ "theme" : " light"
156
+ }
157
+ ```
158
+
159
+ ### ` customizer_upload `
160
+ - {@link "NewTab Messages".CustomizerUploadNotification}.
161
+ - Sent to trigger a file upload
154
162
155
- - {@link "NewTab Messages".CustomizerDeleteImageNotification `customizer_deleteImage`}.
156
- - Sends {@link "NewTab Messages".CustomizerDeleteImageNotify} whenever needed.
157
- - For example:
158
- - ```json
159
- {
160
- "id" : " abc"
161
- }
162
- ```
163
+ ### ` customizer_deleteImage `
164
+ - {@link "NewTab Messages".CustomizerDeleteImageNotification}.
165
+ - Sends {@link "NewTab Messages".CustomizerDeleteImageNotify} whenever needed.
166
+ - For example:
167
+ ``` json
168
+ {
169
+ "id" : " abc"
170
+ }
171
+ ```
163
172
164
- - {@link "NewTab Messages".CustomizerContextMenuNotification `customizer_contextMenu`}.
165
- - Sends {@link "NewTab Messages".UserImageContextMenu}
166
- - Note: only sent for right-clicks on user images in the selection screen.
167
- - For example:
168
- - ```json
169
- {
170
- "target" : " userImage" ,
171
- "id" : " 01"
172
- }
173
- ```
173
+ ### ` customizer_contextMenu `
174
+ - {@link "NewTab Messages".CustomizerContextMenuNotification}.
175
+ - Sends {@link "NewTab Messages".UserImageContextMenu}
176
+ - Note: only sent for right-clicks on user images in the selection screen.
177
+ - For example:
178
+ ``` json
179
+ {
180
+ "target" : " userImage" ,
181
+ "id" : " 01"
182
+ }
183
+ ```
0 commit comments