sfc-utils 1.4.140 → 1.4.141
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 +11 -0
- package/nav2.js +9 -9
- package/package.json +1 -1
package/accountswap.js
CHANGED
|
@@ -11,6 +11,17 @@ const pollForAccount = async function (i, isNav) {
|
|
|
11
11
|
if (!i) {
|
|
12
12
|
i = 0;
|
|
13
13
|
}
|
|
14
|
+
// Add a click event to signin to load it with a return URL
|
|
15
|
+
//
|
|
16
|
+
if (isNav) {
|
|
17
|
+
const signinButton = document.querySelector(".hnp-signin");
|
|
18
|
+
if (signinButton) {
|
|
19
|
+
// Change the href to include the return URL params
|
|
20
|
+
signinButton.href = `${
|
|
21
|
+
signinButton.href
|
|
22
|
+
}?prevousLocation=${encodeURIComponent(window.location.href)}`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
14
25
|
// Safecheck for treg since it might not be global yet
|
|
15
26
|
if (window && window.treg && window.treg.identity) {
|
|
16
27
|
// Now we have all the vars to know if we're logged in
|
package/nav2.js
CHANGED
|
@@ -140,20 +140,20 @@ let getNav2 = function (meta, urlAdd, forceColor, navLink, navArray) {
|
|
|
140
140
|
|
|
141
141
|
// Using style tags just to make this easy
|
|
142
142
|
let rightBlock = `
|
|
143
|
-
<a id="nav2-sub-box" style="font-weight: 700;" href="${subscribeLink}" target="_blank">
|
|
143
|
+
<a id="nav2-sub-box" class="hnp-subscribe" style="font-weight: 700;" href="${subscribeLink}" target="_blank">
|
|
144
144
|
<div>Subscribe</div>
|
|
145
145
|
</a>
|
|
146
146
|
`;
|
|
147
147
|
|
|
148
148
|
// If there's a signin link, add it here
|
|
149
|
-
if (signinLink) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
149
|
+
// if (signinLink) {
|
|
150
|
+
// rightBlock =
|
|
151
|
+
// `
|
|
152
|
+
// <a id="nav2-sub-box" class="hnp-signin" style="margin: 0; font-weight: 700;" href="${signinLink}">
|
|
153
|
+
// <span>Sign in</span>
|
|
154
|
+
// </a>
|
|
155
|
+
// <span style="font-size: 14px; padding: 2px 0 2px;">or</span>` + rightBlock;
|
|
156
|
+
// }
|
|
157
157
|
|
|
158
158
|
let navHTML = `<nav class="nav2-container ${invertClass}">
|
|
159
159
|
<div class="nav2-left">
|