Add copy public id button

This commit is contained in:
Ajay Ramachandran
2021-09-01 04:22:06 -04:00
parent a2c3116bdd
commit b1aaa0ac5e
5 changed files with 19 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
"usernameInput",
"usernameValue",
"submitUsername",
"sbPopupIconCopyUserID",
// More
"submissionSection",
"mainControls",
@@ -134,6 +135,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
PageElements.optionsButton.addEventListener("click", openOptions);
PageElements.helpButton.addEventListener("click", openHelp);
PageElements.refreshSegmentsButton.addEventListener("click", refreshSegments);
PageElements.sbPopupIconCopyUserID.addEventListener("click", async () => navigator.clipboard.writeText(await utils.getHash(Config.config.userID)));
/** If true, the content script is in the process of creating a new segment. */
let creatingSegment = false;