- This demo is the toy extension designed to facilitate Teams message copying by clicking on a message.
- The objective is to check the feasibility of Teams message copying using the Chrome extension development kit.
-
The extension only works on the Teams website,
https://teams.microsoft.com/
. -
Due to a virtual rendering mechanism in Teams, after scrolling, the extension would add a copy feature when clicking the
Activate Message Copy
in the context menu.
background.js
is a service worker that displays a custom context menu for the extension.
content-script.js
is a file responsible for attaching and detaching actual events, and it will be injected into each message.
The service worker and web page work on separate threads. To trigger the action in content-script.js
, the code implements an event sending mechanism from background.js
to content-script.js
, which can trigger the actions through commands.
-
Access the extension pages by typing
edge://extensions/
in Edge orchrome://extensions/
in Chrome into the address bar. -
Load the code directory could import files by following the menu.