sfc-utils 1.4.127 → 1.4.129

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.
Files changed (2) hide show
  1. package/accountswap.js +6 -3
  2. package/package.json +1 -1
package/accountswap.js CHANGED
@@ -23,14 +23,17 @@ const pollForAccount = async function (i, isNav) {
23
23
  const subButton = document.querySelector("#nav2-sub-box");
24
24
  const subButtonText = document.querySelector("#nav2-sub-box div");
25
25
  if (subButton && subButtonText) {
26
- console.log("innertext", subButtonText.innerText);
27
26
  if (!subButtonText.innerText) {
28
27
  // If there's no innerText, keep waiting
28
+ await new Promise((resolve) => setTimeout(resolve, 1000));
29
29
  return await pollForAccount(i + 1, isNav);
30
30
  }
31
- subButton.setAttribute("href", accountURL);
32
31
  subButtonText.innerText = "Account";
33
- console.log("innertext", subButtonText.innerText);
32
+ // subButton.setAttribute("href", accountURL);
33
+ // Instead of having a true link, set click event to run treg.realm.iframeProfile.NavigateToIndex()
34
+ subButton.onclick = function () {
35
+ window.treg.realm.iframeProfile.NavigateToIndex();
36
+ };
34
37
  }
35
38
  }
36
39
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.4.127",
3
+ "version": "1.4.129",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",