Network Weekend (Marty 2026-11-17): 8 instant picks per position Fri 11-27 00:00 CT to Tue 12-01 00:00 CT, ribbon, chatbot facts
weekend.js: date gate by the purchase's chain time (WEEKEND_PICKS=0 switches it off, WEEKEND_NOW test clock); /api/config, quote, order and the attach hook use it. Tank check 11-17: draft pool 1,339, 2 positions sold. netdeals.js + /assets/netweekend.js ribbon (/api/network-deals from the hub), loaded by common.js (not draftday/admin), common.js?v=4. chatbot FACTS weekend line and a chatcore finish hook so stored instant answers say 8 while live. qa/weekend.test.cjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@
|
||||
<section class="panel"><h3>Best Coach pot (last week)</h3><pre id="potOut" class="kit-pre"></pre></section>
|
||||
<section class="panel"><h3>Old-link map (JSON {"oldrefs": {"old": "network username"}})</h3><input type="file" id="oldFile" accept="application/json"><pre id="oldOut" class="kit-pre"></pre></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/misc.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
@@ -112,3 +112,9 @@ window.FX = (function () {
|
||||
}
|
||||
return { $, esc, getConfig, short, status, getJSON, post, n, polOf, when, ago, left, initials, renderNav, renderFooter, setWeek, weekNo, card, silentSso, signInBlock, wireSignIn };
|
||||
})();
|
||||
// Network Weekend ribbon (Marty 2026-11-17): netweekend.js paints it only while a network event is live (dates from the hub through
|
||||
// /api/network-deals). Not on the 1080x1080 draft-day card or the admin page.
|
||||
(function () {
|
||||
if (/^\/(draftday|admin)/.test(location.pathname)) return;
|
||||
var s = document.createElement('script'); s.src = '/assets/netweekend.js?v=20261117'; s.defer = true; s.setAttribute('data-site', 'fivex'); document.head.appendChild(s);
|
||||
})();
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
// "Network Weekend" ribbon (Marty 2026-11-17): a thin bar at the top of every network site page while a network event is live.
|
||||
// Data: /api/network-deals (netdeals.js, from the hub). Switches on and off by this page's own clock at the event's exact
|
||||
// startsAt / endsAt (US Central midnights), so a cached feed never shows it early or late, and it takes itself down at endsAt on
|
||||
// a page left open. Shows this site's own deal for today (byDay, Central date) and links to the full deals page.
|
||||
// The same file lives in every network site. Never RM Circle, never the games. No inline styles (CSP): styles go through CSSOM.
|
||||
// Test clock: window.__NW_NOW (ms) before this script runs; nothing else.
|
||||
(function () {
|
||||
if (window.__nwRibbon) return; window.__nwRibbon = 1;
|
||||
var tag = document.currentScript;
|
||||
var meAttr = (tag && tag.getAttribute('data-site')) || '';
|
||||
function now() { return typeof window.__NW_NOW === 'number' ? window.__NW_NOW : Date.now(); }
|
||||
// late November is CST (UTC-6) for every date this ribbon covers
|
||||
function ctDay(ms) { return new Date(ms - 6 * 3600 * 1000).toISOString().slice(0, 10); }
|
||||
function closedKey(id, day) { return 'nw.closed.' + id + '.' + day; }
|
||||
function isClosed(id, day) { try { return window.localStorage.getItem(closedKey(id, day)) === '1'; } catch (e) { return false; } }
|
||||
function setClosed(id, day) { try { window.localStorage.setItem(closedKey(id, day), '1'); } catch (e) {} }
|
||||
var bar = null;
|
||||
function remove() { if (bar && bar.parentNode) bar.parentNode.removeChild(bar); bar = null; }
|
||||
function paint(body) {
|
||||
var me = meAttr || (body && body.self) || '';
|
||||
var t = now();
|
||||
var ev = ((body && body.events) || []).filter(function (e) { return t >= Date.parse(e.startsAt) && t < Date.parse(e.endsAt); })[0];
|
||||
if (!ev) { remove(); return false; }
|
||||
var day = ctDay(t);
|
||||
if (isClosed(ev.id, day)) { remove(); return true; }
|
||||
var mine = (ev.deals || []).filter(function (d) { return d.site === me && t < Date.parse(d.endsAt || ev.endsAt); })[0];
|
||||
var line = mine ? ((mine.byDay && mine.byDay[day]) || mine.text) : '';
|
||||
var label = (ev.days && ev.days[day]) || '';
|
||||
var onDealsPage = ev.url && (location.origin + location.pathname) === ev.url;
|
||||
remove();
|
||||
bar = document.createElement('div');
|
||||
bar.className = 'nw-ribbon'; bar.setAttribute('role', 'region'); bar.setAttribute('aria-label', ev.name);
|
||||
bar.style.cssText = 'position:relative;z-index:50;display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center;justify-content:center;padding:8px 40px 8px 16px;'
|
||||
+ 'background:#14161b;color:#f4f1e8;font:600 13.5px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;text-align:center;border-bottom:2px solid #f2c94c';
|
||||
// built node by node with CSSOM styles: no style attributes, so a strict CSP (style-src 'self') has nothing to block
|
||||
function el(tagName, css, text) { var n = document.createElement(tagName); if (css) n.style.cssText = css; if (text) n.textContent = text; return n; }
|
||||
var head = el('span'); head.appendChild(el('b', 'color:#f2c94c', ev.name)); if (label) head.appendChild(document.createTextNode(' · ' + label));
|
||||
bar.appendChild(head);
|
||||
var body2 = el('span', 'font-weight:500', line || ev.tagline);
|
||||
if (line && mine && mine.note) { body2.appendChild(document.createTextNode(' ')); body2.appendChild(el('span', 'opacity:.75', mine.note)); }
|
||||
bar.appendChild(body2);
|
||||
if (ev.url && !onDealsPage) { var a = el('a', 'color:#f2c94c;text-decoration:underline', 'See every deal'); a.href = ev.url; a.target = '_blank'; a.rel = 'noopener'; bar.appendChild(a); }
|
||||
var x = el('button', 'position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:0;color:#f4f1e8;font-size:18px;line-height:1;cursor:pointer;padding:4px 8px', '×');
|
||||
x.type = 'button'; x.setAttribute('aria-label', 'Hide for today'); bar.appendChild(x);
|
||||
bar.querySelector('button').addEventListener('click', function () { setClosed(ev.id, day); remove(); });
|
||||
document.body.insertBefore(bar, document.body.firstChild);
|
||||
return true;
|
||||
}
|
||||
var feed = null, timer = null;
|
||||
function schedule() {
|
||||
clearTimeout(timer); if (!feed) return;
|
||||
// wake at the next switch moment (start, end, a deal ending, the next Central midnight), at least once a minute
|
||||
var t = now(), next = t + 60 * 1000;
|
||||
(feed.events || []).forEach(function (e) {
|
||||
[e.startsAt, e.endsAt].concat((e.deals || []).map(function (d) { return d.endsAt; })).forEach(function (s) { var x = Date.parse(s); if (x > t && x < next) next = x; });
|
||||
});
|
||||
timer = setTimeout(function () { if (typeof window.__NW_NOW === 'number') window.__NW_NOW += next - t; paint(feed); schedule(); }, Math.max(250, next - t));
|
||||
}
|
||||
function run() {
|
||||
fetch('/api/network-deals', { credentials: 'omit' }).then(function (r) { return r.ok ? r.json() : null; }).then(function (b) {
|
||||
if (!b || !Array.isArray(b.events) || !b.events.length) return;
|
||||
feed = b; paint(b); schedule();
|
||||
}).catch(function () {});
|
||||
}
|
||||
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); else run();
|
||||
window.__nwPaint = function (b) { feed = b; return paint(b); }; // tests
|
||||
})();
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
<p id="status" class="note" hidden></p>
|
||||
<section class="panel" id="bList"></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/wallet.js?v=3"></script>
|
||||
<script src="/assets/misc.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
<section style="display:flex;flex-direction:column;gap:12px"><h2>The five tiers</h2><div class="cards" id="tiers"></div>
|
||||
<p class="small">Rookie when drafted, Starter when they link a wallet, Pro when they switch on payouts, All-Star at their first purchase, Hall of Fame when they hold a position of their own and coach a team. Tap a card to flip it for the stats on the back.</p></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/cards.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
<div class="r"><h3>The team</h3><p class="small" style="color:#4a587e">Milestones only. Every Monday this coach drafts people who joined the network without a sponsor and helps them get started.</p><div class="row"><a class="btn-gold" id="cJoin" href="https://instantadpay.com/?return=fivex&to=%2Fmy">Join the network free</a><a class="btn" href="/join">Coach a team of your own</a></div></div></section>
|
||||
<section class="cards" id="cTeam"></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/coach.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<section><p class="kicker">CONTRACT</p><h1 style="font-size:44px">Check the contract yourself</h1><p class="muted">Read live from Polygon. No owner withdraw, no proxy, the split fixed in the code.</p></section>
|
||||
<section class="panel"><div class="tbl"><table id="facts"></table></div></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/contract.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<section class="card"><h2>Prices and taxes</h2><p>Positions are priced in US dollars and paid in POL, whose price moves. You are responsible for any taxes on what you receive where you live.</p></section>
|
||||
<section class="card"><h2>Who to ask</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>.</p></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/misc.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
@@ -15,4 +15,4 @@ h1{margin:0;font-family:Oswald,Impact,sans-serif;font-weight:700;font-size:108px
|
||||
</style></head><body data-page="draftday"><div class="dd"><img class="spot" src="/art/dd/spotlight.jpg" alt=""><img class="conf" src="/art/dd/confetti.png" alt=""><div class="top"><span class="wm">5X<b>YOUR</b>TEAM</span><span class="wk" id="ddWeek"></span></div>
|
||||
<h1>DRAFT DAY<br><span>RESULTS</span></h1><div class="rows" id="ddRows"></div>
|
||||
<div class="ft"><div><span id="ddStats"></span><span class="p" id="ddPot"></span></div><span class="url">5xyourteam.com</span></div></div>
|
||||
<script src="/assets/common.js?v=3"></script><script src="/assets/misc.js?v=3"></script></body></html>
|
||||
<script src="/assets/common.js?v=4"></script><script src="/assets/misc.js?v=3"></script></body></html>
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@
|
||||
</main>
|
||||
<!-- PolHunter mission (every rebuilt network site gets one, Marty 2026-11-14): the 3 How The Draft steps -->
|
||||
<script src="https://polhunter.com/embed.js" data-slots="3" data-selector=".how .s" async></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/board.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
<p class="small">Your sponsor gets 25% and levels 2 to 5 of your network sponsor line get 5% each. Only people who hold a position can receive a share: anyone in your line who does not is passed over and the share goes up to the next person who does. 10% goes to the weekly Best Coach pot and 45% to 5xYourTeam. The contract keeps nothing. Check it on the <a href="/contract">contract page</a> and every payment on the <a href="/ledger">ledger</a>.</p>
|
||||
<p class="small">A position buys a draft spot and coaching tools, not income. Nothing is promised.</p></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/wallet.js?v=3"></script>
|
||||
<script src="/assets/join.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
<section class="panel"><div class="tbl"><table id="rows"><thead><tr><th>WHEN</th><th>POSITION</th><th>PAID IN THE SAME TRANSACTION</th><th></th></tr></thead><tbody></tbody></table></div></section>
|
||||
<section class="panel"><h3 style="font-size:24px">Best Coach payouts</h3><div class="tbl"><table id="payouts"><thead><tr><th>WEEK</th><th>COACH</th><th>POL</th><th></th></tr></thead><tbody></tbody></table></div></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/ledger.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@
|
||||
<section class="card"><h2>Your choices</h2><p>You can ask us to remove your account and messages here. Records on the blockchain cannot be removed by anyone.</p></section>
|
||||
<section class="card"><h2>Contact</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>. Last updated November 15, 2026.</p></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/misc.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
<p id="status" class="note" hidden></p>
|
||||
<div id="kit" style="display:flex;flex-direction:column;gap:16px"></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/kitpage.js?v=3"></script>
|
||||
<script src="/assets/misc.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/wallet.js?v=3"></script>
|
||||
<script src="/assets/team.js?v=4"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@
|
||||
<section class="card"><h2>The service</h2><p>The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. The smart contract runs on Polygon on its own; its rules are public on the <a href="/contract">contract page</a>. We may change features, draft settings, the price of future positions or these terms; changes apply from the date they are posted here. As far as the law allows, our total responsibility to you is limited to what you paid for the purchase in question. These terms are governed by the laws of the State of Alabama, USA.</p></section>
|
||||
<section class="card"><h2>Contact</h2><p>TrustClickz. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>. Last updated November 15, 2026.</p></section>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/common.js?v=4"></script>
|
||||
<script src="/assets/misc.js?v=3"></script>
|
||||
<script src="/assets/chat.js?v=2" defer></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user