aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/popup.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/popup.ts')
-rw-r--r--src/popup.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/popup.ts b/src/popup.ts
index edd4e9e5..2f988119 100644
--- a/src/popup.ts
+++ b/src/popup.ts
@@ -28,6 +28,7 @@ import GenericNotice from "./render/GenericNotice";
import { noRefreshFetchingChaptersAllowed } from "./utils/licenseKey";
import { getFormattedTime } from "@ajayyy/maze-utils/lib/formating";
import { StorageChangesObject } from "@ajayyy/maze-utils/lib/config";
+import { getHash } from "@ajayyy/maze-utils/lib/hash";
const utils = new Utils();
@@ -231,7 +232,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 () => copyToClipboard(await utils.getHash(Config.config.userID)));
+ PageElements.sbPopupIconCopyUserID.addEventListener("click", async () => copyToClipboard(await getHash(Config.config.userID)));
// Forward click events
if (window !== window.top) {
@@ -284,7 +285,7 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
if (!Config.config.payments.freeAccess && !noRefreshFetchingChaptersAllowed()) values.push("freeChaptersAccess");
utils.asyncRequestToServer("GET", "/api/userInfo", {
- publicUserID: await utils.getHash(Config.config.userID),
+ publicUserID: await getHash(Config.config.userID),
values
}).then((res) => {
if (res.status === 200) {