sfc-utils 1.4.131 → 1.4.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accountswap.js +14 -5
- package/package.json +1 -1
package/accountswap.js
CHANGED
|
@@ -12,6 +12,12 @@ const pollForAccount = async function (i, isNav) {
|
|
|
12
12
|
i = 0;
|
|
13
13
|
}
|
|
14
14
|
// Safecheck for treg since it might not be global yet
|
|
15
|
+
console.log(
|
|
16
|
+
"treg",
|
|
17
|
+
window.treg,
|
|
18
|
+
window.treg.identity,
|
|
19
|
+
window.treg.identity.id
|
|
20
|
+
);
|
|
15
21
|
if (
|
|
16
22
|
window &&
|
|
17
23
|
window.treg &&
|
|
@@ -29,12 +35,15 @@ const pollForAccount = async function (i, isNav) {
|
|
|
29
35
|
return await pollForAccount(i + 1, isNav);
|
|
30
36
|
}
|
|
31
37
|
subButtonText.innerText = "Account";
|
|
38
|
+
subButton.setAttribute("href", accountURL);
|
|
32
39
|
// Instead of having a true link, set click event to run treg.realm.iframeProfile.NavigateToIndex()
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
if (window.treg.realm.iframeProfile) {
|
|
41
|
+
subButton.onclick = function (e) {
|
|
42
|
+
window.treg.realm.iframeProfile.NavigateToIndex();
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
e.stopPropagation();
|
|
45
|
+
};
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
return true;
|