forked from mdn/webextensions-examples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
examples.json
419 lines (419 loc) · 13.8 KB
/
examples.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
[
{
"javascript_apis": [
"storage.local",
"tabs.onActivated",
"tabs.onUpdated",
"tabs.query",
"windows.getCurrent"
],
"name": "annotate-page",
"description": "Displays a sidebar that lets you take notes on web pages."
},
{
"javascript_apis": [
"pageAction.getTitle",
"pageAction.onClicked",
"pageAction.setIcon",
"pageAction.setTitle",
"pageAction.show",
"tabs.insertCSS",
"tabs.onUpdated",
"tabs.query",
"tabs.removeCSS"
],
"name": "apply-css",
"description": "Adds a page action to the toolbar. Click the button to apply a red border using injected CSS. Click the button again to remove the CSS."
},
{
"javascript_apis": [
"extension.getURL",
"runtime.onMessage",
"tabs.executeScript",
"tabs.query",
"tabs.reload",
"tabs.sendMessage"
],
"name": "beastify",
"description": "Adds a browser action icon to the toolbar. Click the button to choose a beast. The active tab's body content is then replaced with a picture of the chosen beast."
},
{
"javascript_apis": [
"bookmarks.create",
"bookmarks.onCreated",
"bookmarks.onRemoved",
"bookmarks.remove",
"bookmarks.search",
"browserAction.onClicked",
"browserAction.setIcon",
"tabs.onActivated",
"tabs.onUpdated",
"tabs.query",
"windows.onFocusChanged"
],
"name": "bookmark-it",
"description": "Adds a bookmark button to the toolbar. Click the button to toggle a bookmark for the current page."
},
{
"javascript_apis": [],
"name": "borderify",
"description": "Adds a solid red border to all webpages matching mozilla.org."
},
{
"javascript_apis": [
"alarms.clearAll",
"alarms.create",
"alarms.onAlarm",
"pageAction.hide",
"pageAction.onClicked",
"pageAction.show",
"tabs.get",
"tabs.onActivated",
"tabs.onUpdated",
"tabs.query",
"tabs.update"
],
"name": "chill-out",
"description": "Show a page action after a period of inactivity. Show cat gifs when the page action is clicked."
},
{
"javascript_apis": [
"commands.getAll",
"commands.onCommand"
],
"name": "commands",
"description": "Demonstrates using the commands API to set up a keyboard shortcut. The shortcut created is accessed using Ctrl+Shift+Y (Command+Shift+Y on a Mac)."
},
{
"javascript_apis": [
"contextMenus.create",
"contextMenus.onClicked",
"tabs.executeScript"
],
"name": "context-menu-copy-link-with-types",
"description": "Add a context menu option to links to copy the link to the clipboard, as plain text and as a link in rich HTML."
},
{
"javascript_apis": [
"contextMenus.create",
"contextMenus.onClicked",
"contextMenus.remove",
"contextMenus.update",
"i18n.getMessage",
"runtime.lastError",
"tabs.executeScript"
],
"name": "context-menu-demo",
"description": "Demonstrates adding and manipulating context menu items using the contextMenus API."
},
{
"javascript_apis": [
"contextualIdentities.query",
"tabs.create",
"tabs.query",
"tabs.remove"
],
"name": "contextual-identities",
"description": "List, create, and remove contextual identities."
},
{
"javascript_apis": [
"cookies.get",
"cookies.onChanged",
"cookies.remove",
"cookies.set",
"extension.getURL",
"runtime.onMessage",
"tabs.onActivated",
"tabs.onUpdated",
"tabs.query",
"tabs.sendMessage"
],
"name": "cookie-bg-picker",
"description": "Allows the user to customize the background color and tiled pattern on sites the visit, and also saves their preferences via a cookie, reapplying them whenever they revisit a site they previously customized."
},
{
"javascript_apis": [
"alarms.create",
"alarms.onAlarm",
"theme.update"
],
"name": "dynamic-theme",
"description": "Dynamic theme example"
},
{
"javascript_apis": [
"runtime.onMessage",
"runtime.sendMessage",
"storage.local"
],
"name": "embedded-webextension-bootstrapped",
"description": "Demonstrates how to use an embedded WebExtension to port from a bootstrapped extension."
},
{
"javascript_apis": [
"notifications.create",
"runtime.connect",
"runtime.onConnect",
"runtime.onMessage",
"runtime.sendMessage",
"storage.local"
],
"name": "embedded-webextension-sdk",
"description": "Demonstrates how to use an embedded WebExtension to port from an SDK-based add-on."
},
{
"javascript_apis": [],
"name": "emoji-substitution",
"description": "Replaces words with emojis."
},
{
"javascript_apis": [],
"name": "eslint-example",
"description": "Demonstrates how to configure an extension with eslint."
},
{
"javascript_apis": [
"browserAction.onClicked",
"runtime.openOptionsPage",
"storage.sync"
],
"name": "favourite-colour",
"description": "An example options page, letting you store your favourite colour."
},
{
"javascript_apis": [
"omnibox.onInputChanged",
"omnibox.onInputEntered",
"omnibox.setDefaultSuggestion",
"tabs.create",
"tabs.update"
],
"name": "firefox-code-search",
"description": "Demonstrates how to use the omnibox API."
},
{
"javascript_apis": [
"browserAction.onClicked",
"browsingData.remove",
"notifications.create",
"storage.local"
],
"name": "forget-it",
"description": "Demonstrates how to use the browsingData API."
},
{
"javascript_apis": [
"browserAction.onClicked",
"identity.getRedirectURL",
"identity.launchWebAuthFlow",
"notifications.create"
],
"name": "google-userinfo",
"description": "Demonstrates how to use the identity API."
},
{
"javascript_apis": [
"history.deleteUrl",
"history.search",
"pageAction.show",
"tabs.onUpdated",
"tabs.query"
],
"name": "history-deleter",
"description": "History API demo: deletes history items for a given domain"
},
{
"javascript_apis": [
"runtime.onMessage",
"tabs.executeScript",
"tabs.query",
"tabs.sendMessage"
],
"name": "imagify",
"description": "Using a sidebar, illustrates the use of file picker and drag and drop. A content script replaces the current page content with the chosen image."
},
{
"javascript_apis": [
"downloads.erase",
"downloads.getFileIcon",
"downloads.open",
"downloads.removeFile",
"downloads.search"
],
"name": "latest-download",
"description": "Shows the last downloaded item, and lets you open or delete it."
},
{
"javascript_apis": [
"cookies.getAll",
"tabs.query"
],
"name": "list-cookies",
"description": "This extensions list the cookies in the active tab."
},
{
"javascript_apis": [
"runtime.sendMessage"
],
"name": "mocha-client-tests",
"description": "This example shows two methods of testing an extension: running tests from within the extension, and running tests from the command line using Karma"
},
{
"javascript_apis": [
"browserAction.onClicked",
"runtime.connectNative"
],
"name": "native-messaging",
"description": "Example of native messaging, including a Python application and an extension which exchanges messages with it."
},
{
"javascript_apis": [
"storage.local",
"webNavigation.onCompleted"
],
"name": "navigation-stats",
"description": "Demonstration of the webNavigation API, showing basic stats about which pages you've visited."
},
{
"javascript_apis": [
"extension.getURL",
"i18n.getMessage",
"notifications.create",
"runtime.onMessage",
"runtime.sendMessage"
],
"name": "notify-link-clicks-i18n",
"description": "Shows a localized notification when the user clicks on links."
},
{
"javascript_apis": [
"browserAction.onClicked",
"tabs.create"
],
"name": "open-my-page-button",
"description": "Adds a browser action icon to the toolbar. When the browser action is clicked, the add-on opens a page that was packaged with it."
},
{
"javascript_apis": [],
"name": "page-to-extension-messaging",
"description": "Demonstrates how a web page and a content script can exchange messages. Visit https://mdn.github.io/webextensions-examples/content-script-page-script-messaging.html for the demo."
},
{
"javascript_apis": [
"browserAction.onClicked",
"permissions.getAll",
"permissions.remove",
"permissions.request",
"runtime.getURL",
"tabs.create"
],
"name": "permissions",
"description": "Demonstrates optional permissions using the permissions API."
},
{
"javascript_apis": [
"extension.getURL",
"proxy.onProxyError",
"proxy.registerProxyScript",
"runtime.onMessage",
"runtime.sendMessage",
"storage.local",
"storage.onChanged"
],
"name": "proxy-blocker",
"description": "Uses the proxy API to block requests to specific hosts."
},
{
"javascript_apis": [
"storage.local"
],
"name": "quicknote",
"description": "Allows the user to make quick notes by clicking a button and entering text into the resulting popup. The notes are saved in storage."
},
{
"javascript_apis": [],
"name": "react-es6-popup",
"description": "This is an example of creating a browser action popup UI in React and ES6 JavaScript."
},
{
"javascript_apis": [],
"name": "selection-to-clipboard",
"description": "Demonstrates how to write to the clipboard from a content script"
},
{
"javascript_apis": [
"storage.local",
"webRequest.onAuthRequired",
"webRequest.onCompleted",
"webRequest.onErrorOccurred"
],
"name": "stored-credentials",
"description": "Performs basic authentication by supplying stored credentials."
},
{
"javascript_apis": [
"tabs.create",
"tabs.duplicate",
"tabs.getZoom",
"tabs.highlight",
"tabs.move",
"tabs.onMoved",
"tabs.onRemoved",
"tabs.query",
"tabs.reload",
"tabs.remove",
"tabs.setZoom"
],
"name": "tabs-tabs-tabs",
"description": "Demonstrates tab manipulation: opening, closing, moving, zooming tabs."
},
{
"javascript_apis": [
"management.getAll",
"management.setEnabled"
],
"name": "theme-switcher",
"description": "An example of how to use the management API for themes."
},
{
"javascript_apis": [
],
"name": "themes",
"description": "A collection of themes illustrating:<ul><li>weta_fade: a basic theme employing a single image specified in <code>headerURL:</code>.</li><li>weta_fade_chrome: the weta_fade theme implemented with Chrome compatible manifest keys.</li><li>weta_tiled: a theme using a tiled image.</li><li>weta_mirror: a theme using multiple images and aligning those images in the header.</li><li>animated: use of an animated PNG.</li></ul>"
},
{
"javascript_apis": [
"topSites.get"
],
"name": "top-sites",
"description": "Demonstration of the topSites API."
},
{
"javascript_apis": [
"extension.getBackgroundPage",
"webRequest.onBeforeSendHeaders"
],
"name": "user-agent-rewriter",
"description": "Demonstrates using the webRequest API to rewrite the User-Agent HTTP header."
},
{
"javascript_apis": [
"runtime.onMessage",
"runtime.sendMessage"
],
"name": "webpack-modules",
"description": "Demonstrates how to use webpack to package npm modules in an extension."
},
{
"javascript_apis": [
"windows.create",
"windows.getAll",
"windows.getCurrent",
"windows.remove",
"windows.update"
],
"name": "window-manipulator",
"description": "Demonstrates how to manipulate windows: opening, closing, resizing windows."
}
]