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
This mole game is based on a YouTube tutorial in our Chrome Extensions series. Watch it [here](https://goo.gle/Chrome-Ext).
4
+
5
+
<imgsrc="mole-game.png"width=500>
6
+
7
+
## Overview
8
+
9
+
In the sample, moles periodically appear from pipes in the browser toolbar. You score points by clicking the icon before the mole disappears.
10
+
11
+
If enabled, a browser tab is closed if you miss one of the moles.
12
+
13
+
## Implementation Notes
14
+
15
+
Each icon in the browser toolbar is a seperate extension. The extensions communicate using the `chrome.runtime.sendMessage` API and the `chrome.runtime.onMessageExternal` event.
16
+
17
+
To discover mole extensions, the controller extension uses the `chrome.management` API.
18
+
19
+
By default, the tab closing behavior is disabled. You can enable this by commenting out the line in `mole/service-worker.js`.
20
+
21
+
## Running this extension
22
+
23
+
1. Clone this repository.
24
+
1. Make several copies of the `mole` directory.
25
+
1. Load the `controller` directory and all mole directories in Chrome as [unpacked extensions](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
0 commit comments